dot/screenrc: Customize a whole lot of keybindings.
[profile] / dot / screenrc
index 134dd9b..d8c31c3 100644 (file)
@@ -1,8 +1,117 @@
+### -*-conf-*-
+###
+### Screen configuration.
+
+## Unusual escape character.  C-a interferes with Emacs and Bash.
 escape ^zz
+
+## Make real beeping sounds.
 vbell off
-defscrollback 1000
-deflogin off
+
+## Maintain a decent amount of scrool.
+defscrollback 10000
+
+## Snooping.
+defmonitor on
+defsilence on
+activity ""
+bell_msg ""
+
+## Do alternate-screen switching as requested.  (Screen always uses its
+## host's alternate-screen switching unless nobbled.)
+altscreen on
+
+## Don't try to do flow control using XON/XOFF characters.  It messes stuff
+## up and is generally annoying.
+defflow off
+
+## Force UTF-8 now.  Screen can cope with sorting out the mess.
 defencoding utf8
 setenv LC_CTYPE en_GB.utf8
 setenv LESSCHARSET utf-8
-altscreen on
+
+## Awful N900 hacking.  The N900's keymapping is hopelessly broken: the
+## return key is bound to the KP_Enter keysym (and this can't be fixed
+## without breaking the desktop).  Mostly, stuff is fine except that when
+## terminal clients switch to application mode, they get the `fe' sequence
+## ^[OM instead of ^M, which they often don't deal with well.  Trap this
+## sequence here, and map it back to ^M.
+bindkey -d -a -k fe stuff ^M
+
+## Copyright message is now boring.
+startup_message off
+
+## Caption and status lines.
+caption splitonly "%{=br Cb}%?%F%{Yr}%?%3n %t%=%? [%h]%?"
+hardstatus alwayslastline "%{= bC}%-Lw%{+b .Y}%n %t%{-}%+Lw%=%?%E* %?%?%P[] %?%H %Y-%m-%d %c:%s"
+rendition monitor + .R
+rendition bell +b .R
+rendition silence + .g
+
+## Don't adjust the widths of terminal windows when starting up.
+terminfo xterm-256color is="\E[!p\E[?4l\E[4l\E>"
+
+## Arrange for windows whose processes fail to hang around so I can see what
+## happened to them.  The manual says I should use `defzombie' here, but
+## screen doesn't seem to understand that.
+zombie qr onerror
+
+## Customize key bindings.
+bind \040
+bind ( focus up
+bind ) focus down
+bind {
+bind }
+bind \
+bind ^a
+bind a
+bind A layout attach
+bind ^b
+bind b
+bind B
+bind C
+bind d
+bind D
+bind ^e
+bind e
+bind E layout select
+bind ^f
+bind f
+bind ^g
+bind g
+bind G
+bind ^h
+bind \177
+bind H
+bind I
+bind ^j
+bind j
+bind J
+bind ^k
+bind k
+bind K
+bind l
+bind L layout new
+bind ^m
+bind m
+bind N layout next
+bind ^o
+bind o
+bind O layout show
+bind P layout prev
+bind ^q
+bind ^r
+bind r
+bind R layout remove
+bind ^s
+bind t
+bind T
+bind ^u
+bind u
+bind U
+bind V
+bind w
+bind W
+bind ^y
+bind y
+bind Y