天天看點

mac終端美化之安裝iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k]

截圖效果:

mac終端美化之安裝iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k]

安裝ITerm2

brew cask install iterm2
           
  • 如果沒有安裝brew請在指令行執行安裝brew
  • 如果不想安裝brew可以使用去ITerm官網下載下傳并安裝.

下載下傳主題

  • Solarized Dark theme
  • Solarized Light theme
  • 其他主題

儲存到 本地後 打開iTerm-> profiles -> colors -> load presets.

安裝 oh my zsh

安裝指令

下載下傳完成後編輯

.zshrc

檔案并指定主題為

agnoster

vim ~/.zshrc
set ZSH_THEME="agnoster"
           

安裝Powerlevel9k主題

安裝指令

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

下載下傳完成後編輯

.zashrc

檔案并指定主題

vim ~/.zshrc
set ZSH_THEME="powerlevel9k/powerlevel9k".
           

自定義設定可以參考這裡.

安裝字型

  • Meslo
  • Source Code Pro

    @14px

    字型比較協調.
  • Others @ powerline fonts

    下載下傳後安裝字型在iTerm2設定

    iTerm -> Preferences -> Profiles -> Text -> Change Font.

    重新開機即可生效

其他額外工作

  • auto suggestions
  • word jumping with arrow keys
  • shorter prompt style
  • syntax highlighting

Auto suggestions (for Oh My Zsh)

mac終端美化之安裝iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k]
  1. 下載下傳到本地
    git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
               
  2. .zshrc

    插件設定中添加插件
  3. 重新開機iTerm2

繼續閱讀