Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
region_management [2010-01-25 16:02]
asciiphil created
region_management [2021-02-16 20:32] (current)
Line 1: Line 1:
-This is a skeleton page for now.+====== Region Management in screen ======
  
-  * ''[[commands:focus]]'' +===== Basics ===== 
-  * ''[[commands:only]]'' + 
-  * ''[[commands:remove]]'' +''screen'' allows you to split the display into multiple regions and 
-  * ''[[commands:resize]]'' +display a different window in each region.  (You can also, of course, 
-  * ''[[commands:split]]''+display the same window in more than one region.) 
 + 
 +Use ''[[commands:split|C-a S]]'' to split the display horizontally and 
 +''[[commands:split|C-a |]]'' to split the display vertically.  When you 
 +create a new region, ''screen'' resizes the other regions in the same 
 +column (for horizontal splits) or row (for vertical splits) so that all of 
 +them have approximately the same size. 
 + 
 +<box red 80% | :!: Note about vertical splits:> 
 +Vertically-split regions are a feature not in the last stable release of 
 +''screen''; they're available in the Debian and Ubuntu ''screen'' 
 +packages and the current ''screen'' development code.  They will be in the 
 +next release. 
 +</box> 
 + 
 +To remove regions, you can either use ''[[commands:remove|C-a X]]'' to 
 +remove the current region or ''[[commands:only|C-a Q]]'' to remove all 
 +regions //except// the current one. 
 + 
 +===== Extras ===== 
 + 
 +==== Resizing Regions ==== 
 + 
 +Resizing is done via the ''[[commands:resize]]'' command.  Without an 
 +argument, it will prompt for the new height of the current region. 
 +plain numeric argument will resize the region to the specified number of 
 +lines.  A numeric argument with a leading ''+'' or ''-'' will add or 
 +subtract the specified number of lines from the region.  An argument of 
 +"''min''" will reduce the region's height as much as possible (generally 
 +down to one line high).  An argument of "''max''" will increase the 
 +region's height as much as possible (generally reducing the height of the 
 +other regions in the column to one line).  Finally, an argument of ''='' 
 +will adjust the height of all regions in the display so that all regions 
 +in a given column are of roughly equal height. 
 + 
 +As a special case, if the ''[[commands:resize]]'' command is issued from 
 +a vertically-split region--that is, a region that does not have any other 
 +regions in its column--all of the sizing applies to regions' widths, not 
 +their heights.  Be careful when narrowing regions!  The amount of text you 
 +can type into ''screen'''s [[commands:colon|command line]] is limited to 
 +the width of the current region. 
 + 
 +When a region is shrunk, it adds space to the region either below it or to 
 +its right (depending on whether its height or width is being decreased). 
 +When a region is expanded, it takes space away from the region either 
 +below it or to its right.  If the immediately adjacent region is a small 
 +as possible, space is taken from the next closest region in the same 
 +direction.  If every region in that direction is as small as possible, 
 +space is taken from the closest region in the opposite direction that can 
 +spare it. 
 + 
 +==== Focusing Regions ==== 
 + 
 +The ''[[commands: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 ''[[commands: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 
 +[[faq#when_i_split_the_display_and_then_detach_screen_forgets_the_split|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. 
 + 
 +===== Keybindings ===== 
 + 
 +  * ''[[commands:focus|C-a tab]]'' - switch input focus to the next region. 
 +  * ''[[commands:only|C-a Q]]'' - remove all regions but the current one. 
 +  * ''[[commands:split|C-a S]]'' - split the current region horizontally into two new regions. 
 +  * ''[[commands:remove|C-a X]]'' - remove the current region. 
 +  * ''[[commands:split|C-a |]]'' - split the current region vertically into two new regions. 
 + 
 +===== Commands ===== 
 + 
 +  * ''[[commands:focus]]'' - Moves input focus between regions. 
 +  * ''[[commands:only]]'' - Removes all regions except the current one. 
 +  * ''[[commands:remove]]'' - Removes the current region. 
 +  * ''[[commands:resize]]'' - Resizes the current region. 
 +  * ''[[commands:split]]'' - Splits the current region into two new regions.
  

User Tools