/ screenrc
screenrc
  1  # Copyright 1999-2002 Gentoo Technologies, Inc.  
  2  # Distributed under the terms of the GNU General Public License v2  
  3  # 
  4  # /etc/screenrc
  5  #
  6  # This is the system wide screenrc.
  7  #
  8  # You can use this file to change the default behavior of screen system wide
  9  # or copy it to ~/.screenrc and use it as a starting point for your own
 10  # settings.
 11  #
 12  # Commands in this file are used to set options, bind screen functions to
 13  # keys, redefine terminal capabilities, and to automatically establish one or
 14  # more windows at the beginning of your screen session.
 15  #
 16  # This is not a comprehensive list of options, look at the screen manual for
 17  # details on everything that you can put in this file. Others examples:
 18  # http://www.math.fu-berlin.de/~guckes/screen/config.php3
 19  #
 20  #
 21  
 22  # ==============================================================================
 23  # SCREEN SETTINGS
 24  # ==============================================================================
 25  
 26  # ESCAPE - the COMMAND CHARACTER
 27  # ===============================================================
 28  # escape ^aa  # default
 29  # escape ^pp  # suggested binding for emacs users
 30  
 31  
 32  # PASSWORD
 33  # ===============================================================
 34  # This commands sets the *internal* password for the screen session.
 35  # WARNING!! If this is set then a "lock" command will only let you in to the 
 36  # session after you enter the user's account password and then *also* 
 37  # the internal password for that session. This gives additional safety but,
 38  # if you forget the internal password then you cannot resume your session.
 39  # Use :password to generate a password
 40  # password ODSJQf.4IJN7E    # "1234"
 41  
 42  
 43  # VARIABLES
 44  # ===============================================================
 45  # No annoying audible bell, using "visual bell"
 46  #  vbell on				# default: off
 47  #  vbell_msg "   -- Bell,Bell!! --   "	# default: "Wuff,Wuff!!"
 48  
 49  # Automatically detach on hangup. 
 50    autodetach on				# default: on
 51  
 52  # Don't display the copyright page
 53    startup_message off			# default: on
 54  
 55  # Uses nethack-style messages
 56  # nethack on				# default: off
 57  
 58  # Affects the copying of text regions
 59    crlf off				# default: off
 60  
 61  # Enable/disable multiuser mode. Standard screen operation is singleuser.
 62  # In multiuser mode the commands acladd, aclchg, aclgrp and acldel can be used
 63  # to enable (and disable) other user accessing this screen session.
 64  # Requires suid-root.
 65    multiuser off				
 66  
 67  # Change default scrollback value for new windows
 68    defscrollback 10000			# default: 100
 69  
 70  # Define the time that all windows monitored for silence should 
 71  # wait before displaying a message. Default 30 seconds.
 72    silencewait 15			# default: 30
 73  
 74  # bufferfile:   The file to use for commands
 75  #               "readbuf" ('<') and  "writebuf" ('>'):
 76  bufferfile            $HOME/.screen_exchange
 77  #
 78  # hardcopydir:  The directory which contains all hardcopies.
 79  hardcopydir           ~/.hardcopy
 80  # hardcopydir           ~/.screen
 81  #
 82  # shell:  Default process started in screen's windows.
 83  # Makes it possible to use a different shell inside screen
 84  # than is set as the default login shell.
 85  # If begins with a '-' character, the shell will be started as a login shell.
 86  shell                 zsh
 87  # shell                 bash
 88  # shell                 ksh
 89  #  shell -/bin/zsh
 90  
 91  # shellaka '> |tcsh'
 92  # shelltitle '$ |bash'
 93  
 94  # emulate .logout message
 95    pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
 96  
 97  #caption always " %w --- %c:%s"
 98  #caption always "%3n %t%? @%u%?%? [%h]%?%=%c"
 99  #caption always "%{wb}%-Lw%{= Gk}%50L>%n%f* %t%{-}%+Lw%-9= %c:%s"
100  #caption always "%{yB} %l %{kk} %{rB} %n %t %{kb}| %{wb}%W %= %{kk} %{wB} %D %Y.%m.%d %C:%s %A "
101  #no hostname - caption always "%{yB} %l %{kk} %{rB} %n %t %{kb}| %{wb}%W %= %{kk} %{wB} %D %Y.%m.%d %C %A "
102  #caption splitonly "%{=b}%?%F%{g}%:%{d}%?%45=%n*%f %t%{-}"
103  #caption always "%{wB}-%H %{yB}%l%{wB}-%{kk} %{gB} %n %t %{kb}| %{wb}%W %= %{kk} %{wB}-%D %Y.%m.%d %C %A-"
104  #caption always "%{yB}-%l-%{kk} %{gB} %n %t %{kB}| %{wB}%W %= %{kk} %{wB}-%D %Y.%m.%d %C %A-"
105  #caption always "%{cb}-%l-%{kk} %{gb} %n %t %{kb}| %{wb}%W %= %{kk} %{wb}-%D %Y.%m.%d %C %A-"
106  
107  # from screen-users
108  #caption always "%{=b}%?%F%:%45=%n*%f %t%?%?%F%{r}%:%{s kk}%?%H%?%F%{-}%? %L=%-Lw%45L>%?%F%{g}%?%n*%f %t%?%F%{-}%?%+Lw%-17= %?%F%{y}%?%c %Y-%m-%d%?"
109  
110  # my modified version of the above
111  #caption always "%{=b}%?%F%:%45=%n*%f %t%?%?%F%{B}%:%{s kk}%?%H %l%?%F%{-}%? %L=%-Lw%45L>%?%F%{g}%?%n*%f %t%?%F%{-}%?%+Lw%-21= %?%F%{y}%?%Y.%m.%d %C %A%?"
112  caption always "%{=b}%?%F%:%45=%n*%f %t%?%?%F%{B}%:%{s kk}%?%H %{-}%? %L=%-Lw%45L>%?%F%{g}%?%n*%f %t%?%F%{-}%?%+Lw%-21="
113  
114  #hardstatus on
115  #hardstatus alwayslastline
116  #hardstatus string "%{.bW}%-Lw%{.rW}%n %t%{-}%+Lw %=%{..G} %H %{..Y} %m/%d %C%a "
117  
118  # advertise hardstatus support to $TERMCAP
119  # termcapinfo  * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'
120  
121  # something about scrolling in xterms :p
122  termcapinfo xterm ti@:te@
123  
124  # set every new windows hardstatus line to somenthing descriptive
125  # defhstatus "screen: ^En (^Et)"
126  
127  # don't kill window after the process died
128  # zombie "^["
129  
130  
131  # XTERM TWEAKS
132  # ===============================================================
133  
134  # xterm understands both im/ic and doesn't have a status line.
135  # Note: Do not specify im and ic in the real termcap/info file as
136  # some programs (e.g. vi) will not work anymore.
137    termcap  xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
138    terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l
139  
140  # 80/132 column switching must be enabled for ^AW to work
141  # change init sequence to not switch width
142    termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l
143  
144  # Make the output buffer large for (fast) xterms.
145  # termcapinfo xterm* OL=10000
146    termcapinfo xterm* OL=100
147  
148  # tell screen that xterm can switch to dark background and has function
149  # keys.
150    termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
151    termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
152    termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'
153  
154  # special xterm hardstatus: use the window title.
155  # termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
156  
157  #terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
158    termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'
159  
160  # emulate part of the 'K' charset
161    termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'
162  
163  # xterm-52 tweaks:
164  # - uses background color for delete operations
165    termcapinfo xterm* be
166  
167  
168  # WYSE TERMINALS
169  # ===============================================================
170  
171  #wyse-75-42 must have flow control (xo = "terminal uses xon/xoff")
172  #essential to have it here, as this is a slow terminal.
173    termcapinfo wy75-42 xo:hs@
174  
175  # New termcap sequences for cursor application mode.
176    termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J
177  
178  
179  # OTHER TERMINALS
180  # ===============================================================
181  
182  # make hp700 termcap/info better
183    termcapinfo  hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'
184  
185  # Extend the vt100 desciption by some sequences.
186  #  termcap  vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
187  # terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC
188  # termcapinfo linux C8
189  # old rxvt versions also need this
190  # termcapinfo rxvt C8
191  
192  # some apps don't like TERM 'screen.linux'
193  #term linux
194  
195  # KEYBINDINGS
196  # ==============================================================
197  # The "bind" command assign keys to (internal) commands
198  # SCREEN checks all the keys you type; you type the key
199  # which is known as the "command character" then SCREEN
200  # eats this key, too, and checks whether this key is
201  # "bound" to a command.  If so then SCREEN will execute it.
202  #
203  # The command "bind" allows you to chose which keys
204  # will be assigned to the commands.
205  #
206  # Some commands are bound to several keys -
207  # usually to both some letter and its corresponding
208  # control key combination, eg the command
209  # "(create) screen" is bound to both 'c' and '^C'.
210  #
211  # The following list shows the default bindings:
212  #
213  # break       ^B b
214  # clear       C
215  # colon       :
216  # copy        ^[ [
217  # detach      ^D d
218  # digraph     ^V
219  # displays    *
220  # dumptermcap .
221  # fit         F
222  # flow        ^F f
223  # focus       ^I
224  # hardcopy    h
225  # help        ?
226  # history     { }
227  # info        i
228  # kill        K k
229  # lastmsg     ^M m
230  # license     ,
231  # log         H
232  # login       L
233  # meta        x
234  # monitor     M
235  # next        ^@ ^N sp n
236  # number      N
237  # only        Q
238  # other       ^X
239  # pow_break   B
240  # pow_detach  D
241  # prev        ^H ^P p ^?
242  # quit        \
243  # readbuf     <
244  # redisplay   ^L l
245  # remove      X
246  # removebuf   =
247  # reset       Z
248  # screen      ^C c
249  # select      " '
250  # silence     _
251  # split       S
252  # suspend     ^Z z
253  # time        ^T t
254  # title       A
255  # vbell       ^G
256  # version     v
257  # width       W
258  # windows     ^W w
259  # wrap        ^R r
260  # writebuf    >
261  # xoff        ^S s
262  # xon         ^Q q
263  # ^]  paste .
264  # -   select -
265  # 0   select 0
266  # 1   select 1
267  # 2   select 2
268  # 3   select 3
269  # 4   select 4
270  # 5   select 5
271  # 6   select 6
272  # 7   select 7
273  # 8   select 8
274  # 9   select 9
275  # I   login on
276  # O   login off
277  # ]   paste .
278  #
279  
280  # And here are the default bind commands if you need them:
281  #
282  # bind A title
283  # bind C clear
284  # bind D pow_detach
285  # bind F fit
286  # bind H log
287  # bind I login on
288  # bind K kill
289  # bind L login
290  # bind M monitor
291  # bind N number
292  # bind O login off
293  # bind Q only
294  # bind S split
295  # bind W width
296  # bind X remove
297  # bind Z reset
298  
299  # Let's remove some dangerous key bindings ...
300    bind k
301    bind ^k
302  # bind .  dumptermcap # default
303    bind .
304  # bind ^h ???         # default
305    bind ^h
306   bind h  hardcopy    # default
307  #  bind h
308  
309    bind / quit
310    bind ^/ quit
311  
312  # ... and make them better.
313    bind 'K' kill
314    bind '}' history
315  
316  # Yet another hack:
317  # Prepend/append register [/] to the paste if ^a^] is pressed.
318  # This lets me have autoindent mode in vi.
319  #  register [ "\033:se noai\015a"
320  #  register ] "\033:se ai\015a"
321  #  bind ^] paste [.]
322  
323  # hardstatus alwaysignore
324  # hardstatus alwayslastline "%Lw"
325  
326  # Resize the current region. The space will be removed from or added to 
327  # the region below or if there's not enough space from the region above.
328    bind = resize =
329    bind + resize +3
330    bind - resize -3
331  # bind _ resize max
332  #
333  # attrcolor u "-u b"
334  # attrcolor b "R"
335  
336  # make split, tab, last window one keystroke
337    bind S eval split focus other
338  
339  # STARTUP SCREENS
340  # ===============================================================
341  # Defines the time screen delays a new message when one message
342  # is currently displayed. The default is 1 second.
343  #  msgminwait 2
344  
345  # Time a message is displayed if screen is not disturbed by
346  # other activity. The dafault is 5 seconds:
347  #  msgwait 2
348  
349  # Briefly show the version number of this starting
350  # screen session - but only for *one* second:
351  #  msgwait 1
352  #  version
353  
354  # Welcome the user:
355  # echo "welcome :-)"
356  # echo "I love you today."
357  
358  # Uncomment one/some following lines to automatically let
359  # SCREEN start some programs in the given window numbers:
360  #screen    -t root        0 su - -c screen
361  #screen    -t mail        1 mutt
362  
363  #screen    -t rp          1 -zsh
364  #screen    -t xfce4       2 # startxfce4 -- :1
365  #screen    -t zsh         2 -zsh
366  #screen    -t emacs       3 emacs -nw
367  #screen    -t vim         3 vim
368  #screen    -t mc          4 mc
369  #screen    -t www         5 links2 www.google.ca
370  #screen    -t zsh         6 -zsh
371  #screen    -t X           8 -zsh
372  
373  # Set the environment variable var to value string. If only var is specified,
374  # you'll be prompted to enter a value. If no parameters are specified,
375  # you'll be prompted for both variable and value. The environment is
376  # inherited by all subsequently forked shells.
377  # setenv PROMPT_COMMAND 'echo -n -e "\033k\033\134"'
378  
379  # Don't you want to start programs which need a DISPLAY ?
380  setenv DISPLAY ':0'
381  
382  # show a matrix like screensaver
383  #idle 600 eval "screen cmatrix -b -s -l -C blue" "idle 0"
384  
385  # ugly hack for "copy mode" messages
386  bindkey -m \033 eval 'stuff \377' 'colon' 'stuff \012'
387  
388  # utf8 support on
389  defutf8 on