Screen

From Wikifications
Revision as of 18:42, 19 May 2006 by Dre (Talk | contribs) (Navigation)

Jump to: navigation, search

Basics

Control-a (C-a) is screen attention sequence and preceeds all screen commands. For example, to create a new screen window, type control-a, then c. To clarify even further: hold control, type a, release control, press c.

c         = new window
k         = kill current window
d         = detach from screen
?         = show online help

From outside of the screen session:

screen -R = reattach
screen -x = multi-attach

caption and hardstatus

I use the following with Terminal's color scheme set to green on black:

caption always "%{Mk}%?%-Lw%?%{km}[%n*%f %t]%?(%u)%?%{mk}%?%+Lw%? %{mk}"
hardstatus alwayslastline "%{kW}%H %{kB}|%{km} %l %=%{km}%c:%s %D %M/%d/%Y "

Navigation

"         = list window names, numbers, and flags
N         = show current window number
A         = set window name
'         = specify name or number to switch to
space     = next window
backspace = prev window
#         = goto window number #
w         = show window list in status bar
C-a       = switch to most recent window

Split Windows

S         = create split in current region
tab       = move to next region
X         = delete current region
Q         = delete all but current region

Monitoring

M         = toggle activity monitor notifications in status bar
_         = toggle INactivity monitor notification in status bar (e.g. for when something's done compiling)
m         = recall last message displayed in status bar
C-g       = toggle audio / visual bell
t         = show time / load average

Scrollback / copy mode movement keys

[       = enter copy mode
        h, j, k, l move the cursor line by line or column by column.
        0,  ^  and  $  move to the leftmost column, to the first or last non-
          whitespace character on the line.
        H, M and L move the cursor to the leftmost column of the top,  center
          or bottom line of the window.
        + and - positions one line up and down.
        G moves to the specified absolute line (default: end of buffer).
        | moves to the specified absolute column.
        w, b, e move the cursor word by word.
        B, E move the cursor WORD by WORD (as in vi).
        C-u  and  C-d  scroll  the display up/down by the specified amount of
          lines while preserving the cursor position. (Default: half  screen-
          full).
        C-b and C-f scroll the display up/down a full screen.
        g moves to the beginning of the buffer.
        % jumps to the specified percentage of the buffer.

Commands

Commands can exist in .screenrc or can be entered interactively with C-a, :

send the 'whoami' command to all screen windows simultaneously (\015 is octal for carriage return)

at \# stuff "whoami\015"

back to Main Page