screenrc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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/.config/screen/battery-rate
  6. hardstatus alwayslastline
  7. # H hostname of the system
  8. # https://www.gnu.org/software/screen/manual/html_node/String-Escapes.html
  9. hardstatus string '%{= kg}[%{G}%H%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}]%?[%2`]%?[%{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. # all characters cleared will be displayed in the current background color
  16. defbce on
  17. # mouse tracking allows to switch region focus by clicking
  18. mousetrack on
  19. screen ranger
  20. # navigating regions
  21. bind h focus left
  22. bind j focus down
  23. bind k focus up
  24. bind l focus right
  25. # resizing regions
  26. bind -c resize h eval "resize -h -5" "command -c resize"
  27. bind -c resize j eval "resize -v +3" "command -c resize"
  28. bind -c resize k eval "resize -v -3" "command -c resize"
  29. bind -c resize l eval "resize -h +5" "command -c resize"
  30. bind R eval "command -c resize" "echo resize"
  31. # http://aperiodic.net/screen/man:default_key_bindings