-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.screenrc
More file actions
137 lines (101 loc) · 3.6 KB
/
.screenrc
File metadata and controls
137 lines (101 loc) · 3.6 KB
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
129
130
131
132
133
134
135
136
137
# -*- shell-script -*-
# set the official command prefix to C-\ *not* C-a!
escape ^\\
# ...however, i'll use F1 instead
bindkey -k k1 command
# F2 or F12 enters copy mode
bindkey -k k2 copy
bindkey -k F2 copy
# pgup enters copy mode and scroll up a full page
# ...nevermind, this interferes with using pgup in other apps like less
#bindkey -k kP eval copy "stuff \033[5"
bindkey ^[[5;3~ eval copy "stuff ^U"
# F1 C-d *doesn't* detach
bind ^D
# C-g, C-c, backspace quit command mode
bind ^g fit
bind ^c fit
bind ^? fit
# C-0 through 2 switch to those windows. (never mind, this collides with a
# few emacs keybindings.)
# bind ^0 "select 0"
# bind ^1 "select 1"
# bind ^2 "select 2"
# use my tcsh build
#shell ${HOME}/bin/tcsh
shell /bin/bash
# don't pause for each screen message
msgminwait 0
# no flow control, e.g. ^S and ^Q
defflow off
# don't tell me when bells happen in other windows
vbell off
bell_msg ""
# advertise hardstatus support
termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'
#hardstatus lastline string "[screen %n%?: %t%?] %h"
caption always "[screen %n%?: %t%?] %h"
# Ensures my term can send width changes
# # "You must specify Z0 and Z1 in your termcap to use the width-changing commands."
termcapinfo xterm is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l
defscrollback 32768
setenv DISPLAY :0.0
# Bind Control-PageDown to 'next', Control-PageUp to 'prev'
# to navigate between windows
bindkey ^[[5;5~ prev
bindkey ^[[6;5~ next
bindkey ^[[5^ prev
bindkey ^[[6^ next
# Bind arrow keys Control-Down to 'next', Control-Up to 'prev'
# to navigate between windows
bindkey ^[[1;5A prev
bindkey ^[[1;5B next
#################
# copy mode stuff
#################
# emacs keybindings for navigation in copy mode
markkeys ^B=Y:^F=V:h=^B:l=^F:0=^A:$=^E
# C-g and other keys quit copy mode. Esc does nothing.
markkeys \033=\015=^G=^D=h=j=k=l=H=M=L=G=g=y=c=v=a=x=b=e=B=E=w
markkeys @=\033
# special hack for C-e, since it should go *past* the last char.
# (-m means this is for copy mode only.)
bindkey -m ^e stuff "\$^f"
# page up and page down
bindkey -m -k kP stuff Y
bindkey -m -k kN stuff V
# C-space sets mark. markkeys does it in screen 4.0 and higher, but 3.9x
# needs the bindkey command. (note the ^@ escape sequence for C-space.)
markkeys ' '=^@
# bindkey -m ^@ stuff ' '
# fruitless attempt to make C-space do the right thing in i-search too
# bindkey -m ^@ eval "stuff \033" "stuff ^@"
# copy word under point. (disabled since it overrode typing w in isearch :P)
# markkeys W=w
# control arrows move by words. (set B, e, and w to F keys so that i can use
# them to move by words, but they themselves still quit copy mode.)
markkeys B=[:E=]:b={:e=}:w=>
bindkey -m ^[Od stuff { #"[[}"
bindkey -m ^[Oc stuff ] #"}]^f"
bufferfile "/home/jon/.screen-buffer"
# M-w copies region, W escapes out of i-search and copies word. afterward,
# synchronize the paste buffer with the X selection.
#bindkey -m \033w eval "stuff ' '" writebuf "exec sh -c 'xsel -n < /home/jon/.screen-buffer' 'stuff ^C'"
bindkey -m \033w eval "stuff ' '" writebuf "exec sh -c 'xsel -ip < /home/jon/.screen-buffer' 'stuff ^C'"
# evidently only C-g, Esc, and C-space break out of i-search. so, use
# C-space, because with my setup, it doesn't break out of copy mode too.
# markkeys "^ =^u"
bindkey -m W eval "stuff \033W" writebuf "exec sh -c 'xsel -ip < /home/jon/.screen-buffer' 'stuff ^C'"
# make search case-insensitive
ignorecase on
###############
# session setup
###############
screen /bin/bash # window 0
screen /bin/bash # window 1
screen /bin/bash # window 2
screen /bin/bash # window 3
screen /bin/bash # window 4
screen /bin/bash # window 5
select 0
fit