LoginSignup
39
36

More than 5 years have passed since last update.

oh-my-zshでpowerlineを堪能する

Last updated at Posted at 2014-02-08

スクリーンショット 2014-02-08 21.19.33.png

最近@ta9to@nakajmgがpowerlineネタの記事を書いていましたが、oh-my-zshならもっと簡単にできるんじゃないかなぁーと思ったので試してみました。

1. zshをインストールする

$ brew install zsh

2. oh-my-zshをインストールする

curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

or

wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh

3. powerline用のテーマをインストールする

今回はjeremyFreeAgent/oh-my-zsh-powerline-themeこのテンプレートを取得して.oh-my-zsh/themes/入れます。

$ git clone git@github.com:jeremyFreeAgent/oh-my-zsh-powerline-theme.git
$ cd oh-my-zsh-powerline-theme
$ ./install_in_omz.sh

あとは.zshrcにテーマの指定をします。

$ vim ~/.zshrc
--ZSH_THEME="robbyrussell"
++ZSH_THEME="powerline"

あとは適当に.zshrcお好みで設定を書きます。

# powerline
POWERLINE_HIDE_HOST_NAME="true"
POWERLINE_HIDE_GIT_PROMPT_STATUS="true"
POWERLINE_SHOW_GIT_ON_RIGHT="true"

4.フォントの設定を行う

僕はターミナルにはMonacoを使いたい人をなのでMonaco for Powerline.otfをいれますよ。
Monaco for Powerline.otf
ここからMonaco for Powerline.otfをダウンロードしてきて、/Library/Fontsに入れてください。

$ wget https://gist.github.com/baopham/1838072/raw/2c0e00770826e651d1e355962e751325edb0f1ee/Monaco%20for%20Powerline.otf
$ mv Monaco\ for\ Powerline.otf /Library/Fonts/

あとはiTerm2なり、なんなりでフォントの設定をするだけですよー。
スクリーンショット 2014-02-08 21.16.19.png

参考
5分でターミナルの表示をカッコよくする
powerlineとSourceCodeProで簡単につくれるキレイな開発環境
robbyrussell / oh-my-zsh

39
36
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
39
36