ZSH
Install zim
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
# or
wget -nv -O - https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
# Set zsh as default shell
chsh -s /usr/bin/zsh
.zshrc
# Alias
alias en = 'export LANG=C'
alias zh = 'export LANG="zh_CN.UTF-8"'
alias gst = 'git status'
alias gcl = 'git clone'
alias gc1 = 'git clone --depth=1'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias dps = 'docker ps -a'
alias du = 'du --exclude="proc"'
alias ip = "ip -color=auto"
alias grep = "grep --color=auto"
alias diff = "diff --color=auto"
# Editor
export EDITOR = "vim"
# Disable Bracketed Paste Mode
unset zle_bracketed_paste
vim ~/.zshrc
-----
# Alias
alias en = 'export LANG=C'
alias zh = 'export LANG="zh_CN.UTF-8"'
alias gst = 'git status'
alias gcl = 'git clone'
alias gc1 = 'git clone --depth=1'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias dps = 'docker ps -a'
alias du = 'du --exclude="proc"'
alias la = 'eza -aloF --header --icons --sort=type --time-style "+%Y-%m-%d %H:%M"'
alias ll = 'eza -loF --header --icons --sort=type --time-style "+%Y-%m-%d %H:%M"'
alias ls = 'eza --sort=type --color'
alias bat = 'bat --style=full'
alias ip = "ip -color=auto"
alias grep = "grep --color=auto"
alias diff = "diff --color=auto"
# Editor
export EDITOR = "vim"
# Nali functions
function dig () {
q $1 $2 $3 $4 $5 | nali
}
function ping () {
/usr/bin/ping $1 $2 $3 | nali
}
# Disable Bracketed Paste Mode
unset zle_bracketed_paste
-----
.zimrc
vim ~/.zimrc
-----
zmodule Aloxaf/fzf-tab
zmodule greymd/docker-zsh-completion
zmodule SuLingGG/steeef
zmodule ohmyzsh/ohmyzsh --root plugins/sudo
zmodule ohmyzsh/ohmyzsh --root plugins/z
zmodule ohmyzsh/ohmyzsh --root plugins/extract
-----
Zim configuration
# Added new modules to .zimrc`:
zimfw install
# Removed modules from .zimrc:
zimfw uninstall
# Update modules to latest revisions:
zimfw update
# Upgrade zimfw to latest version:
zimfw upgrade
FISH
Install oh-my-fish
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
Install omf plugins
omf install z extract sudope
Install fish theme
omf install https://github.com/SuLingGG/theme-kawasaki-ys
Install Dracula theme
mkdir -p ~/.config/fish/themes
wget https://raw.githubusercontent.com/dracula/fish/master/themes/Dracula%20Official.theme -O ~/.config/fish/themes/Dracula \ Official.theme
wget https://raw.githubusercontent.com/dracula/fish/master/conf.d/dracula.fish -O ~/.config/fish/conf.d/dracula.fish
# Add this line to the top of `config.fish`
vim ~/.config/fish/config.fish
-------
# Dracula color theme
fish_config theme choose "Dracula Official"
-------
Full ~/.config/fish/config.fish
content
cat ~/.config/fish/config.fish
-------
# Fish color theme
fish_config theme choose "Dracula Official"
# Alias
alias en = 'export LANG=C'
alias zh = 'export LANG="zh_CN.UTF-8"'
alias gst = 'git status'
alias gcl = 'git clone'
alias gc1 = 'git clone --depth=1'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias bbdown = 'BBDown --config-file ~/.config/bbdown/bbdown.conf'
alias la = 'eza -aloF --header --icons --sort=type --time-style "+%Y-%m-%d %H:%M"'
alias ll = 'eza -loF --header --icons --sort=type --time-style "+%Y-%m-%d %H:%M"'
alias ls = 'eza --sort=type --color'
alias bat = 'bat --style=full'
# Editor
export EDITOR = "vim"
# export LS_COLORS="$(vivid generate molokai)"
# PATH
fish_add_path $HOME /.local/bin
# Atuin
atuin init fish | source
# Nali function
function dig
q $argv | nali
end
function ping
/usr/bin/ping $argv | nali
end
-------
Start tmux when connect ssh
# Zsh
vim ~/.zshrc
-------
if [ -z " $TMUX " ]; then
tmux attach-session || tmux new -s Debian
fi
-------
# Fish
vim ~/.config/fish/config.fish
-------
if status is-interactive
and not set -q TMUX
if tmux has-session -t ArchLinux
exec tmux attach-session -t ArchLinux
else
tmux new-session -s ArchLinux
end
end
-------
Tmux plugins
mkdir -p ~/.tmux/plugins
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
vim ~/.tmux.conf
-------
# Tmux auto save & restore
set -g @continuum-restore 'on'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
-------