-
Notifications
You must be signed in to change notification settings - Fork 0
/
.screenrc
executable file
·128 lines (107 loc) · 4 KB
/
.screenrc
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
##############################################################################
#
# Filename: screenrc
# Version: 1.0
# Created: 05/12/2011 06:45:02 AM
# Revision: none
# Compiler: g++
#
# Author: Zhenbin Wu (), [email protected]
# Company: Baylor University, CDF@FNAL
#
# Description: This is my screenrc edited upon /etc/screenrc and lots of
# good ideas from the internet.
#
##############################################################################
# ------------------------------------------------------------------------------
# SCREEN SETTINGS
# ------------------------------------------------------------------------------
# Kill the startup message
startup_message off
# turn visual bell on
vbell off
# define a bigger scrollback, default is 100 lines
defscrollback 10000
#defflow on # will force screen to process ^S/^Q
deflogin off
# Automatically detach on hangup
autodetach on
# use tcsh shell as default shell
shell tcsh
shelltitle '> |tcsh'
# Enable non-blocking mode to better cope with flaky ssh connections.
nonblock 5
# Enable non-blocking mode to better cope with flaky ssh connections.
defutf8 on
altscreen on
# ------------------------------------------------------------------------------
# SCREEN KEYBINDINGS
# ------------------------------------------------------------------------------
escape z
bind s split
bind v split -v
bind V version
bind q only
bind a title
bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
bind } resize +4
bind { resize -4
bind g select 10
bind j select 11
bind ; select 12
bind / windowlist -b
bind eval split focus next
bind x eval split focus next
bind lockscreen
# control + left; previous screen window
#bindkey ^[[1;5D focus left
bindkey ^[[1;5D prev
# control + right; next screen window
#bindkey ^[[1;5C focus right
bindkey ^[[1;5C next
# control + up; previous split screen
bindkey ^[[1;5A focus up
# control + down; next split screen
bindkey ^[[1;5B focus down
# ------------------------------------------------------------------------------
# TERMINAL Display
# ------------------------------------------------------------------------------
backtick 0 0 0 sh -c 'screen -ls | grep --color=no -o "$PPID[^[:space:]]*" | cut -f 2 -d. '
backtick 1 300 300 $HOME/.screen/gcalendar
backtick 2 300 300 $HOME/.screen/mail
backtick 3 90 90 $HOME/.screen/load
backtick 4 2 2 $HOME/.screen/host
# turn sending of screen messages to hardstatus off
hardstatus off
# use this for the hard status string
# It seems the maximum changes of color is 16 in GNU screen
# The backtick only executes when the screen is attached.
hardstatus string "%0`@%H : %t"
## Set the caption
caption always
caption string '%{= kg}[ %{m}%0`%{g}@%4` %3` %{g}]%2`[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{C} %m/%d %{W}%0c %1`%{g}]'
#caption string '%{= kg}[ %{m}%0`%{g}@%H %3` %{g}]%2`[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{C} %m/%d %{W}%0c %1`%{g}]'
# emulate .logout message
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
# Make screen messages stand out a little more - black on bright green.
sorendition "+b kc"
# ------------------------------------------------------------------------------
# SCREENS CONTROL
# ------------------------------------------------------------------------------
blankerprg $HOME/.screen/idle
idle 600 blanker
# ------------------------------------------------------------------------------
# Enable 256 color support for xterm
# https://wiki.archlinux.org/index.php/GNU_Screen#Use_256_colors
# ------------------------------------------------------------------------------
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# use current bg color for erased chars
defbce on
windowlist string "%{r}%3n%{d} %t%=%f "
windowlist title "%{b}%H %{w}[ %l ] %= %{g}%Y %M %d, %c"