tips:zsh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tips:zsh [2017/11/06 08:05] – [install] scipiotips:zsh [2018/11/05 10:38] (current) – [powerline arch] scipio
Line 1: Line 1:
 ====== Z shell ====== ====== Z shell ======
 +
 +===== keys =====
 +
 +  * CTRL + U: this will clear the entire line
  
 ===== install ===== ===== install =====
Line 17: Line 21:
 </code> </code>
  
-<file .zshrc>+<file txt .zshrc>
 plugins=(git zsh-autosuggestions) plugins=(git zsh-autosuggestions)
 +</file>
 +
 +==== powerline arch ====
 +
 +<code>
 +sudo pacman -S powerline powerline-fonts zsh-theme-powerlevel9k
 +</code>
 +
 +add inconsolata font for powerline
 +<code>
 +sudo wget https://github.com/powerline/fonts/blob/master/Inconsolata/Inconsolata%20for%20Powerline.otf?raw=true -O /usr/share/fonts/OTF/Inconsolata\ for\ Powerline.otf
 +sudo fc-cache -f -v
 +</code>
 +
 +<file txt ~/.zshrc>
 +if [[ -r /usr/share/powerline/bindings/zsh/powerline.zsh ]]; then
 +    powerline-daemon -q
 +    source /usr/share/powerline/bindings/zsh/powerline.zsh
 +fi
 +if [[ -r /usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme ]]; then
 +    source /usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme
 +    POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(virtualenv nodeenv dir vcs)
 +    POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
 +    POWERLEVEL9K_SHORTEN_DELIMITER=""
 +    POWERLEVEL9K_SHORTEN_STRATEGY="truncate_from_right"
 +fi
 +</file>
 +
 +<file txt ~/.bashrc>
 +if [[ -r /usr/share/powerline/bindings/bash/powerline.sh ]]; then
 +    powerline-daemon -q
 +    source /usr/share/powerline/bindings/bash/powerline.sh
 +fi
 +</file>
 +
 +select inconsolata for powerline medium in tilix
 +==== powerline ubuntu ====
 +
 +<code>
 +sudo apt install -y python-pip
 +sudo pip install powerline-status
 +
 +# inconsolata for powerline medium
 +sudo mkdir -o usr/share/fonts/opentype/
 +sudo wget https://github.com/powerline/fonts/blob/master/Inconsolata/Inconsolata%20for%20Powerline.otf?raw=true -O /usr/share/fonts/opentype/Inconsolata\ for\ Powerline.otf
 +sudo fc-cache -f -v
 +
 +# powerlevel9k
 +git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
 +
 +# .zshrc
 +ZSH_THEME="powerlevel9k/powerlevel9k"
 +
 +# awesome powerline fonts
 +cd
 +wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
 +wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
 +mkdir -p .config/fontconfig/conf.d ~/.fonts
 +mv PowerlineSymbols.otf ~/.fonts/
 +fc-cache -vf ~/.fonts/
 +mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
 +</code>
 +
 +<file ini ~/.zshrc>
 +POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(virtualenv dir vcs)
 +POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
 +POWERLEVEL9K_SHORTEN_DELIMITER=""
 +POWERLEVEL9K_SHORTEN_STRATEGY="truncate_from_right"
 </file> </file>
  
  • tips/zsh.1509951941.txt.gz
  • Last modified: 2017/11/06 08:05
  • by scipio