( ゚皿゚)

( ゚皿゚)

screenとscreenrcを弄った

りっくんに書けといわれたので書いた。
自宅鯖はDELL SC440でディストリはubuntu hardytiarra、TIG、keitairc等が動作しておりオペレーションの主目的はアニメ動画ファイルの栽培や変換など。
モバイル回線等から頻繁に接続する用途上screenを導入したわけだが、カスタマイズが大体固まったので晒しておくことにする。

screenrc 設定とかでぐぐって出てくるサイトやエントリを片端から参考にした。基本的なscreenの使い方とかは説明しないので適当にぐぐれ。

まずは.screenrcと.screen-setting。

~/.screenrc

source $HOME/.screen-setting
bind . source $HOME/.screen-setting
bind ^. source $HOME/.screen-setting

chdir $HOME
screen -t ~ 0
chdir $HOME/share/movie
screen -t movie 1
chdir $HOME/share/movie
screen -t movie 2
chdir $HOME/share/movie
screen -t w3m 3 w3m "東京図書館/?cat=7"
screen -t irssi 4 irssi
chdir $HOME/log
screen -t log 5
chdir $HOME/.gmailreader
screen -t gmail 6 gmailreader.py
chdir $HOME/share
screen -t share 7

画面1~3がアニメ栽培用。4がIRC、5がIRCのログ検索用、6はgmailreader。gmailreaderについては後で書くかも。

~/.screen-setting

escape ^t^t
defencoding utf-8
encoding utf-8 utf-8
hardstatus alwayslastline "[%02c] %-w%{=b bw}%n %t%{-}%+w"
startup_message off
autodetach on
vbell off
defscrollback 3000
nethack on

bind s
bind n next
bind ^n next
bind p prev
bind ^p prev
bind ^a other
bind a other

bindkey ^j next
bindkey ^k prev

bindkey ^y split
bindkey ^u focus
bind ^o only
bind o only

#bind r eval 'echo "Resize window"' 'command -c resize'
#bind ^r eval 'echo "Resize window"' 'command -c resize'
bindkey ^r eval 'echo "Resize window"' 'command -c resize'
bind -c resize ^] command
bind -c resize j eval 'resize +1' 'command -c resize'
bind -c resize k eval 'resize -1' 'command -c resize'

キーバインドとかの設定。nとpはなんかやってたらうっかり消えたので追加してあるだけ。
bindでescapeの後のキーを設定、bindkeyで直接キーバインドを割り当てられる。
commandというのは理解していないが、splitのリサイズモードはどこかからパクって来た。
C-j,kでscreenの画面移動、C-yで上下分割、C-uで分割した画面間の移動、C-r後j,kで分割画面サイズ変更。正直emacs使いなどはいろんな所にバインドがかぶるだろうが俺は使っていないので知らん。


大体常にこんな感じで使っている。

いもすたのpocketputtyでの環境。ここまでやるとただのアホ。