Source

dotfiles / screenrc

The default branch has multiple heads

Full commit
  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
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# =========================================================================
# File:               $HOME/.screenrc
# Purpose:            Setup file for program "(GNU) screen"
# written by:         Sven Guckes <guckes-screen@math.fu-berlin.de>
# Last update:        Sun Aug 05 03:49:02 MEST 2001
# Latest version:     screen-3.9.9 [010525]
# For more info see   http://www.math.fu-berlin.de/~guckes/screen/
# SCREEN MailingList: http://www.yahoogroups.com/group/gnu-screen/
# =========================================================================
#
# Boolean variables
#
  autodetach            on              # default: on
  crlf                  off             # default: off
#  deflogin              on              # 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'
  vbell                 off             # default: ???
#
# =========================================================================
# Numerical settings
#
  #defscrollback         1000            # default: 100
# msgminwait            3               # default: 1
  silencewait           15              # default: 30
#
# =========================================================================
# 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.
shell                 zsh
# shell                  bash
# shell                 ksh
#
# =========================================================================
# Strings
# =========================================================================
#
# ===============================
# Hardstatus Line and sorendition
# ===============================
# hardstatus: Always show the window list in the last line:
#  hardstatus alwayslastline "%w"
#
# This will show the current time and today's date in YYmmdd, too:
# hardstatus alwayslastline " %c | %Y%m%d |  %w"
#
# This will show today's date in mmdd and the current time, too:
 #hardstatus alwayslastline " %H %m%d %c |  %w"
 #hardstatus alwayslastline " %H %l |  %w"
#
# Same as the previous - but with COLOR! :-)
#hardstatus alwayslastline "\033[m\033[42;30m %m%d \033[m \033[42;30m%c\033[m \033[42;30m %w \033[m"
#hardstatus alwayslastline " %m%d \033[42;30m%c\033[m \033[42;30m %w \033[m"
#hardstatus alwayslastline " %m%d %c \033[42;30m %w \033[m"
#
# 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
#
# =========================================================================
# 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* "
#
# =========================================================================
# Key bindings
#
# Remove some default bindings:
# bind k kill # default
# bind k
#
# bind .  dumptermcap # default
# bind .
# bind ^\ quit # default
# bind ^\
# bind \\ ??? # default
# bind \\
# bind ^h ??? # default
# bind ^h
# bind h  hardcopy
# bind h
# bind \\ quit
# bind \\ quit
# bind K  kill
# bind K
# bind I  login on
# bind I
# bind O  login off
bind O only
# bind }  history
# bind }
#
# NOTE: This overrides the default binding of the hardcopy command!
#bind H screen -t HeiseTicker links www.heise.de
#
# paste:  default binding:
# bind ] paste .
# The character ']' is hard to type on german keyboards,
# I prefer to use 'P' for "paste" because it is a letter
# and thus available at the same position both with the
# US keyboards and Krautboards. :-)
  bind P paste .
#
  bind ~ activity       "activity in %n (%t) [%w:%s]~"
  bind * activity       "activity in %n (%t) [%w:%s]"
# bind ~ bell           "activity in %n (%t) [%w:%s]~"
# bind * bell           "activity in %n (%t) [%w:%s]"
#
#
# =========================================================================
#
#   Summary: Unbound uppercase letters
#   which are not bound by default:
#   BEFGIJKLNOPQRSTUVXYZ
#
# I am using the uppercase letters to start programs/services:
#
# Services:
#
# FTP - File Transfer "Program"
# see also:  http://www.math.fu-berlin.de/~guckes/ncftp/
# bind F screen -t 'ftp' 9 ncftp
#
# IRC - International Relay Chat
# see also:  http://www.math.fu-berlin.de/~guckes/irc/
# bind I screen -t 'irc'  5 irc
# bind I screen -t 'icq'  9 micq
#
# LYNX - web browser
# see also:  http://www.math.fu-berlin.de/~guckes/lynx/
#
# MUTT - Mail User Agent
# window #0 - as I read news quite often.
# see also:  http://www.math.fu-berlin.de/~guckes/mutt/
  setenv COLORFGBG "default"
  #bind E screen -t 'mail' 1 env COLORFGBG="default;default" TERM=xterm-color COLORTERM=rxvt mutt
# I don't use these, but maybe I should some day ... -MJT
# bind E screen -t 'mutt' 1 mutt
# bind T screen -t 'thesis' 0 zsh --login $HOME/.screen/run_thesis.sh
# bind m screen -t 'papernotes' 1 /usr/local/bin/cire -n ~/Documents/papers/paper_notes.cire
# bind I screen -t 'iyt' 2 zsh --login $HOME/.screen/run_iyt.sh
# bind Y screen -t 'eyt' 3 zsh --login $HOME/.screen/run_eyt.sh
#
# NN - newsreader
# see also:  http://www.math.fu-berlin.de/~guckes/nn/
#
# SLRN - newsreader
# see also:  http://www.math.fu-berlin.de/~guckes/slrn/
#
# VIM - editor
# window #0 - as I am almost always editing.
# http://www.math.fu-berlin.de/~guckes/vim/
# http://www.vim.org/
  bind V screen -t 'vim' 0 vim
#
#      X - a fast way to lock the current screen.
#  bind X lockscreen
#
# Echo URL for home page
# This will paste the address of my homepage to the process
# in the current window.  very nice - saves some typing.
# bind Y exec !!! echo -n http://www.math.fu-berlin.de/~guckes/
#  bind Y stuff http://www.math.fu-berlin.de/~guckes/
#
# =========================================================================
# EXAMPLES:
# You can paste the values of environment variables from with SCREEN:
# bind E stuff $EMAIL
# bind U stuff $URL
# bind I stuff $ICQ
# =========================================================================
#
# =========================================================================
# TEST
# bind I login on
# bind O login off
# =========================================================================
# Command list for screen-3.7.6 [981125]:
# =========================================================================
# A note about the notation of commands:
# The character '|' mean the logical operator 'or'.  Therefore "on|off" means
# "'on' or 'off'" where "on" and "off" are literal strings (sequences of
# characters).  Btw, many commands just switch some value between "on" and
# "off".  These commands are called "toggles".  Toggle commands can usually
# be used without a parameter and will invert ("toggle") the value.
# Therefore the description contains the values in square brackets,
# thus making them "optional".
# Words in angle brackets however are *variables*
# which require to be replaced by a value;
# Examples:
# <args>        "arguments" - arguments/parameters of a Unix command.
# <cmd>         "command" - a Unix command.
# <key>         Any key from the keyboard,   eg 'a'.
# <permbits>    Permission bits (see manual).
# <string>      A sequence of characters,    eg "k1".
# <username>    The name of a Unix username, eg "guckes".
# <xy>          A sequence of two characters, eg "^aa" (CTRL-A and 'a').
# And to make it even more confusing - variables can be optional, too:
#       [<variables>]
# Actually, this makes commands much more verstile.  :-)
#
# Numerical variables sometimes take
# the (abbreviated) name of its meaning, eg
# <n> or <num> for number, <limit> or <lines>.
#
# Some of the variable names are pretty informal
# and lack a good description:
# <crypted_pw>, <message>
# 
# ===============================================================
# BEGIN of command list
# ===============================================================
# 
# acladd <usernames>
# aclchg <username> <permbits> <list>
# acldel <username>
# acldel does not allow a list of usernames?
# activity <message>
# allpartial [on|off]
# at [identifier][#|*|%] command [args ... ]
# autodetach [on|off]
# autonuke [on|off]
# bell <message>
# bind <key> [command [args]]
# bindkey [-d] [-m] [-a] [[-k|-t] <string> [<cmd> <args>]
# break [<duration>]
# bufferfile [exchange-file]
# c1 [on|off]
# charset <set>
# chdir [<directory>]
# clear
# colon [<prefix>]
# The manual does not tell you what the "prefix" is for.  :-(
# command
# console [on|off]
#"console on" just tells me "don't know how to grab console".  :-(
# copy
# "copy" enters the copy mode - one of the most useful things with screen.
# It allows you to access the current window and its scrollback buffer,
# search for some text and copy it to the default buffer.  You can then
# put its contents into a file or paste it into another window.  Great!
# copy_reg [key]
#'copy_reg' "No longer exists, use "readreg" instead!"
# crlf [on|off]
#'crlf' gives no visible feedback.  Bad!
# debug on|off
#
# "def" commands - they set "default values" for further windows:
# defautonuke [on|off]
# defc1 [on|off]
# defcharset [<set>]
# defescape <xy>
# defflow on|off|auto [interrupt]
# defgr [on|off]
# defhstatus [<status>]
# defkanji [jis|sjis|euc]
# deflogin [on|off]
# defmode <mode>
# defmonitor [on|off]
# defobuflimit <limit>
defscrollback 2000
# defwrap [on|off]
# defwritelock on|off|auto
# defzombie <[keys>]
#'defzombie' -> "unknown command 'defzombie'".  Not implemented, maybe?
#
# detach
# digraph [<preset>]
# dumptermcap
# echo [-n] <message>
# escape <xy>
# exec [[fdpat] newcommand [args ...]]
# I need some more examples for 'exec' - send them!
#
# flow [on|off|auto]
# gr [on|off]
# hardcopy
# hardcopy_append [on|off]
# hardcopydir <directory>
# hardstatus [on|off]
# height [<lines>]
# help
# history
# info
# ins_reg <[key>]
# kanji jis|euc|sjis [jis|euc|sjis]
# kill
#
# lastmsg
# license
# lockscreen
# log [on|off]
# logdir directory
# logfile <filename>
# login [on|off]
#
# mapdefault
# mapnotnext
# maptimeout <[timo>]
# markkeys <string>
# meta
# monitor [on|off]
# msgminwait <sec>
# msgwait <sec>
# multiuser [on|off]
#
# nethack [on|off]
# next
# number [<n>]
# obuflimit [<limit>]
# other
#
# partial [on|off]
# password [<crypted_pw>]
# paste [<registers> [<dest_reg>]]
# pastefont [on|off]
# pow_break
# pow_detach
# pow_detach_msg <message>
# prev
# print_cmd [<cmd>]
# process [<key>]
#
# quit
#
# readbuf
# redisplay
# register key string
# removebuf
# reset
# screen [-opts] [n] [cmd [args]]
# scrollback num
# select [n]
# sessionname [name]
# setenv [var [string]]
# shell command
# shelltitle title
# silence [on|off|sec]
# silencewait sec
# sleep num
# slowpaste usec
# startup_message on|off
# suspend
# term term
# termcap term terminal-tweaks [window-tweaks]
# terminfo term terminal-tweaks [window-tweaks]
# time
# title [windowalias]
# unsetenv var
# vbell on|off
# vbell_msg message
# vbellwait sec
# version
# wall message ...
# width [num]
# windows
# wrap [on|off]
# writebuf
# writelock [on|off|auto]
# xoff
# xon
# zombie [key][key]
# ===============================================================
# END of command list
# ===============================================================
#
# ===============================================================
# Open windows at startup:
# screen -t freshmeat    3 lynx http://www.freshmeat.net
# ===============================================================
# Briefly show the version number of the starting "screen":
# msgwait 1
# version
# msgwait 2
#
# Welcome the user:
# echo "welcome :-)"
#
# Ths DISPLAY variable keeps getting in my way.
# usually I do not want to start programs which
# need a DISPLAY.  Text Tools rule!  :-)
## EOF vim: ts=8

hardstatus alwayslastline "(%C) %H %l |  %?%-Lw%?%{= kY}%n*%f %t%?(%u)%?%{-}%?%+Lw%?"

# All these are for 256 colors, taken from
# http://rtlechow.com/2008/12/256-colors-in-vim-inside-screen-in-an-iterm-on-os-x-leopard/

#terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
#attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
# the first two are for other terminal emulators, just in case.
#termcapinfo xterm "Co#256:AB=E[48;5;%dm:AF=E[38;5;%dm"
#termcapinfo xterm-color "Co#256:AB=E[48;5;%dm:AF=E[38;5;%dm"
#termcapinfo xterm-256color "Co#256:AB=E[48;5;%dm:AF=E[38;5;%dm"
#term xterm-256color
# erase background with current bg color
#defbce "on"

 # terminfo and termcap for nice 256 color terminal
# 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'
# erase background with current bg color
defbce "on" 
term screen-256color
#term xterm