Add /etc/grml/screenrc_generic; revert changes in caption/hardstatus switch
[grml-etc-core.git] / etc / grml / screenrc_generic
1 # Filename:      screenrc
2 # Purpose:       config file for GNU screen
3 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
4 # Bug-Reports:   see http://grml.org/bugs/
5 # License:       This file is licensed under the GPL v2.
6 # Latest change: Fre Sep 28 23:35:53 CEST 2007 [mika]
7 ################################################################################
8
9   caption always "%{+b kr}$USER@%{kw}%H | %{ky}(load: %l |%{kr})  %-21=%{kw}%D %d.%m.%Y %0c"
10   hardstatus alwayslastline "%{rw}%n%f %t %{wk} | %?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
11
12 # switch order of caption and hardstatus:
13 #  hardstatus alwayslastline "%{+b kr}$USER@%{kw}%H | %{ky}(load: %l |%{kr})  %-21=%{kw}%D %d.%m.%Y %0c"
14 #  caption always "%{rw}%n%f %t %{wk} | %?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
15
16 # detach on hangup
17   autodetach            on              # default: on
18   crlf                  off             # default: off
19   deflogin              off             # default: on
20 # defsilence            off             # default: off
21 # hardcopy_append       on              # default: off
22   hardcopy_append       off             # default: off
23   nethack               on              # default: off
24 # don't display the copyright page
25   startup_message       off             # default: on
26 # no annoying audible bell, please
27   vbell                 on
28
29   defscrollback         1000            # default: 100
30 # msgminwait            3               # default: 1
31   silencewait           15              # default: 30
32
33   hardcopydir           $HOME/.hardcopy
34
35 # fix the "screen.linux" terminal problem (see Debian BTS #238355 + #239776)
36 #  term linux
37
38   shell                 /bin/zsh
39
40 # "sorendition": set the colors for
41 # the "messages" and "text marking"
42 # (ie text you mark in copy mode):
43   sorendition 10 99 # default!
44
45 # use %n to display the window number and %t for its title:
46   activity              "activity in %n (%t) [%w:%s]~"
47
48 # pass on the "beep" (CTRL-G) by adding a '~':
49   bell                  "bell     in %n (%t) [%w:%s]~"
50
51 # pow_detach_msg:       Message shown when session
52 #                       gets power detached.
53   pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
54
55 # vbell_msg:            Message shown when the
56 #                       "virtual bell" rings.
57   vbell_msg             " *beep* "
58
59 # Key bindings
60 # Remove some default key bindings by binding
61 # them to "nothing" (empty right-hand-side):
62 # bind .  dumptermcap # default
63   bind .
64   bind ^\
65   bind \\
66
67 # 040126 To be able to select windows with n > 9 ->
68 # press "C-a - #" instead of just "C-a #"
69   bind - command -c select_1n
70   bind -c select_1n 0 select 10
71   bind -c select_1n 1 select 11
72   bind -c select_1n 2 select 12
73   bind -c select_1n 3 select 13
74   bind -c select_1n 4 select 14
75   bind -c select_1n 5 select 15
76   bind -c select_1n 6 select 16
77   bind -c select_1n 7 select 17
78   bind -c select_1n 8 select 18
79   bind -c select_1n 9 select 19
80   bind -c select_1n - command -c select_2n
81   bind -c select_2n 0 select 20
82   bind -c select_2n 1 select 21
83   bind -c select_2n 2 select 22
84   bind -c select_2n 3 select 23
85   bind -c select_2n 4 select 24
86   bind -c select_2n 5 select 25
87   bind -c select_2n 6 select 26
88   bind -c select_2n 7 select 27
89   bind -c select_2n 8 select 28
90   bind -c select_2n 9 select 29
91   bind -c select_2n - select -
92
93 # Use the function keys F11 and F12 to cycle backwards/forwards in
94 # the list of existing windows:
95 #  bindkey -k F1 prev
96 #  bindkey -k F2 next
97
98 # remove some stupid / dangerous key bindings
99   bind k
100   bind ^k
101   bind .
102   bind ^\
103   bind \\
104   bind ^h
105   bind h  hardcopy
106 # make them better
107   bind 'K' kill
108   bind 'I' login on
109   bind 'O' login off
110   bind '}' history
111
112   bind G screen -t 'google'    w3m www.google.com
113   bind H screen -t HeiseTicker w3m www.heise.de/newsticker/pda/data/paket4.html
114
115 # Paste - use 'P' instead of ']':
116 # bind P # unbound by default
117   bind P paste .
118
119 # Yet another hack:
120 # Prepend/append register [/] to the paste if ^a^] is pressed.
121 # This lets me have autoindent mode in vi.
122 #  register [ "\033:se noai\015a"
123 #  register ] "\033:se ai\015a"
124 #  bind ^] paste [.]
125
126 #      X - a fast way to lock the current screen.
127   bind X lockscreen
128
129 # 030511 Workaround for stupid machines without xmodmap ;-)
130   bindkey -t °a stuff "ä"
131   bindkey -t °A stuff "Ä"
132   bindkey -t °o stuff "ö"
133   bindkey -t °O stuff "Ö"
134   bindkey -t °u stuff "ü"
135   bindkey -t °U stuff "Ü"
136   bindkey -t °s stuff "ß"
137
138   msgwait 1
139   version
140 # change back to showing messages
141 # for duration of two seconds:
142   msgwait 2
143
144 # To get screen to add lines to xterm's scrollback buffer, uncomment the
145 # following termcapinfo line which tells xterm to use the normal screen buffer
146 # (which has scrollback), not the alternate screen buffer.
147   termcapinfo xterm|xterms|xs|rxvt ti@:te@
148
149 # Welcome the user:
150   echo "welcome BoFH!"