X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.screenrc;h=eeb849134aa656123c859787964915efa14d0c67;hp=ba46de2ef45479524bcb7bd80776200cbe375aa1;hb=48f30af664cf57c765a763eea7c652da92d66c27;hpb=d72851316b4bfb4c3ff56030cefb621df51a5b90 diff --git a/.screenrc b/.screenrc index ba46de2..eeb8491 100644 --- a/.screenrc +++ b/.screenrc @@ -1,5 +1,3 @@ -# $Id$ - # Use Control-P instead of Control-A for stuff. escape ^pp @@ -7,28 +5,53 @@ escape ^pp vbell off startup_message off +# Coloured windowlist. +windowlist title "%{= wb}%{+r}[%H %Y-%m-%d %0c:%s]%{-r} windows%<%=%l" +windowlist string "%{+ .b}%{+ g}%3n%f%{+ w} %t" + +# Save more scrollback. +defscrollback 512 + ################################################################################ # Hotkeys. ################################################################################ # Up and down like Vim. bind j focus down bind k focus up +# Previous and next kinda like Vim. +bind h prev +bind l next +# Digraph. +bind ^k digraph # Close the current window. bind q remove +# Fit window to screen. +bind _ fit +# Show window list. +bind = windowlist +# Don't accidentally send xoff. +bind s # Set current window title. bind t title -#bind h focus top -#bind l focus bottom +# Show or hide the hardstatus line. +bind v hardstatus alwayslastline +bind V hardstatus alwaysignore ################################################################################ # Terminal settings. ################################################################################ # How to set the foreground and background colours. -termcapinfo putty*|rxvt-unicode|xterm* 'AB=\E[48;5;%dm:AF=\E[38;5;%dm' +termcapinfo putty*|rxvt-unicode|xterm-* 'AB=\E[48;5;%dm:AF=\E[38;5;%dm' +# PuTTY needs help to set bold colours. +termcapinfo putty-256color 'C8' +# How to resize the window. +termcapinfo putty*|rxvt-unicode|xterm-* 'WS=\E[8;%d;%dt' # How to set the hardstatus line (ie title bar). Even though we don't use it. termcapinfo xterm* 'ts=\E]0;:fs=\007:ds=\E]0;\007' # Allow PgUp/PgDn to work correctly. termcapinfo * 'ti@:te@' +# Force hardstatus off so we can have the line on the screen and toggle it. +termcapinfo * 'hs@' # Support 256 colours with background clear erase. term screen-256color-bce # Turn on background clear erase. @@ -38,23 +61,19 @@ defbce on # Caption settings. ################################################################################ # Display hardstatus on the bottom of the screen instead of in the title bar. -hardstatus alwayslastline +hardstatus off # The string is white on blue text showing: hostname, current window, date. -hardstatus string "%{= BW}%H [screen %n: %t]%<%=%Y-%m-%d %0c:%s" +hardstatus string "%{= BW}[%H %Y-%m-%d %0c:%s]%{= WB} screen %n: %t%<%=%l" # Show a caption bar for every window even if there are no splits. caption always # Format a caption string depending on whether it is related to the active # window or not (%?%Fxxx%:yyy%? shows xxx if the window is active and yyy # otherwise). -# The caption consists of a white background bar. The active window has -# a blue marker at either end and the text is blue. Inactive windows have -# black text. All windows show the name of all windows with the current one -# highlighted in square brackets. -caption string "%?%F%{= BW}%:%{= ww}%?>%?%F%{= wb}%:%{= wk}%?%-Lw%50>%{+b}[%n%f %t]%{-b}%+Lw%<%=%?%F%{= BW}%:%{ ww}%?<" -# %?%F%{= BW}%:%{= ww}%?> -# Show the > marker in white on blue if the window is active or white on white -# (ie hidden) if the window is inactve. -# +# The caption consists of a white background bar whose foreground colour +# depends on the window status. Active windows are in blue; inactive in black. +# The current window's settings are highlighted in reverse video with square +# brackets. +caption string "%?%F%{= wb}%:%{= wk}%?%-Lw%50>%?%F%{+r}%:%{= Kw}%?[%n%f %t]%{-}%+Lw%< %=" # %?%F%{= wb}%:%{= wk}%? # Show everything in blue on white if the window is active or black on white # if the window is inactive. @@ -62,14 +81,14 @@ caption string "%?%F%{= BW}%:%{= ww}%?>%?%F%{= wb}%:%{= wk}%?%-Lw%50>%{+b}[%n%f # %-Lw%50> # Left-aligned window list up to but not including the active window. # -# %{+b}[%n%f%t]%{+b} -# Show name, flags and title in bold. +# %?%F%{+r}%:%{= Kw}%?[%n%f%t]%{-} +# Show name, flags and title in bold reverse if the window is active. +# Otherwise show them in white on high intensity black, which turns out grey. +# Afterwards pop the colour stack so the following information is as before. # # %+Lw # All remaining window names. # -# %<%= -# Truncate here then pad remaining text. -# -# %?%F{= BW}%:%{ ww}%?< -# Show the < marker in the same way as the previous. +# %< %= +# Truncate here, hack in a space to force the reverse video to flip off then +# pad remaining text.