Skip to content

Instantly share code, notes, and snippets.

@drofp
Created October 12, 2020 22:31
Show Gist options
  • Save drofp/13e92d7cd43d0150de7b80495beda08c to your computer and use it in GitHub Desktop.
Save drofp/13e92d7cd43d0150de7b80495beda08c to your computer and use it in GitHub Desktop.
zsh setup notes
https://medium.com/@ivanaugustobd/your-terminal-can-be-much-much-more-productive-5256424658e8
# Summary
## Install
1) ZSH
```
Fedora: dnf install zsh
Arch: pacman -S zsh zsh-completions
*SUSE: zypper in zsh
Ubuntu: apt install zsh
*BSD: pkg install zsh bash
```
2) Oh-my-zsh (https://github.com/ohmyzsh/ohmyzsh)
```
curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh; zsh
```
## Functional
1) zsh-syntax-highlighting (https://github.com/zsh-users/zsh-syntax-highlighting)
```
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
```
- Add `zsh-syntax-highlighting` to the `plugins` list in your ~/.zshrc
2) zsh-autosuggestions (https://github.com/zsh-users/zsh-autosuggestions)
```
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
```
3) fzf (https://github.com/junegunn/fzf)
```
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install
```
- ctrl+T to search files
- ctrl+R for improved reverse search (command history)
## Visual
https://www.youtube.com/watch?v=wM1uNqj71Ko&ab_channel=babyWOGUE
1) Nerd Fonts (https://www.nerdfonts.com/)
- Download a nice font (suggestion: https://sourcefoundry.org/hack/)
- Now extract it and move the files into yours fonts folder (something like ~/.fonts or ~/.local/share/fonts):
```
mkdir ~/.fonts && cd ~/.fonts
unzip ~/Downloads/<the_chosen_font>.zip
```
- update font in terminal preferences
2) Powerlevel10k (https://github.com/romkatv/powerlevel10k)
INSTRUCTIONS FOR POWERLEVEL9K:
- Now to enable it, change your ZSH_THEME (in the ~/.zshrc file) to powerlevel9k/powerlevel9k and add POWERLEVEL9K_MODE="nerdfont-complete" to add support for icons:
- more ideas: https://github.com/Powerlevel9k/powerlevel9k/wiki/Show-Off-Your-Config
- https://github.com/Powerlevel9k/powerlevel9k#prompt-customization
## Bonus
1) Tilix terminal (https://gnunn1.github.io/tilix-web/)
2) bgnotify (https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/bgnotify)
- sends desktop notification after finish running command
3) colorls (https://github.com/athityakumar/colorls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment