Monday, July 10, 2017

Linux Power Terminal with Oh My Zsh and Powerlevel9k

0 lượt xem comment 0 comments

As Developers we spend lots of time using Linux terminal. Today I will show my set of customizations I'm currently using.

The terminal setup we will see is awesome because it makes your life easier using git and also display useful information about Linux.

I will show how to configure Oh My Zsh with Needfonts, Powerlevel9k theme and ruby colors on Gnome Ubuntu 17.04.

Tools that we will use:

Let's get started! 

Installing Oh My Zsh, NerdFontd and Powerlevel9k Theme

Install ZSH and Oh My Zsh

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

Install NerdFotns

mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20for%20Powerline%20Nerd%20Font%20Complete.otf

vim ~/.zshrc
POWERLEVEL9K_MODE='nerdfont-complete'

Install PowerLevel9k Theme

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

ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time ram load)
alias cls=clear

Export functions on Zsh

touch ~/.zsh_functions
vim ~/.zsh_functions
function jcurl() {
  curl -s "$@" | json | pygmentize -l json
}

function tojson(){
  json | pygmentize -l json
}
vim ~/.zshrc
source ~/.zsh_functions
jcurl http://ip.jsontest.com/

Installing Ruby colorls

sudo apt install -y ruby ruby-dev ruby-colorize
sudo apt-get install -y libncurses5-dev libtinfo-dev
sudo gem install colorls
colorls -r

The final result it is like this. 


That's it for today.

Cheers,
Diego Pacheco


Tags: theme,

comment 0 comments

Chuyên mục văn hoá giải trí của VnExpress

.

© 2017 www.blogthuthuatwin10.com

Tầng 5, Tòa nhà FPT Cầu Giấy, phố Duy Tân, Phường Dịch Vọng Hậu, Quận Cầu Giấy, Hà Nội
Email: nguyenanhtuan2401@gmail.com
Điện thoại: 0908 562 750 ext 4548; Liên hệ quảng cáo: 4567.