Skip to content

Instantly share code, notes, and snippets.

@dryliketoast
Created December 24, 2016 21:34
Show Gist options
  • Save dryliketoast/9e20f5fe7a7d4bb7cabbdc0e76a2f161 to your computer and use it in GitHub Desktop.
Save dryliketoast/9e20f5fe7a7d4bb7cabbdc0e76a2f161 to your computer and use it in GitHub Desktop.
Keybindings
C-a tab - switch input focus to the next region.
C-a Q - remove all regions but the current one.
C-a S - split the current region horizontally into two new regions.
C-a X - remove the current region.
C-a | - split the current region vertically into two new regions.
Focusing Regions
The focus command is relatively simplistic. Even though regions may be laid out in a two-dimensional space, screen maintains them internally as a simple list, and focus simply moves forwards or backwards through the list. (There are also focus subcommands to jump to the beginning of the list–the upper-leftmost region–and to the end of the list–the lower rightmost region.) The order is pretty intuitive, and it's easier to tell you to try it out than to try to describe it.
Regions as a Display Property
One thing that catches some people unawares is that the division of the display into regions is solely a property of the display. The screen session that hosts all of your windows doesn't know how the display was split. This has the consequence that as soon as you detach from a screen session, the layout of regions on your display is lost; the next time you attach, you'll have to recreate that layout.
Currently, the best way to keep your display layout is to use nested screen sessions, as described in the FAQ entry when I split the display and then detach, screen forgets the split. The next release of screen will have new commands to save and restore region layouts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment