Rework changing pane titles.
[profile.git] / .screenrc
1 # Use Control-P instead of Control-A for stuff.
2 escape ^pp
3
4 # Turn off annoyances.
5 vbell off
6 startup_message off
7
8 # Coloured windowlist.
9 windowlist title "%{= wb}%{+r}[%H %Y-%m-%d %0c:%s]%{-r} windows%<%=%l"
10 windowlist string "%{+ .b}%{+ g}%3n%f%{+ w} %t"
11
12 # Save more scrollback.
13 defscrollback 512
14
15 ################################################################################
16 # Hotkeys.
17 ################################################################################
18 # Up and down like Vim.
19 bind j focus down
20 bind k focus up
21 # Previous and next kinda like Vim.
22 bind h prev
23 bind l next
24 # Digraph.
25 bind ^k digraph
26 # Close the current window.
27 bind q remove
28 # Fit window to screen.
29 bind _ fit
30 # Show window list.
31 bind = windowlist
32 # Don't accidentally send xoff.
33 bind s
34 # Set current window title.
35 bind t title
36 # Show or hide the hardstatus line.
37 bind v hardstatus alwayslastline
38 bind V hardstatus alwaysignore
39
40 ################################################################################
41 # Terminal settings.
42 ################################################################################
43 # How to set the foreground and background colours.
44 termcapinfo putty*|rxvt-unicode|xterm-* 'AB=\E[48;5;%dm:AF=\E[38;5;%dm'
45 # PuTTY needs help to set bold colours.
46 termcapinfo putty-256color 'C8'
47 # How to resize the window.
48 termcapinfo putty*|rxvt-unicode|xterm-* 'WS=\E[8;%d;%dt'
49 # How to set the hardstatus line (ie title bar).  Even though we don't use it.
50 termcapinfo xterm* 'ts=\E]0;:fs=\007:ds=\E]0;\007'
51 # Allow PgUp/PgDn to work correctly.
52 termcapinfo * 'ti@:te@'
53 # Force hardstatus off so we can have the line on the screen and toggle it.
54 termcapinfo * 'hs@'
55 # Support 256 colours with background clear erase.
56 term screen-256color-bce
57 # Turn on background clear erase.
58 defbce on
59
60 ################################################################################
61 # Caption settings.
62 ################################################################################
63 # Display hardstatus on the bottom of the screen instead of in the title bar.
64 hardstatus off
65 # The string is white on blue text showing: hostname, current window, date.
66 hardstatus string "%{= BW}[%H %Y-%m-%d %0c:%s]%{= WB} screen %n: %t%<%=%l"
67 # Show a caption bar for every window even if there are no splits.
68 caption always
69 # Format a caption string depending on whether it is related to the active 
70 # window or not (%?%Fxxx%:yyy%? shows xxx if the window is active and yyy 
71 # otherwise).
72 # The caption consists of a white background bar whose foreground colour 
73 # depends on the window status.  Active windows are in blue; inactive in black.
74 # The current window's settings are highlighted in reverse video with square
75 # brackets.
76 caption string "%?%F%{= wb}%:%{= wk}%?%-Lw%50>%?%F%{+r}%:%{= Kw}%?[%n%f %t]%{-}%+Lw%< %="
77 # %?%F%{= wb}%:%{= wk}%?
78 # Show everything in blue on white if the window is active or black on white
79 # if the window is inactive.
80 #
81 # %-Lw%50>
82 # Left-aligned window list up to but not including the active window.
83 #
84 # %?%F%{+r}%:%{= Kw}%?[%n%f%t]%{-}
85 # Show name, flags and title in bold reverse if the window is active.  
86 # Otherwise show them in white on high intensity black, which turns out grey.
87 # Afterwards pop the colour stack so the following information is as before.
88 #
89 # %+Lw
90 # All remaining window names.
91 #
92 # %< %=
93 # Truncate here, hack in a space to force the reverse video to flip off then 
94 # pad remaining text.