Skip to content

Instantly share code, notes, and snippets.

@wjshamblin
Last active April 19, 2024 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wjshamblin/48bebf0d967a7dde80badcbb2f1b6cd9 to your computer and use it in GitHub Desktop.
Save wjshamblin/48bebf0d967a7dde80badcbb2f1b6cd9 to your computer and use it in GitHub Desktop.
Install ZSH
#install cargo
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
# install fd-find
cargo install fd-find bat
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Powerlevel 10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# zsh completions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# zoxide
curl -sS https://webinstall.dev/zoxide |bash
# fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
# Next, run the powerlevel10k configuration utility and select how you would like to see the prompt. This can be run multiple
# times, so you can go back and change things later.
source ~/.zshrc
p10k configure
# now edit the .zshrc file and make the following modifications.
# add the next few lines down to the ZSH_THEME to the top of .zshrc.
export PATH=$HOME/bin:$HOME/.local/bin:$PATH:/usr/local/bin
eval "$(zoxide init zsh)"
# Change the zsh theme to powerlevel10k
ZSH_THEME="powerlevel10k/powerlevel10k"
# add autocomplete
source $ZSH/plugins/zsh-autocomplete/zsh-autocomplete.plugin.zsh
# Update the plugins to include the following and disable compfix (that line can go right after the plugins line.
plugins=(zsh-completions zsh-navigation-tools zsh-syntax-highlighting zsh-interactive-cd zsh-autosuggestions zoxide poetry ubuntu systemd command-not-found git web-search)
ZSH_DISABLE_COMPFIX=true
# Put these lines near the bottom.
export FD_OPTIONS="--follow --exclude .git --exclude node_modules"
export FZF_CTRL_T_COMMAND="fd $FD_OPTIONS"
export FZF_ALT_C_COMMAND="fd --type d $FD_OPTIONS"
export BAT_PAGER="less -R"
export FZF_COMPLETION_TRIGGER='**'
export FZF_DEFAULT_COMMAND="fd --type f --type l $FD_OPTIONS"
export FZF_DEFAULT_OPTS="--height 40% --layout reverse --info inline --border --preview-window up,1,border-horizontal --color 'fg:#bbccdd,fg+:#ddeeff,bg:#334455,preview-bg:#223344,border:#778899'"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export DISABLE_AUTO_TITLE='true'
setopt HIST_IGNORE_ALL_DUPS
export EXA_COLORS="da=1;40;34"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment