memo.xight.org

日々のメモ

カテゴリ : tmux

1ページ目 / 全1ページ

solarlized の導入

Summary

solarlized を使って、tmux, vim, iTermのカラーリングを統一したい。

.vimrc

NeoBundle 'altercation/vim-colors-solarized'

set t_Co=256
syntax enable
colorscheme solarized
set background=dark

tmux

git clone git://github.com/altercation/solarized.git

.tmux.conf

source-file /path/to/repos/solarized/tmux/tmuxcolors-256.conf

iTerm

以下のファイルをインポート
/path/to/repos/solarized/iterm2-colors-solarized/Solarized Dark.itermcolors

[Preferences...] - [Profiles] - [Colors] - [Load Presets...] でカラースキームをインポートする。

dircolors

homebrew で dircolors と GNU lsをインストール

brew install coreutils
git clone git://github.com/seebi/dircolors-solarized

.zshrc

if [[ -x /usr/local/bin/gls ]]; then
	alias ls="gls --color=auto"
fi
if [[ -x /usr/local/bin/gdircolors ]]; then
	alias dircolors="gdircolors"
fi
if [[ -r /path/to/repos/dircolors-solarized/dircolors.256dark ]]; then
	eval `dircolors $HOME/repos/dircolors-solarized/dircolors.256dark`
fi

Reference

Solarized - Ethan Schoonover
http://ethanschoonover.com/solarized

GitHub - altercation/vim-colors-solarized
https://github.com/altercation/vim-colors-solarized

GitHub - seebi/dircolors-solarized
https://github.com/seebi/dircolors-solarized

powerline の導入

Summary

powerlineを使って、tmux, vim, iTermのステータスバーを統一したい。
iTermについては、文字化けを防ぐためにフォントにパッチを当てる必要がある。

準備

-- grep のインストール

brew tap homebrew/dupes
brew install homebrew/dupes/grep

powerline用フォントの作成

brew install fontforge
fontforge -script ~/.vim/bundle/powerline/font/fontpatcher.py SourceCodePro-Regular.otf

fontpatcher.py が作成したpowerline用フォントをインストール。

iTerm

[Preferences...] - [Profiles] - [Text] - [Change Font]で powerline用フォントを選択

.vimrc

NeoBundle 'alpaca-tc/alpaca_powertabline'
NeoBundle 'Lokaltog/powerline', { 'rtp' : 'powerline/bindings/vim'}

tmux

git clone https://github.com/erikw/tmux-powerline.git

.tmux.conf

set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/path/to/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/path/to/tmux-powerline/powerline.sh right)"

.tmux-powerlinerc

/path/to/repos/tmux-powerline/generate_rc.sh
/path/to/repos/tmux-powerline/segments/weather.sh: line 9: shell_is_bsd: command not found
Default configuration file generated to: $HOME/.tmux-powerlinerc.default
Copy/move it to "$HOME/.tmux-powerlinerc" and make your changes.

東京の天気予報を表示させる場合
Yahoo! Weather のURLを参照して天気予報を取得する
http://weather.yahoo.com/japan/tokyo-prefecture/tokyo-1118370/

export TMUX_POWERLINE_SEG_WEATHER_LOCATION="1118370"

Reference

GitHub - tmux-powerline
https://github.com/erikw/tmux-powerline.git

Qiita - Vim - powerlineをいつ使う? 今でしょ!
http://qiita.com/alpaca_taichou/items/ab70f914a6a577e25d70