# Howto install ZSH, oh-my-zsh, powerlevel9k and nerdfonts ## TL;DR Install with: ``` sh -c "$(curl -fsSL https://gist.github.com/ni-c/f83f4389391b2a91c280201fdbd39eb4/raw/ac2cbf3ccf85025d46887d124d21ee825a136fb8/install-zsh.sh)" ``` ## Client To use powerline tools you need to install and use one of the patched nerd fonts in your beloved terminal client. https://nerdfonts.com/ ## Server ### ZSH ZSH is a replacement for bash with tons of features. ``` sudo apt-get install zsh ``` ### oh-my-zsh A toolsuite with a lot of plugins that make using the shell more comfortabel. Especially the git plugin is awesome! ``` sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" ``` https://github.com/robbyrussell/oh-my-zsh ### powerlevel9k An easy customizable theme for ZSH that gives you a lot of informations about your webserver. ``` git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k ``` https://github.com/bhilburn/powerlevel9k ### ~/.zshrc The configuration file for ZSH, oh-my-zsh and powerline9k. Add the following configuration (replace the theme block) to your .zshrc on a live server: ``` POWERLEVEL9K_CUSTOM_LIVE="echo -n \"\uf525 LIVE \uf525\"" POWERLEVEL9K_CUSTOM_LIVE_BACKGROUND="red" POWERLEVEL9K_CUSTOM_LIVE_FOREGROUND="white" POWERLEVEL9K_MODE="nerdfont-complete" POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_live host dir vcs) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs load ram disk_usage time) ZSH_THEME="powerlevel9k/powerlevel9k" DEFAULT_USER=roamsys ``` ### zsh-autosuggestions Fish-like autosuggestions for zsh. Do not forget to add to plugin-list in .zshrc. ``` git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions ``` https://github.com/zsh-users/zsh-autosuggestions ### zsh-syntax-highlighting Fish shell like syntax highlighting for Zsh. Do not forget to add to plugin-list in .zshrc. ``` git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ``` https://github.com/zsh-users/zsh-syntax-highlighting.git ### Optionals #### zsh-ec2ssh zsh plugin to list up EC2 instances and ssh login the instances. Do not forget to add to plugin-list in .zshrc. ``` sudo apt-get install peco git clone https://github.com/h3poteto/zsh-ec2ssh.git ~/.oh-my-zsh/custom/plugins/zsh-ec2ssh ``` https://github.com/h3poteto/zsh-ec2ssh ### Other tools #### cool-peco peco utils ``` sudo apt-get install peco git clone https://github.com/ryoppy/cool-peco.git cd cool-peco sh ./install.sh ``` https://github.com/ryoppy/cool-peco