Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gnu_screen [2015/08/02 16:56] – mgupton | gnu_screen [2016/02/04 16:14] (current) – mgupton | ||
---|---|---|---|
Line 15: | Line 15: | ||
* quit: Ctrl-a Ctrl-\ | * quit: Ctrl-a Ctrl-\ | ||
* quit: screen -S <session id> -X quit | * quit: screen -S <session id> -X quit | ||
+ | * quit: Ctrl-a :quit | ||
* windows | * windows | ||
* create: Ctrl-a c | * create: Ctrl-a c | ||
Line 24: | Line 25: | ||
* split: Ctrl-a S | * split: Ctrl-a S | ||
* remove: Ctrl-a X | * remove: Ctrl-a X | ||
+ | * remote all but the current region: Ctrl-a Q | ||
* move to region: Ctrl-a tab | * move to region: Ctrl-a tab | ||
* scrollback/ | * scrollback/ | ||
Line 40: | Line 42: | ||
======Nested Sessions====== | ======Nested Sessions====== | ||
* Use key sequence '' | * Use key sequence '' | ||
+ | |||
+ | ======.screenrc Configuration====== | ||
+ | * [[https:// | ||
+ | |||
+ | < | ||
+ | # the following two lines give a two-line status, with the current window highlighted | ||
+ | hardstatus alwayslastline | ||
+ | hardstatus string '%{= kG}[%{G}%H%? | ||
+ | |||
+ | # huge scrollback buffer | ||
+ | defscrollback 5000 | ||
+ | |||
+ | # no welcome message | ||
+ | startup_message off | ||
+ | |||
+ | # 256 colors | ||
+ | attrcolor b " | ||
+ | termcapinfo xterm ' | ||
+ | defbce on | ||
+ | |||
+ | # mouse tracking allows to switch region focus by clicking | ||
+ | mousetrack on | ||
+ | |||
+ | # default windows | ||
+ | # screen -t Shell1 | ||
+ | # screen -t Shell2 | ||
+ | # screen -t Python | ||
+ | # screen -t Media 4 bash | ||
+ | # select 0 | ||
+ | # bind c screen 1 # window numbering starts at 1 not 0 | ||
+ | # bind 0 select 10 | ||
+ | |||
+ | # get rid of silly xoff stuff | ||
+ | bind s split | ||
+ | |||
+ | # layouts | ||
+ | layout autosave on | ||
+ | layout new one | ||
+ | select 1 | ||
+ | layout new two | ||
+ | select 1 | ||
+ | split | ||
+ | resize -v +8 | ||
+ | focus down | ||
+ | select 4 | ||
+ | focus up | ||
+ | layout new three | ||
+ | select 1 | ||
+ | split | ||
+ | resize -v +7 | ||
+ | focus down | ||
+ | select 3 | ||
+ | split -v | ||
+ | resize -h +10 | ||
+ | focus right | ||
+ | select 4 | ||
+ | focus up | ||
+ | |||
+ | layout attach one | ||
+ | layout select one | ||
+ | |||
+ | # navigating regions with Ctrl-arrows | ||
+ | bindkey " | ||
+ | bindkey " | ||
+ | bindkey " | ||
+ | bindkey " | ||
+ | |||
+ | # switch windows with F3 (prev) and F4 (next) | ||
+ | bindkey " | ||
+ | bindkey " | ||
+ | |||
+ | # switch layouts with Ctrl+F3 (prev layout) and Ctrl+F4 (next) | ||
+ | bindkey " | ||
+ | bindkey " | ||
+ | |||
+ | # F2 puts Screen into resize mode. Resize regions using hjkl keys. | ||
+ | bindkey " | ||
+ | |||
+ | # use hjkl keys to resize regions | ||
+ | bind -c rsz h eval " | ||
+ | bind -c rsz j eval " | ||
+ | bind -c rsz k eval " | ||
+ | bind -c rsz l eval " | ||
+ | |||
+ | # quickly switch between regions using tab and arrows | ||
+ | bind -c rsz \t eval " | ||
+ | bind -c rsz -k kl eval "focus left" | ||
+ | bind -c rsz -k kr eval "focus right" " | ||
+ | bind -c rsz -k ku eval "focus up" | ||
+ | bind -c rsz -k kd eval "focus down" | ||
+ | </ |