screenrc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # If both the lifespan and the autorefresh parameters are zero,
  2. # the backtick program is expected to stay in the background and generate output once in a while.
  3. # In this case, the command is executed right away and screen stores the last line of output.
  4. # If a new line gets printed screen will automatically refresh the hardstatus or the captions.
  5. # backtick 2 0 0 $HOME/.screen-battery-rate
  6. backtick 2 0 0 $HOME/.config/screen/battery-rate
  7. hardstatus alwayslastline
  8. # H hostname of the system
  9. hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}]%?[%2`]%?[%{B}%d.%m. %{W}%c%{g}]'
  10. defscrollback 10000
  11. # http://stackoverflow.com/questions/17868652/screen-how-to-turn-on-alternate-screen
  12. altscreen on
  13. # no welcome message
  14. startup_message off
  15. # 256 colors
  16. attrcolor b ".I"
  17. termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
  18. defbce on
  19. # mouse tracking allows to switch region focus by clicking
  20. mousetrack on
  21. # enable use of the mouse's scrollwheel to scroll through the scrollback buffer
  22. # http://unix.stackexchange.com/questions/43229/is-there-a-way-to-make-screen-scroll-like-a-normal-terminal
  23. # http://stackoverflow.com/questions/359109/using-the-scrollwheel-in-gnu-screen
  24. # termcapinfo xterm* ti@:te@
  25. # termcapinfo xterm 'hs:ts=\E]2;:fs=07:ds=\E]2;screen07'
  26. # layouts
  27. layout autosave on
  28. # navigating regions
  29. bind -k kl focus left
  30. bind -k kd focus down
  31. bind -k ku focus up
  32. bind -k kr focus right
  33. bind h focus left
  34. bind j focus down
  35. bind k focus up
  36. bind l focus right
  37. # resizing regions
  38. bind -c resize h eval "resize -h -5" "command -c resize"
  39. bind -c resize j eval "resize -v +3" "command -c resize"
  40. bind -c resize k eval "resize -v -3" "command -c resize"
  41. bind -c resize l eval "resize -h +5" "command -c resize"
  42. bind -c resize -k kl eval "resize -h -5" "command -c resize"
  43. bind -c resize -k kd eval "resize -v +3" "command -c resize"
  44. bind -c resize -k ku eval "resize -v -3" "command -c resize"
  45. bind -c resize -k kr eval "resize -h +5" "command -c resize"
  46. bind R eval "command -c resize" "echo resize"
  47. # https://gist.github.com/joaopizani/2718397