-
Notifications
You must be signed in to change notification settings - Fork 0
/
screenrc
119 lines (91 loc) · 3.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
startup_message off
# ssh restoration
# screen 0
# # select 0
# exec $HOME/screen-ssh-agent
# exec true
# source $HOME/.ssh/screen_agent
vbell off
vbell_msg " --- !! Ding !! --- "
# Affects the copying of text regions
crlf off # default: off
# Change default scrollback value for new windows
defscrollback 16000 # default: 100
# Define the time that all windows monitored for silence should
# wait before displaying a message. Default 30 seconds.
silencewait 15 # default: 30
shell -$SHELL
# Make the spacebar show window list
bind ' ' windowlist -b
# Setup F* keys
bindkey -k k1 select 0
bindkey -k k2 select 1
bindkey -k k3 select 2
bindkey -k k4 select 3
bindkey -k k5 select 4
bindkey -k k6 select 5
bindkey -k k7 select 6
bindkey -k k8 select 7
bindkey -k k9 screen # new screen
bindkey -k k; detach # detach screen
bindkey -k F1 prev # previous window
bindkey -k F2 next # next window
# turn on the alternate screen so that quiting apps like vim
# restores the previous buffer state
altscreen on
hardstatus lastline "[%n] %t"
#hardstatus alwayslastline '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
#hardstatus alwayslastline '%{= kG}%-Lw%{= kW}%50> %n%f* %t%{= kG}%+Lw%< %{= kG}%-=%c:%s%{-}'
caption always '%{= .G}[%= %{= .w}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c:%s %{g}]'
shelltitle "$ | bash"
# XTERM TWEAKS
# ===============================================================
# xterm understands both im/ic and doesn't have a status line.
# Note: Do not specify im and ic in the real termcap/info file as
# some programs (e.g. vi) will not work anymore.
termcap xterm* 'hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l'
terminfo xterm* 'hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l'
# allow 256 colors
termcapinfo xterm* 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# 80/132 column switching must be enabled for ^AW to work
# change init sequence to not switch width
termcapinfo xterm* 'Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
# Make the output buffer large for (fast) xterms.
termcapinfo xterm* 'OL=10000'
# termcapinfo xterm* OL=100
# tell screen that xterm can switch to dark background
termcapinfo xterm* 'VR=\E[?5h:VN=\E[?5l'
# tell screen that xterm has function keys -- do not use!!!
#termcapinfo xterm* 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
#termcapinfo xterm* 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'
# special xterm hardstatus: use the window title.
termcapinfo xterm* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
# terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
termcapinfo xterm* 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'
# emulate part of the 'K' charset
termcapinfo xterm* 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'
# xterm-52 tweaks:
# - uses background color for delete operations
termcapinfo xterm* be
#####
# tell screen that you term can scroll
termcapinfo xterm* ti@:te@
# bind Shift+PgUp/PgDn
bindkey -m "^[[5;2~" stuff ^b
bindkey -m "^[[6;2~" stuff ^f
# Let's remove some dangerous key bindings ...
bind k
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h
# ... and make them better.
bind 'K' kill
bind 'I' login on
bind 'O' login off
bind '}' history
# help screen keep in touch with the ssh-agent socket
unsetenv SSH_AUTH_SOCK
setenv SSH_AUTH_SOCK $HOME/.screen/ssh-auth-sock.$HOSTNAME