2012年11月8日 星期四

screenrc

最近時常需要開啟多個 terminal 來測試程式執行狀況,所以 pietty 越開越多,桌面也越來越亂、難管理。近期在詢問學姊作業的事情時,看到學姊的 Ubuntu console,在一個畫面中可以切換到不同的 console,按按鍵就可以互相切換,就一直很有興趣。

找了幾天,用過 screen、tmux,screen 在預設的設定上相當簡陋,當初還以為不是這款,直到在 Google 搜尋到相關的 screenrc 檔後,才知道「這就是我尋找很久的程式!」

參考網頁:

  1. screenrc of Vim-like - 凍仁的 Ubuntu 筆記
  2. [Linux] screen教學與bindkey設定用法 - 雅砌工坊

我修改上面兩個 Blog 中所寫的 screenrc,保留部份自己要的功能。

startup_message off

caption always "%{=u .r} %-w%<%{=ub .Y}%n %t%{=u .r}%+w "
hardstatus alwaysignore
hardstatus alwayslastline "%{= .K} [%l]%<%=%{= .Y}$USER%{= .R}@%H %=%{= .m} %Y/%m/%d%{= .M} %0c "

defutf8 on
altscreen on
shelltitle '$ |bash'
vbell off

# bind F9 to create a new screen
bindkey -k k9 screen
# bind F10 to kill current screen window
bindkey -k k; kill
# bind F11 to move to previous window
bindkey -k F1 prev
# bind F12 to move to next window
bindkey -k F2 next

沒有留言:

張貼留言