Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. # GNU screen configuration.
  2. #
  3. # Unfamiliar? GNU screen is basically a terminal-based terminal emulator. It allows you to do things like have tabs (across platforms), but also leave your session up if you're not connected (e.g., on a server). You can also share a terminal session with another user.
  4. #
  5. # Author: Benjamin Oakes <hello@benjaminoakes.com>
  6.  
  7. # For shared screens via "screen -x"
  8. multiuser on
  9.  
  10. # don't use the hardstatus line for system messages, use reverse video instead
  11. # (we'll be using it for the list of tab windows - see hardstatus alwayslastline
  12. # below)
  13. hardstatus off
  14.  
  15. # use the caption line for the computer name, load, hstatus (as set by zsh), & time
  16. # the caption line gets repeated for each window being displayed (using :split),
  17. # so we'll use color cues to differentiate the caption of the current, active
  18. # window, and the others.
  19. # always - display the caption continuously. Since
  20. # hardstatus is 'alwayslastline', it will be on the
  21. # next to last line.
  22. # "%?%F" - if (leading '%?') this region has focus ('%F')
  23. # (e.g. it's the only region being displayed, or,
  24. # if in split-screen mode, it's the currently active
  25. # region)
  26. # "%{= Kk}" - set the colorscheme to blac[k] on grey (bright blac[K]),
  27. # with no other effects (standout, underline, etc.)
  28. # "%:" - otherwise ('%:' between a pair of '%?'s)
  29. # "%{=u kR}" - set the colorscheme to [R]ed on blac[k], and
  30. # underline it, but no other effects (bold, standout, etc.)
  31. # "%?" - end if (trailing '%?')
  32. # " %h " - print two spaces, then the [h]ardstatus of the
  33. # current tab window (as set by zsh - see zshrc) and
  34. # then another space.
  35. # "%-024=" - either pad (with spaces) or truncate the previous
  36. # text so that the rest of the caption string starts
  37. # 24 characters ('024') from the right ('-') edge of
  38. # the caption line.
  39. # NOTE: omitting the '0' before the '24' would pad
  40. # or truncate the text so it would be 24% from the
  41. # right.
  42. # "%{+b} - add ('+') [b]old to the current text effects, but
  43. # don't change the current colors.
  44. # " %C:%s%a %D %d %M %Y" - print the [C]urrent time, a colon, the [s]econds,
  45. # whether it's [a]m or pm, the [D]ay name, the [d]ay
  46. # of the month, the [M]onth, and the [Y]ear.
  47. # (this takes up 24 characters, so the previous
  48. # pad/truncate command makes sure the clock doesn't
  49. # get pushed off of the caption line)
  50. # "%{= dd}" - revert to the [d]efault background and [d]efault
  51. # foreground colors, respectively, with no ('= ')
  52. # other effects.
  53.  
  54. backtick 10 60 60 sh -c 'sty=$(screen -ls | grep --color=no -o "$PPID[^[:space:]]*") ; if [ ${sty##*.} = $HOST ] ; then echo $sty ; else echo "$sty" ; fi'
  55. hardstatus string "%10`"
  56. #caption always "%?%F%{= Kw}%:%{=u kR}%? [%H] [%10`] %h %-024=%{+b} %C%a %D %d %M %Y%{= dd}"
  57. caption always '%{gk}[%{wk}(%10`)%{g}] [%{w}%l%{W}%{g}] ["%H" %{= kw}%0C:%s%a %m/%d/%Y%{g}]'
  58. # use the hardstatus line for the window list
  59. # alwayslastline - always display the hardstatus as the last line of the
  60. # terminal
  61. # "%{= kR} %-Lw" - change to a blac[k] background with bright [R]ed text,
  62. # and print all the tab [w]indow numbers and titles in
  63. # the [L]ong format (ie with flags) upto ('-') the
  64. # current tab window
  65. # "%{=b Kk} %n%f %t " - change to grey (bright blac[K]) background with
  66. # [b]old blac[k] text, with no other effects, and print
  67. # the [n]umber of the current tab window, any [f]lags it
  68. # might have, and the [t]itle of the current tab window
  69. # (as set by zsh - see zshrc).
  70. # NOTE: the color match with the caption line makes it
  71. # appear as if a 'tab' is dropping down from the caption
  72. # line, highlighting the number & title of the current
  73. # tab window. Nifty, ain't it)
  74. # "%{-}%+Lw " - revert to the previous color scheme (red on black)
  75. # and print all the tab [w]indow numbers and titles in
  76. # the [L]ong format (ie with flags) after ('+') the
  77. # current tab window.
  78. # "%=%{= dd}" - pad all the way to the right (since there is no text
  79. # that follows this) and revert to the [d]efault
  80. # background and [d]efault foreground colors, with no
  81. # ('= ') other effects.
  82. hardstatus alwayslastline "%{= kR} %-Lw%{=b Kw} %n*%f %t %{-}%+Lw %=%{= dd}"
  83. shelltitle "$ |zsh"
  84.  
  85. # no annoying inaudible bell, please
  86. vbell off
  87.  
  88. # don't display the copyright page
  89. startup_message off
  90.  
  91. # set every new windows hardstatus line to somenthing descriptive
  92. defhstatus "screen: ^En (^Et)"
  93.  
  94. defscrollback 10000
  95.  
  96. # Mac OS X terminal is running UTF-8
  97. encoding utf8
  98. defencoding utf8
  99.  
  100. # Enable mouse scrolling and scroll bar history scrolling
  101. termcapinfo xterm* ti@:te@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement