Skip to content

Instantly share code, notes, and snippets.

@veerendra2
Last active July 11, 2019 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veerendra2/2d250c007b49fa213787a465fa1862a6 to your computer and use it in GitHub Desktop.
Save veerendra2/2d250c007b49fa213787a465fa1862a6 to your computer and use it in GitHub Desktop.
GNU screen Config CheatSheet
# The following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# enable alternate screen. (just like in xterm)
altscreen on
# Huge scrollback buffer
defscrollback 5000
# No welcome message
startup_message off
# 256 colors
attrcolor b ".I"
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
defbce on
# Mouse tracking allows to switch region focus by clicking
mousetrack on
# Mouse scroll on
termcapinfo xterm* ti@:te@
# window numbering starts at 1 not 0
bind c screen 1
bind 0 select 10
# Navigating regions with Ctrl-arrows
bindkey "^[[1;5D" focus left
bindkey "^[[1;5C" focus right
bindkey "^[[1;5A" focus up
bindkey "^[[1;5B" focus down
# Switch windows with F3 (prev) and F4 (next)
bindkey "^[OR" prev
bindkey "^[OS" next
@veerendra2
Copy link
Author

Thanks to original gist https://gist.github.com/joaopizani/2718397 🙏

@veerendra2
Copy link
Author

veerendra2 commented Jul 11, 2019

Have to add these too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment