自分用メモ。
screenでは複数windowを開いていますが、最近なんとなく開く数が決まってきたので、最初から開いておくようにしました。瀧内さんは以前8つ開いてるって言ってたので(!)、私の6つなんか かわいいものなハズ。
###windowの役割
現在のメインプロジェクトはブログなので、それをベースに以下の5つを開いています。
- 0 emacs, エディタ
- 1 shell
- 2 tail -f log/development.log
- 3 script/console
- 4 同時進行のプロジェクト: folked prawn.git
- 5 railsのdir ソースを読むのに使う
###2008.10.03の.screenrc
他の人よりはショボショボなのですが、ご愛敬ということで。
emacsclientを使っているので、emacsはフルパスで書いています。
rails>>
escape ^tt
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w"
scrollback 4000
vbell off
#idle 1200
#blankerprg /usr/local/bin/tss
chdir "/home/hibi/blog.git" #メインのprojectに移動
#screen -t emacs 0 /usr/bin/emacs #emacs 21.4
screen -t emacs 0 /usr/local/bin/emacs
screen -t bash 1
stuff "ruby ./script/server -d" #開いたwindowにこのコマンドだけ入力しとく、実行してもいいのですが実行したくない時も多いので
screen -t tail 2 tail -f log/development.log
screen -t console 3 ruby ./script/console
chdir "/home/hibi/my.prawn.git"
screen -t prawn 4 #前の行でcdしてからwindowを開く
chdir "/home/hibi/test/vendor/rails/actionpack/lib/action_controller"
screen -t rails 5
chdir "/home/hibi/blog.git" #以後開くすべてのwindowをblog.gitにするため
select 1 #window1を選択
<<--
###Refs
http://www.limy.org/program/screen_command.html:日本語リファレンス
http://www.pervasivecode.com/blog/2007/06/12/gnu-screen-and-my-screenrc/
http://technique.sonots.com/?UNIX/設定、設定ファイル/.screenrc