Document set-window-option, update example.

This commit is contained in:
Nicholas Marriott 2008-06-17 06:18:44 +00:00
parent ff21dbd58b
commit c9a650c5d4
3 changed files with 63 additions and 23 deletions

3
TODO
View File

@ -69,9 +69,6 @@
- get rid of DEFDATA etc
-- For 0.3 --------------------------------------------------------------------
- man page:
set-window-option
show-window-options
-- For 0.4 --------------------------------------------------------------------
- test and fix wsvt25

View File

@ -9,22 +9,31 @@ unbind ^B
bind ^A send-prefix
# Keys to switch session.
bind q switch 0
bind Q switch 0
bind w switch 1
bind W switch 1
bind e switch 2
bind E switch 2
bind q switch -t0
bind Q switch -t0
bind w switch -t1
bind W switch -t1
bind e switch -t2
bind E switch -t2
# Other key bindings.
bind I list-windows
bind i list-windows
bind I list-windows
bind m setw monitor-activity
bind M setw monitor-activity
bind y setw force-width 81
bind Y setw force-width 81
bind u setw force-width 0
bind U setw force-width 0
# First session.
new -d -s0 -nirssi 'screen -DRS irssi irssi' # safe from pkill tmux ;-)
setw -s0 -i0 monitor-activity on
set -s0 status-bg green
set -s0 status-left '[0]'
setw -t0:0 monitor-activity on
setw -t0:0 aggressive-resize on
set -t0 status-bg green
set -t0 status-left '[0]'
neww -d -ntodo 'exec emacs ~/TODO'
neww -d -nncmpc
neww -d
@ -37,19 +46,18 @@ neww -d
# Second session.
new -d -s1
set -s1 status-bg cyan
set -s1 status-left '[1]'
linkw -dk -i0 0 0
set -t1 status-bg cyan
set -t1 status-left '[1]'
linkw -dk -t0 -s0:0
neww -d
neww -d
neww -d
# Third session.
new -d -s2
set -s2 status-bg yellow
set -s2 status-left '[2]'
linkw -dk -i0 0 0
set -t2 status-bg yellow
set -t2 status-left '[2]'
linkw -dk -t0 -s0:0
neww -d
neww -d
neww -d

41
tmux.1
View File

@ -1,4 +1,4 @@
.\" $Id: tmux.1,v 1.36 2008-06-16 22:03:27 nicm Exp $
.\" $Id: tmux.1,v 1.37 2008-06-17 06:18:44 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@ -272,7 +272,7 @@ is either the name of a session (as listed by the
.Ic list-sessions
command); or the name of a client as for
.Ar target-client ,
in this case, the session attached to the client is used.
in this case, the session attached to the client is used.
An
.Xr fnmatch 3
pattern may be used to match the session name.
@ -291,7 +291,8 @@ The session is in the same form as for
.Ar target-session .
.Em session ,
.Em index
or both may be omitted. If
or both may be omitted.
If
.Em session
is omitted, the same rules as for
.Ar target-session
@ -584,6 +585,40 @@ or
.It Ic status-fg Ar colour
Set status line foreground colour.
.El
.It Xo Ic set-window-option
.Op Fl t Ar target-window
.Ar option Ar value
.Xc
.D1 (alias: Ic setw )
Set a window-specific option.
Supported options are:
.Bl -tag -width Ds
.It Xo Ic aggressive-resize
.Op Ic on | Ic off
.Xc
Aggressively resize the chosen window.
This means that
.Nm
will resize the window to the size of the smallest session for which it is the
current window, rather than the smallest session to which it is attached.
The window may resize when the current window is changed on another sessions;
this option is good for full-screen programs which support SIGWINCH and poor for
interactive programs such as shells.
.It Xo Ic monitor-activity
.Op Ic on | Ic off
.Xc
Monitor for activity in the window.
Windows with activity are highlighted in the status line.
.It Ic force-width Ar width
.It Ic force-height Ar height
Prevent
.Nm
from resizing a window to greater than
.Ar width
or
.Ar height .
A value of zero restores the default unlimited setting.
.El
.It Xo Ic show-options
.Op Fl t Ar target-session
.Ar option Ar value