dot/screenrc: Customize a whole lot of keybindings.
[profile] / dot / screenrc
CommitLineData
2ccc0259
MW
1### -*-conf-*-
2###
3### Screen configuration.
4
5## Unusual escape character. C-a interferes with Emacs and Bash.
f617db13 6escape ^zz
2ccc0259
MW
7
8## Make real beeping sounds.
f617db13 9vbell off
2ccc0259
MW
10
11## Maintain a decent amount of scrool.
96096f43 12defscrollback 10000
2ccc0259 13
f8a53502
MW
14## Snooping.
15defmonitor on
16defsilence on
17activity ""
18bell_msg ""
19
2ccc0259
MW
20## Do alternate-screen switching as requested. (Screen always uses its
21## host's alternate-screen switching unless nobbled.)
22altscreen on
23
22837450
MW
24## Don't try to do flow control using XON/XOFF characters. It messes stuff
25## up and is generally annoying.
26defflow off
27
2ccc0259 28## Force UTF-8 now. Screen can cope with sorting out the mess.
9f0b54fb
MW
29defencoding utf8
30setenv LC_CTYPE en_GB.utf8
f7cc3bf8 31setenv LESSCHARSET utf-8
2ccc0259
MW
32
33## Awful N900 hacking. The N900's keymapping is hopelessly broken: the
34## return key is bound to the KP_Enter keysym (and this can't be fixed
35## without breaking the desktop). Mostly, stuff is fine except that when
36## terminal clients switch to application mode, they get the `fe' sequence
37## ^[OM instead of ^M, which they often don't deal with well. Trap this
38## sequence here, and map it back to ^M.
39bindkey -d -a -k fe stuff ^M
40
41## Copyright message is now boring.
42startup_message off
f0ef025e
MW
43
44## Caption and status lines.
f0ef025e 45caption splitonly "%{=br Cb}%?%F%{Yr}%?%3n %t%=%? [%h]%?"
f8a53502
MW
46hardstatus alwayslastline "%{= bC}%-Lw%{+b .Y}%n %t%{-}%+Lw%=%?%E* %?%?%P[] %?%H %Y-%m-%d %c:%s"
47rendition monitor + .R
48rendition bell +b .R
49rendition silence + .g
80a93752 50
b18620de
MW
51## Don't adjust the widths of terminal windows when starting up.
52terminfo xterm-256color is="\E[!p\E[?4l\E[4l\E>"
53
80a93752
MW
54## Arrange for windows whose processes fail to hang around so I can see what
55## happened to them. The manual says I should use `defzombie' here, but
56## screen doesn't seem to understand that.
57zombie qr onerror
83065d51
MW
58
59## Customize key bindings.
60bind \040
61bind ( focus up
62bind ) focus down
63bind {
64bind }
65bind \
66bind ^a
67bind a
68bind A layout attach
69bind ^b
70bind b
71bind B
72bind C
73bind d
74bind D
75bind ^e
76bind e
77bind E layout select
78bind ^f
79bind f
80bind ^g
81bind g
82bind G
83bind ^h
84bind \177
85bind H
86bind I
87bind ^j
88bind j
89bind J
90bind ^k
91bind k
92bind K
93bind l
94bind L layout new
95bind ^m
96bind m
97bind N layout next
98bind ^o
99bind o
100bind O layout show
101bind P layout prev
102bind ^q
103bind ^r
104bind r
105bind R layout remove
106bind ^s
107bind t
108bind T
109bind ^u
110bind u
111bind U
112bind V
113bind w
114bind W
115bind ^y
116bind y
117bind Y