30 March 2017

Screen Cheatsheet & screenrc

This is my little cheatsheet for screen - one of my most used cli programs under Linux. I know that some people hyping alternatives like tmux like mad, but I prefer working under the "if it ain't broken, don't try to fix it" premise.

I have also added my little ~/.screenrc which I prefer to use on the machine I work with.

Cheatsheet:

KeyAction
Ctrl+a ccreate new window
Ctrl+a nnext window
Ctrl+a pprevious window
Ctrl+a "select a window from a list
Ctrl+a Ctrl+ajump to the previous viewed window
Ctrl+a Aset the title of the current window
Ctrl+a Ssplit horizontally
Ctrl+a
Ctrl+a :resizeresize the active region
Ctrl+a Ffit screen size to terminal size
Ctrl+a Xremove active region
Ctrl+a [Tab]switch between regions
Ctrl+a ddetach from screen
Ctrl+a [enter scrollback mode
Ctrl+a ]exit scrollback mode
Ctrl+a ?show key bindings and command names

~/.screenrc:

# F11 & F12 to go to next/previous window
bindkey -k F1 prev
bindkey -k F2 next

# disable startup text
startup_message off

# show a list of open windows in a screen session:
hardstatus alwayslastline
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"

# important for editors like nano
altscreen on

Comments: