-
brew install alacritty
-
mkdir -p ~/.config/alacritty/themes git clone --depth=1 https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes
-
brew install font-hack-nerd-font brew install font-Inconsolata-Nerd-Font brew install font-iosevka-nerd-font brew install font-iosevka-term-slab-nerd-font brew install font-tinos-nerd-font brew install font-profont-nerd-font brew install font-m+-nerd-font brew install font-go-mono-nerd-font brew install font-Anonymice-nerd-font
NOTE: All Nerd fonts can be previewed on this page. Install as needed: https://www.nerdfonts.com/font-downloads
-
brew install tmux
-
switchaudio-osx
# For showing audio volume status in the tmux status bar. brew install switchaudio-osx
-
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
-
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
-
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
-
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.powerlevel10k
-
# A modern replacement for ls. brew install eza
-
brew install neovim
# Clone windvalley/dotfiles
git clone https://[email protected]:windvalley/dotfiles.git ~/.dotfiles
# Tmux
killall tmux
mv ~/.tmux ~/.tmux.bak
rm -rf /tmp/tmux*
ln -sf ~/.dotfiles/tmux/tmux.conf ~/.tmux.conf
# Alacritty
ln -sf ~/.dotfiles/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml
cp ~/.dotfiles/alacritty/alacritty_private.toml ~/.config/alacritty/alacritty_private.toml
# Zsh
ln -sf ~/.dotfiles/zsh/zshrc ~/.zshrc
ln -sf ~/.dotfiles/zsh/p10k.zsh ~/.p10k.zsh
cp ~/.dotfiles/zsh/zshrc_private ~/.zshrc_private
exec zsh
# Neovim(LazyVim)
mv ~/.config/nvim ~/.config/nvim.bak
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim
rm -rf ~/.cache/nvim
ln -sf ~/.dotfiles/nvim ~/.config/nvim
cat > ~/.dotfiles/nvim/lua/plugins/switch_colorscheme.lua <<EOF
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "tokyonight"
},
},
}
EOF
Shortcut | Action |
---|---|
Command h |
Hide the current Alacritty terminal |
Command m |
Minimize the current Alacritty to the Dock |
Command q /w |
Quit Alacritty |
Command n |
Spawn new instance of Alacritty |
Command f /b |
Search forward or backward |
Command + /- /0 |
Increase/Decrease/Reset font size |
Ctrl Command f |
Toggle full screen |
Ctrl l |
Clear warning/error messages of Alacritty in status line |
Command Option h |
Hiding all windows other than the current Alacritty |
Prefix Key: Ctrl a
All the following shortcuts keys must first press the prefix key.
Note that after pressing the prefix key, you need to release the prefix key first, and then press other specific shortcut keys.
?
: List key bindingsr
: Reload~/.tmux.conf
e
: Edit~/.tmux.conf
K
: View help documents of the object in~/.tmux.conf
d
: Detach the current client
s
: Choose a session from a listOption/Alt
f
: Search sessionCtrl
c
: Create new session$
: Rename the current sessionb
: Toggle status line of the current session
c
: Create new window,
: Rename current window.
: Move current windown
: Select the next windowp
: Select the previous window0-9
: Select window 0-9&
: Kill current windoww
: Choose a window from a listf
: Search windowi
: Display window information
Show more ...
%
: Split window horizontally"
: Split window vertically<Space>
: Select next layoutCtrl
E
: Spread panes out evenlyx
: Kill the active panez
: Zoom the active pane{
/<
: Swap the active pane with the pane above}
/>
: Swap the active pane with the pane belowq
: Display pane numbers(it will also display a letter if the number gather than 10), then press the specified number(or letter) to select it.t
: Show a clock in current pane!
: Break pane to a new window;
: Move to the previously active panek
: Select the pane above the active panej
: Select the pane below the active paneh
: Select the pane to the left of the active panel
: Select the pane to the right of the active paneo
: Select the next paneCtrl
o
: Rotate through the panesOption/Alt
o
: Rotate through the panes in reversem
: Toggle the marked paneK
: Resize the pane upJ
: Resize the pane downH
: Resize the pane leftL
: Resize the pane rightCtrl
l
: Clear all the messages(include history messages) in the active paneCtrl
b
: Toggle pane name of the current window's all panesCtrl
t
: Create a new pane that is 16% of the size of the current pane and below the current pane
[
: Enter copy mode]
: Paste the most recent paste buffer
NOTE: The followings is the operations after entered copy mode, no need to press the Prefix Key first.
q
: Exit from copy modehjhl
: Movementsv
: Text selectV
: Text line selectCtrl
v
: Text block selectenter
: Copy the selected textesc
: Escape from text selected/
: Search down?
: Search up
Enabled vi-mode
, many vi shortcuts can be used in this scenario.
Ctrl
y
: Toggle sync mode
Show more ...
Tmux Plugin Manager.
I
: Install new pluginsU
: Update all pluginsu
: Uninstall plugins that not in~/.tmux.conf
This plugin saves all the little details from your tmux environment so it can be completely restored after a system restart (or when you feel like it).
Ctrl
s
: Save sessionsCtrl
r
: Restore sessions from local backup
-
/
: Regex search (strings work too)Example search entries:
foo
: Searches for string foo[0-9]+
: Regex search for numbers
Ctrl
f
: Simple file searchCtrl
g
: Jumping over git status files (best used after git status command:git status -sb
)Ctrl
h
: Jumping over SHA-1/SHA-256 hashes (best used after git log command)Ctrl
u
: URL search (http, ftp and git urls)Ctrl
d
: Number search (mnemonic d, as digit)Ctrl
i
: IP address searchS
: Jumping over string surrounded by""
These start "copycat mode" and jump to first match.
These are enabled when you search with copycat:
n
: Jumps to the next matchN
: Jumps to the previous matchenter
: Copy a highlighted match
- Tmux Normal Mode
y
: Copies text from the command line to the clipboard.Y
: Copy the current pane's current working directory to the clipboard.
- Tmux Copy Mode
y
: Copy selection to system clipboard.Y
: Equivalent to copying a selection, and pasting it to the command line.
Plugin for opening highlighted selection directly from Tmux copy mode.
In Tmux Copy Mode:
o
: Open a highlighted selection with the system default program. open for OS X or xdg-open for Linux.Ctrl
o
: Open a highlighted selection with the $EDITORS
: Search the highlighted selection directly by GoogleB
: Search the highlighted selection directly by Bing
omz reload
or exec zsh
or source ~/.zshrc
-
$ ff
Search file by
fzf
and then open it byvim
. -
Ctrl
t
List all files and dirs of the current dir, then select one and
enter
, it will paste the selected file name to the command line. -
Option
/Alt
c
List all dirs of the current dir, then select one and
enter
, it will switch to the selected dir. -
Ctrl
r
List history commands, then input keywords and select the specific one, and
enter
, it will paste the selected command to the command line. -
Ctrl
k
/j
Select up or down in file/dir list or history command list.
-
Ctrl
p
/n
The same as
Ctrl
k
/j
. -
Ctrl
c
/Ctrl
g
/esc
Quit from file/dir list or history command list.
-
Change colorscheme of Alacritty and Neovim
$ cs Usage: colorscheme <tokyonight|tokyonight|gruvbox|dracula|catppuccin>
-
Change Font of Alacritty
$ ft Usage: font <Hack|Inconsolata|Iosevka|ProFontIIx|ProFontWindows|M+1Code|M+CodeLat50|GoMono|AnonymicePro>
-
Change Font Size of Alacritty
$ fs Usage: font-size <1-200>
-
Change opacity of Alacritty
$ o Usage: opacity <0.0~1.0>
-
Adjust the system volume
$ vol Usage of audio-volume: digit Set volume value, 1~100 -p, --print Print all audio devices -n, --next Switch to the next audio device -i device_id Switch to the given audio device
-
Batch ssh remote hosts in multi-tmux-panes
$ s Usage: ssh-sessions /yourpath/tmux_window[.extension] Content format of /yourpath/tmux_window[.extension]: node1.example.com node2.example.com node3.exmaple.com ... Note: Make sure the hosts in /yourpath/tmux_window.extension can login without password by ssh public key authentication. Examples: $ ssh-sessions ~/.xxxhosts.ssh or $ ssh-sessions ~/.xxxhosts or $ ssh-sessions ~/xxxhosts
Show more ...
~/.oh-my-zsh/plugins/web-search/README.md
-
Enter
Normal Mode
First of all, use esc orCtrl [
to enterNormal mode
. -
History
ctrl
p
: Previous command in historyctrl
n
: Next command in history/
: Search backward in historyn
: Repeat the last/
-
Vim edition
vv
: Edit current command line in Vim
-
Movement
$
: To the end of the line^
: To the first non-blank character of the line0
: To the first character of the linew
: [count] words forwardW
: [count] WORDS forwarde
: Forward to the end of word [count] inclusiveE
: Forward to the end of WORD [count] inclusiveb
: [count] words backwardB
: [count] WORDS backwardt{char}
: Till before [count]'th occurrence of {char} to the rightT{char}
: Till before [count]'th occurrence of {char} to the leftf{char}
: To [count]'th occurrence of {char} to the rightF{char}
: To [count]'th occurrence of {char} to the left;
: Repeat latest f, t, F or T [count] times,
: Repeat latest f, t, F or T in opposite direction
-
Insertion
i
: Insert text before the cursorI
: Insert text before the first character in the linea
: Append text after the cursorA
: Append text at the end of the lineo
: Insert new command line below the current oneO
: Insert new command line above the current one
-
Delete and Insert
ctrl-h
: While in Insert mode: delete character before the cursorctrl-w
: While in Insert mode: delete word before the cursord{motion}
: Delete text that {motion} moves overdd
: Delete lineD
: Delete characters under the cursor until the end of the linec{motion}
: Delete {motion} text and start insertcc
: Delete line and start insertC
: Delete to the end of the line and start insertr{char}
: Replace the character under the cursor with {char}R
: Enter replace mode: Each character replaces existing onex
: Deletecount
characters under and after the cursorX
: Deletecount
characters before the cursor
~/.oh-my-zsh/plugins/git/README.md
gst
: git statusgsh
: git showga
: git addgc
: git commit -vgp
: git pushgpf
: git push -fglo
: git log --oneline --decorateglog
: git log --oneline --decorate --graphgl
: git pull
~/.oh-my-zsh/plugins/gitignore/README.md
gi list
: List all the currently supported gitignore.io templates.gi [TEMPLATENAME]
: Show git-ignore output on the command line, e.g.gi java
to exclude class and package files.gi [TEMPLATENAME] >> .gitignore
: Appending programming language settings to your projects .gitignore.
~/.oh-my-zsh/plugins/web-search/README.md
You can use the web-search
plugin in these two forms:
web_search <context> <term> [more terms if you want]
<context> <term> [more terms if you want]
For example, these two are equivalent:
$ web_search google oh-my-zsh
$ google oh-my-zsh
Available search contexts are:
Context | URL |
---|---|
bing |
https://www.bing.com/search?q= |
google |
https://www.google.com/search?q= |
yahoo |
https://search.yahoo.com/search?p= |
ddg or duckduckgo |
https://www.duckduckgo.com/?q= |
sp or startpage |
https://www.startpage.com/do/search?q= |
yandex |
https://yandex.ru/yandsearch?text= |
github |
https://github.com/search?q= |
baidu |
https://www.baidu.com/s?wd= |
ecosia |
https://www.ecosia.org/search?q= |
goodreads |
https://www.goodreads.com/search?q= |
qwant |
https://www.qwant.com/?q= |
givero |
https://www.givero.com/search?q= |
stackoverflow |
https://stackoverflow.com/search?q= |
wolframalpha |
https://wolframalpha.com/input?i= |
archive |
https://web.archive.org/web/*/ |
scholar |
https://scholar.google.com/scholar?q= |
~/.oh-my-zsh/plugins/colorize/README.md
-
ccat <file> [files]
: colorize the contents of the file (or files, if more than one are provided). If no files are passed it will colorize the standard input. -
cless [less-options] <file> [files]
: colorize the contents of the file (or files, if more than one are provided) and open less. If no files are passed it will colorize the standard input. The LESSOPEN and LESSCLOSE will be overwritten for this to work, but only in a local scope.
~/.oh-my-zsh/plugins/sudo/README.md
Easily prefix your current or previous commands with sudo
by pressing esc twice.
~/.oh-my-zsh/plugins/copyfile/README.md
copyfile <filename>
: Puts the contents of a file in your system clipboard so you can paste it anywhere.
~/.oh-my-zsh/plugins/copydir/README.md
copydir
: Copy the $PWD to the system clipboard.
~/.oh-my-zsh/plugins/aliases/README.md
With lots of 3rd-party amazing aliases installed, this plugin helps list the shortcuts that are currently available based on the plugins you have enabled.
acs
: Group all aliasacs <keyword>
: Quickly filter alias & highlight
-
Cursor movement in Insert Mode
Ctrl
k
: Move cursor upCtrl
j
: Move cursor downCtrl
h
: Move cursor leftCtrl
l
: Move cursor rightCtrl
e
: Move cursor to the end of the lineCtrl
a
: Move cursor to the start of the line
-
Shortcuts for Codeium
Tab
: Accept Codeium suggestionCtrl
f
: Next Codeium suggestionCtrl
b
: Previous Codeium suggestionCtrl
c
: Cancel Codeium suggestionCtrl
t
: Trigger Codeium suggestion