設定 GNU 螢幕背景顏色

設定 GNU 螢幕背景顏色

我希望螢幕在啟動時更改終端(xterm)的背景顏色。

我想有一種快速的方法來確定我是否在螢幕中。我經常在 shh 上工作,它經常崩潰。我開始使用螢幕,以免失去我的工作。但是,當我 ssh 到機器時,我不希望螢幕自動啟動,因為我可能想screen -list要這樣做screen -r。因此,我需要一些東西來提醒我,我不在螢幕上,如果連接中斷,我的工作(尤其是正在運行的應用程式)可能會丟失。

我有 xterm 並且使用ssh -XY,如果相關的話。

答案1

這不會改變背景顏色,但我有一個 screenrc 文件,它將在底部放置一個狀態行,當您在螢幕中時,它會很明顯:

要點:https://gist.github.com/cwacek/5724875

# Turn off that annoying start up message
startup_message off

# Turn the even more annoying whole-screen-flash-on-tab-complete "feature"
vbell off

terminfo xterm-color hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l
term xterm-color

# Window list at the bottom. hostname, centered tabs and redmarked active windows:
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'

相關內容