Skip to content

Instantly share code, notes, and snippets.

@RomelSan
Last active November 25, 2020 22:04
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 RomelSan/c300e69cf40b2c738855f9127910f6e8 to your computer and use it in GitHub Desktop.
Save RomelSan/c300e69cf40b2c738855f9127910f6e8 to your computer and use it in GitHub Desktop.
ZSH Linux

Installing ZSH

Install ZSH

sudo apt-get install zsh

Add other complements

sudo apt-get install zsh-autosuggestions zsh-syntax-highlighting

Check Version

zsh --version

should be 5.0.8 or more recent

Change Shell

chsh -s $(which zsh)

or

sudo usermod -s $(which zsh) <username>

Then logout and loging, when asked select option 2 to generate default settings.

Installing Oh My ZSH

Install via Curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install via Wget

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Selecting a Theme

nano ~/.zshrc

Modify ZSH_THEME="robbyrussell" to use a different theme. For example:

ZSH_THEME="fino"

My favorites themes are: Fino, Funky, Josh, mikeh, tjkirch

Optional (Advanced Looks)

Using Patched Fonts

  1. Use font Cascadia Code PL included with "Windows Terminal" app or download from github
    File to install: CascadiaCodePL.ttf
    https://github.com/microsoft/cascadia-code
  2. Also you can use patched fonts from nerdfonts.com
    My favorites are: SourceCodePro.zip and CascadiaCode.zip
    The fonts to install are:
    Sauce Code Pro Nerd Font Complete Windows Compatible.ttf
    Caskaydia Cove Nerd Font Complete Windows Compatible.ttf
    https://github.com/ryanoasis/nerd-fonts/releases

Putty and Kitty

Setting Font

In Windows --> Appearance --> Font Settings, click change and select the patched font.
Also check "Allow selection of variable-pitch fonts"
Font Quality: ClearType

Fixing Keypad

In Terminal --> Features --> Check "Disable application keypad mode"

Get Colors Working

In Connection --> Data --> Terminal Details --> Terminal-type string
Type: "linux"

Setting shell colors (Putty and Kitty)

Nord Theme

For Saved Session in Sessions folder. (For Kitty)

Colour0\216,222,233\
Colour1\216,222,233\
Colour2\46,52,64\
Colour3\46,52,64\
Colour4\46,52,64\
Colour5\216,222,233\
Colour6\59,66,82\
Colour7\76,86,106\
Colour8\191,97,106\
Colour9\191,97,106\
Colour10\163,190,140\
Colour11\163,190,140\
Colour12\235,203,139\
Colour13\235,203,139\
Colour14\129,161,193\
Colour15\129,161,193\
Colour16\180,142,173\
Colour17\180,142,173\
Colour18\136,192,208\
Colour19\143,188,187\
Colour20\229,233,240\
Colour21\236,239,244\

Regedit (For Putty)

Windows Registry Editor Version 5.00 

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Nord]
"Colour0"="216,222,233"
"Colour1"="216,222,233"
"Colour2"="46,52,64"
"Colour3"="46,52,64"
"Colour4"="46,52,64"
"Colour5"="216,222,233"
"Colour6"="59,66,82"
"Colour7"="76,86,106"
"Colour8"="191,97,106"
"Colour9"="191,97,106"
"Colour10"="163,190,140"
"Colour11"="163,190,140"
"Colour12"="235,203,139"
"Colour13"="235,203,139"
"Colour14"="129,161,193"
"Colour15"="129,161,193"
"Colour16"="180,142,173"
"Colour17"="180,142,173"
"Colour18"="136,192,208"
"Colour19"="143,188,187"
"Colour20"="229,233,240"
"Colour21"="236,239,244"

Select an advanced theme (Powerline)

nano ~/.zshrc

Set theme: ZSH_THEME="agnoster"

Other options

Disable Update Prompt

In zshrc config, uncomment

DISABLE_UPDATE_PROMPT=true
DISABLE_AUTO_UPDATE=true

Manual Updates

In shell

upgrade_oh_my_zsh

Uninstall

In shell

uninstall_oh_my_zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment