Customizing Oh-My-ZSH

Install ZSH:

sudo apt-get install zsh

Install oh-my-zsh:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Download a font from Nerd Fonts, that will include all the icons and stuff, I’m using Hack. https://nerdfonts.com/
Hack.tar

mkdir ~/.fonts && cd ~/.fonts
unzip ~/Downloads/Hack.zip

Now, you need to make the Terminal use this font as default. If the font dont appear on the fonts to be selected on the Preferences on the Terminal, you could change the system font by this:

In Ubuntu:

1. Install GNOME Tweaks
2. Set the system monospace font to your nerd font
3. In the Terminal’s Font Preference, leave the Custom Font option unchecked, then it will use the system font.

In Linux Mint:

Open Font Selection and in Monospace select Hack Font:

Now let’s install the Powerlevel9K that will do all the magic.

git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

Now edit ~/.zshrc with any editor.

nano ~/.zshrc

Change the ZSH_THEME to owerlevel9k/powerlevel9k and add this line to enable icons POWERLEVEL9K_MODE=”nerdfont-complete”. Add some other configs to show more info, like this:

ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='nerdfont-complete'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(command_execution_time ram load status background_jobs history time)

Here the instructions about these configs. https://github.com/bhilburn/powerlevel9k#prompt-customization

Just close and open again the Terminal and is done.

Now lets activate some plugins…

/zsh-autosuggestions

  1. Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
    plugins=(zsh-autosuggestions)

/zsh-completions

  • Clone the repository inside your oh-my-zsh repo:
      git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
    
  • Enable it in your .zshrc by adding it to your plugin list and reloading the completion:
      plugins=(… zsh-completions)
      autoload -U compinit && compinit

/zsh-syntax-highlighting

  • Download the script or clone this repository in oh-my-zsh plugins directory:
      cd ~/.oh-my-zsh/custom/plugins
      git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
    
  • Activate the plugin in ~/.zshrc (in last position):
      plugins=( [plugins...] zsh-syntax-highlighting)
    
  • Source ~/.zshrc to take changes into account:
      source ~/.zshrc

/Gogh

Pre-Install

  $ sudo apt-get install dconf-cli uuid-runtime

Install

Just copy and paste this one-line command:

  $  bash -c  "$(wget -qO- https://git.io/vQgMr)"

Select number 19, that is Brogrammer color.

Theme Brogrammer

Leave a Reply

Your email address will not be published. Required fields are marked *