forked from nathasm/dotfiles_old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screenrc
444 lines (428 loc) · 14.6 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# ===============================================================
# File: $HOME/.screenrc
# Purpose: Setup file for program "(GNU) screen"
# written by: Nathan Smith <[email protected]>
# Latest update: Fri Nov 28 08:00:00 EST 2002
# Length and size: 442 lines and about 17 kilobytes
# ===============================================================
#
# ===============================================================
# SEE ALSO:
# ===============================================================
# SCREEN Pages:
# http://www.math.fu-berlin.de/~guckes/screen/
#
# Commands List (from the manual to screen-3.7.6):
# http://www.math.fu-berlin.de/~guckes/screen/commands.txt
#
# MailingList:
# http://www.math.fu-berlin.de/~guckes/screen/mail.php3
# http://www.yahoogroups.com/group/gnu-screen/
#
# ===============================================================
# ESCAPE - the COMMAND CHARACTER
# ===============================================================
escape ^aa # default
# escape ^ee # default
# escape ^pp # suggested binding for emacs users
#
# ===============================================================
# STARTUP of programs in an extra window:
# ===============================================================
# Uncomment one/some following lines to automatically let
# SCREEN start some programs in the given window numbers:
# screen -t MAIL 0 mutt
# screen -t EDIT 1 vim
# screen -t GOOGLE 2 links http://www.google.com
# screen -t NEWS 3 slrn
# screen -t WWW 4 links http://www.math.fu-berlin.de/~guckes/
#
#
# ===============================================================
# VARIABLES - Boolean values (on/off)
# ===============================================================
autodetach on # default: on
crlf off # default: off
deflogin off # default: on
# defsilence off # default: off
hardcopy_append on # default: off
# nethack on # default: off
startup_message off # default: on
# termcap xterm 'AF=\E[3%dm:AB=\E[4%dm'
# terminfo xterm 'AF=\E[3%p1%dm:AB=\E[4%p1%dm'
termcapinfo linux "ve=\E[?25h\E[?17;0;64c" # red
termcapinfo xterm* ti@:te@ # Attempted to get scrollback but didn't seem to work
#termcapinfo xterm*|Eterm|mlterm 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'
#defhstatus "screen ^E (^Et) | $USER@^EH"
#hardstatus off
vbell off # default: ???
vbell_msg off
# escape ^]]
# emulate .logout message
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
#
# ===============================================================
# VARIABLES - Number values
# ===============================================================
defscrollback 10000 # default: 100
# msgminwait 3 # default: 1
silencewait 15 # default: 30
#
# ===============================================================
# VARIABLES - Paths and Files (esp. programs)
# ===============================================================
# bufferfile: The file to use for commands
# "readbuf" ('<') and "writebuf" ('>'):
# bufferfile $HOME/.screen_exchange
#
# hardcopydir: The directory which contains all hardcopies.
# hardcopydir ~/.hardcopy
# hardcopydir ~/.screen
#
# shell: Default process started in screen's windows.
# Makes it possible to use a different shell inside screen
# than is set as the default login shell. Halleluja! :-)
shell /bin/zsh
# ===============================================================
# VARIABLES - Strings
# ===============================================================
#
# ===============================
# Hardstatus Line and sorendition
# ===============================
# hardstatus: Always show the window list in the last line:
# hardstatus alwayslastline "%w"
# hardstatus alwayslastline "%H %w"
#
# This will show the current time and today's date in YYmmdd, too:
# hardstatus alwayslastline " %c | %m/%d | %Lw"
# Black background, white for active windows, red for inactive ones
hardstatus alwayslastline "%{= kg}%c | %{ky}%M %d | %{kr}%?%-Lw%?%{kw}%n*%f %t%?(%u)%?%{kr}%?%+Lw%?"
# hardstatus alwayslastline "%{= kg}%c | %{ky}%M %d | %{= kr}%-Lw%{= rk}%50>%n%f* %t%{= kr}%+Lw%<"
#caption always '%{-b}%{= wb}%-Lw%{= wr}%50>%{+b}%n%f %t%{= wb}%{-b}%+Lw%{= wr}%-017= %c %Y-%m-%d'
#caption always "%{+b rk}%H%{gk} %c %{yk}%d.%m.%Y %?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%? "
#caption always "%{+b rk}%H%{gk} |%c %{yk}%d.%m.%Y | %{rw}%n%f %t %{bk} | %?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%? | %{rk} Load: %l %{wk}"
# This has a blue background with yellow letters for inactive windows, swapped for active ones
# hardstatus alwayslastline "%{BG}%c | %{BY}%M %d | %{= BY}%-Lw%{= YB}%50>%n%f* %t%{= BY}%+Lw%<"
#
# Colorize the "messages" and "text marking":
# Example: Blue bg, white fg
# sorendition 10 99 # default!
# sorendition 02 40 # green on black
sorendition 02 34 # yellow on blue
#
# ============================
# Password
# ============================
# password SZnBqiqMtfa6k
# Do NOT remove the comment if
# you don't know what this does!
# (TODO describe the effect - obviously)
#
# ===============================================================
# Messages
# ===============================================================
# There are two kinds of messages: "activity" and "bell"
# They are also the names of the commands that set the
# respective messages. In every message there can be "meta
# strings" which are replaced by values. A meta string starts
# with a percent sign and is then followed by one of the
# following letters: aAdDmMnstwWyY The meta strings refer to
# the current date and time or to a window title or number:
# %t - title
# %n - number (a single % still works)
# %d - day
# %D - weekday name
# %m - month
# %M - month name
# %y - year (2 digit)
# %Y - year (4 digit)
# %w - hour:minutes (24h format)
# %W - hour:minutes (12h format)
# %s - seconds
# %a - am/pm
# %A - AM/PM
# Older versions of screen used a single '%' character
# for window titles - but since version 3.7 this is
# obsoleted by '%n' and will vanish in future releases!
# So please update your screenrc to meet this convention!
#
# ===============================================================
# "~" stands for the "bell" character
#
# activity: This message *includes* a "beep" with '~'.
activity "activity in %n (%t) [%w:%s]~"
#
# bell: This message *includes* a "beep" with '~'.
bell "bell in %n (%t) [%w:%s]~"
#
# pow_detach_msg: Message shown when session
# gets power detached.
pow_detach_msg "BYE"
#
# vbell_msg: Message shown when the
# "virtual bell" rings.
vbell_msg " *beep* "
#
# ==============================================================
# BIND bind - defaults
# ==============================================================
# The "bind" command assign keys to (internal) commands
# SCREEN checks all the keys you type; you type the key
# which is known as the "command character" then SCREEN
# eats this key, too, and checks whether this key is
# "bound" to a command. If so then SCREEN will execute it.
#
# The command "bind" allows you to chose which keys
# will be assigned to the commands.
#
# Some commands are bound to several keys -
# usually to both some letter and its corresponding
# control key combination, eg the command
# "(create) screen" is bound to both 'c' and '^C'.
#
# The following list shows the default bindings:
#
# break ^B b
# clear C
# colon :
# copy ^[ [
# detach ^D d
# digraph ^V
# displays *
# dumptermcap .
# fit F
# flow ^F f
# focus ^I
# hardcopy h
# help ?
# history { }
# info i
# kill K k
# lastmsg ^M m
# license ,
# log H
# login L
# meta x
# monitor M
# next ^@ ^N sp n
# number N
# only Q
# other ^X
# pow_break B
# pow_detach D
# prev ^H ^P p ^?
# quit \
# readbuf <
# redisplay ^L l
# remove X
# removebuf =
# reset Z
# screen ^C c
# select " '
# silence _
# split S
# suspend ^Z z
# time ^T t
# title A
# vbell ^G
# version v
# width W
# windows ^W w
# wrap ^R r
# writebuf >
# xoff ^S s
# xon ^Q q
# ^] paste .
# - select -
# 0 select 0
# 1 select 1
# 2 select 2
# 3 select 3
# 4 select 4
# 5 select 5
# 6 select 6
# 7 select 7
# 8 select 8
# 9 select 9
# I login on
# O login off
# ] paste .
#
# FAQ: So many keys are bound to some command already -
# which keys are unbound yet? Which are free for binding?
# A: SCREEN does not have a command to show you
# a table of currently unbound keys - sorry!
# You simply have to read this setup file. ;-)
#
# Summary: Here is a table of the keys
# which are not bound by default:
# unbound: -B--E-G--J-L---P-R-TUV--Y-
# bound: A-CD-F-HI-K-MNO-Q-S---WX-Z
#
# And here are the default bind commands if you need them:
#
# bind A title
# bind C clear
# bind D pow_detach
# bind F fit
# bind H log
# bind I login on
# bind K kill
# bind L login
# bind M monitor
# bind N number
# bind O login off
# bind Q only
# bind S split
# bind W width
# bind X remove
# bind Z reset
#
# I suggest that you don't change the bidnings for
# 'H' ("log") and 'M' ("monitor") as they are really
# useful and you might want to use them a lot;
# in this case it is recommended to use
# the defaults to avoid confusion.
# personally, I use 'A' ("title") quite often, too.
#
# If you are using "split windows" already
# (this is not available in the latest user release yet)
# then you will also use the command
# associated with the keys FQSX a lot, too -
# so don't change their bindings!
#
# Anyway, I have bound the unbound uppercase letters
# to start programs in windows directly, ie without
# starting a new window with a shell within first.
# This simply saves shells and thus saves RAM -
# and also avoids that the title of a windows is
# the name of your shell. Also, you need not "exit"
# from a shell when you are done with some program:
#
# ==============================================================
# BIND and the Services:
# ==============================================================
# I am using the uppercase letters to start programs/services:
#
# bind A title # default!
#
# GOOGLE - Web Search Engine
bind G screen -t 'Google' lynx www.google.com
#
# IRC - International Relay Chat
bind I screen -t 'irc' 5 irssi
# bind I screen -t 'icq' 9 micq
# see also: http://www.math.fu-berlin.de/~guckes/irc/
#
## bind K kill # default!
bind K
# This *removes* the binding for 'K'
# thus requireing you to enter the
# command via the command line, ie ":kill".
# This prevent accidental killing of your windows.
# Old versions of SCREEN do not prompt for
# confirmation on "killing a window", you see..
#
# bind M monitor # default!
#
# Paste - use 'P' instead of ']':
bind P paste .
# bind ] paste . # default!
#
# VIM - editor
# bind V screen -t 'vim' 0 vim
# Editing comes with email quite naturally -
# so I have reserved window #1 for this.
#
# W - Webster
# bind W screen -t WEBSTER 4 links http://www.m-w.com/
#
# X - a fast way to lock the current screen.
# bind X lockscreen
#
# ===============================================================
# BIND Examples:
# ===============================================================
# You can also paste the values of
# SCREEN's environment variables:
# bind E stuff $EMAIL
# bind U stuff $URL
# bind I stuff $ICQ
#
# ===============================================================
# BINDKEY:
# ===============================================================
# [TODO briefly explain the difference between BIND and BINDKEY]
#
# Use the function keys F7 and F8
# to cycle backwards/forwards in
# the list of existing windows:
#bindkey -k k7 prev
#bindkey -k k8 next
#
# make the "kb" send a backspace (CTRL-H:)
# bindkey -d kb stuff ^H
# WARNING: this does not work as advertised.
# it eats the "kb" when typing "dankbar" for example. :-(
#
#
# ===============================================================
# Key bindings (TODO)
# ===============================================================
# Remove some default key bindings by binding
# them to "nothing" (empty right-hand-side):
#
# bind . dumptermcap # default
bind .
# bind ^\ quit # default
bind ^\
# bind \\ quit # default
bind \\
# bind h hardcopy # default
# bind h
# bind ^h ??? # default
# bind ^h
# bind } history # default
# bind }
#
#
# ===============================================================
# 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
#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
# tell screen that xterm can switch to dark background and has function
# keys.
#termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
#termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
#termcapinfo xterm 'kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:kP=\E[H: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
# ===============================================================
# At the very end... show the current version and say hello :-)
# ===============================================================
# Briefly show the version number of this starting
# screen session - but only for *one* second:
msgwait 1
# version
# change back to showing messages
# for duration of two seconds:
msgwait 2
termcapinfo xterm ti@:te@
termcapinfo xterm*|Eterm|mlterm 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'