これはその1〜導入編〜、その2〜設定ファイルについて〜の続きです。
defbce on
attrcolor b ".I"
term xterm-256color
termcapinfo xterm-256color 'is=^[r^[m^[2J^[H^[?7h^[?1;4;6l'
defscrollback 1000
altscreen on
escape ^Zz
vbell off
bell_msg "Bell in window %^G"
autodetach on
shell $SHELL
startup_message off
logfile "$HOME/.screen/screen-%Y%m%d-%n.log"
deflog on
shelltitle '$ |bash'
caption always "%{= Rk} %?%F%{b kr}%? %?%h%:%t (screen #%n)%? %{-}"
hardstatus alwayslastline "%{= Gk} %-Lw%40L>%{b kg} %n %t %{-}%+Lw%-040=%{b km} %l %{.b} %Y/%m/%d %C:%s %A "
sorendition "= Rk"
では一番難解なcaptionとhardstatusの解説だ。そもそもcaptionとhardstatusの違いは何か。
いろいろ理屈はあるが、これだけ覚えておけばいい1。
caption => 各ウィンドウに一つずつ hardstatus => 全体で一つだけ
まずはcaptionから説明しよう。