0. Motivation
最近在服务器上用screen
发现如果采用默认的设置,ctrl+a+c创建窗口之后,没有窗口的标识
非常难分辨
所以打算抄一个好用的设置
1. Screen config
首先找到screen的配置文件 .screenrc
一般是 $HOME/.screenrc
如果没有的话,可以创建一个
首先进入$HOME
然后创建
然后打开
写入以下内容
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
defutf8 on
defencoding utf8 encoding utf8 utf8
shell -$SHELL
startup_message off
termcapinfo xterm|xterms|xs ti@:te=\E[2J
defscrollback 10000
hardstatus on caption always "%{= kw}%-w%{= kG}%{+b}[%n %t]%{-b}%{= kw}%+w %=%d %M %0c %{g}%H%{-}"
vbell off
bindkey ^[z prev
bindkey ^[x next
bindkey "^[`" select 0 bindkey "^[1" select 1 bindkey "^[2" select 2 bindkey "^[3" select 3 bindkey "^[4" select 4 bindkey "^[5" select 5 bindkey "^[6" select 6 bindkey "^[7" select 7 bindkey "^[8" select 8 bindkey "^[9" select 9 bindkey "^[0" select 10 bindkey "^[-" select 11 bindkey "^[=" select 12
bindkey -k k5 screen
bindkey -k k6 detach
bindkey -k k7 kill
bindkey -k k8 title
|
最后创建一个新的后台就可以看到效果了