# .screenrc # 2009-06-17 # bpkroth # # This is a stripped down version of my usual screenrc file for purposes of # demonstrating how to use bash, preexec, screen, ssh goodies. # Add a caption at the bottom of the screen session that shows the list of # windows, hostname, date, and time. # # original, results in nasty whiteness and no trunc with too many windows #caption always "%{= .w}%-w%{=b .c}%n %t%{-}%+w %-= @%H - %l - %D %d %M - %c" #caption always "%{= .w}%-w%{=b .c}%-81<%n %t%{-}%+w%<%-048= @%H - %l - %D %d %M - %c" # truncates in the middle #caption always "%L>%{= .w}%-Lw%{=b .c}%-85<%n%f %t%{-}%-049L<%+Lw%-049= @%H - %l - %D %d %M - %c" # ... on both ends, but sometimes truncs the active window #caption always "%{= .w}%-w%L>%{=b .c}%n %t%{-}%+w %-48= @%H - %l - %D %d %M - %c" # # This adds a statusbar: # - windows and their flags before the active one are listed in white and truncated with ... # - the active window and it's flags are in bold cyan and aligned slightly to the left # - the rest of the windows are printed and truncated so that # - a string describing the current machine, load, and date/time are right aligned caption always "%{= .w}%-Lw%20L>%{=b .c}%n%f %t%{-}%+Lw %-048= @%H - %l - %D %d %M - %c" defhstatus "screen @ H - n t" hardstatus off # Update utmp by default so we can see what's up in "w". deflogin on # Export a variable denoting the original host screen was started on. # This is used by the bash.preexec stuff: # http://glyf.livejournal.com/63106.html?thread=210818 setenv SCREEN_RUN_HOST $SCREEN_HOST setenv SCREEN_RUN_USER $USER setenv LC_SCREEN_RUN_HOST $SCREEN_HOST setenv LC_SCREEN_RUN_USER $USER