]> code.delx.au - spectrwm/blobdiff - spectrwm.1
Add 'name' configuration option.
[spectrwm] / spectrwm.1
index 3ef5233ab91d213ceadaed15f16299c0a7c5e998..00b802cc2aac7f5f3c7c5cddede941ddae08a642 100644 (file)
@@ -1,6 +1,6 @@
 .\" Copyright (c) 2009-2012 Marco Peereboom <marco@peereboom.us>
 .\" Copyright (c) 2009 Darrin Chandler <dwchandler@stilyagin.com>
-.\" Copyright (c) 2011-2012 Reginald Kennedy <rk@rejii.com>
+.\" Copyright (c) 2011-2013 Reginald Kennedy <rk@rejii.com>
 .\" Copyright (c) 2011-2012 Lawrence Teo <lteo@lteo.net>
 .\" Copyright (c) 2011-2012 Tiago Cunha <tcunha@gmx.com>
 .\" Copyright (c) 2012 David Hill <dhill@mindcry.org>
@@ -82,6 +82,9 @@ Colors need to be specified per the
 .Xr XQueryColor 3
 specification.
 .Pp
+Comments begin with a #.  When a literal '#' is desired in an option, then it
+must be escaped with a backslash. i.e. \e#
+.Pp
 The file supports the following keywords:
 .Bl -tag -width 2m
 .It Ic autorun
@@ -94,19 +97,27 @@ such as battery life.
 .It Ic bar_at_bottom
 Place the statusbar at the bottom of each region instead of the top.
 .It Ic bar_border Ns Bq Ar x
-Color of the status bar border in screen
+Border color of the status bar(s) in screen
+.Ar x .
+.It Ic bar_border_unfocus Ns Bq Ar x
+Border color of the status bar(s) on unfocused region(s) in screen
 .Ar x .
 .It Ic bar_border_width
 Set status bar border thickness in pixels.
 Disable border by setting to 0.
 .It Ic bar_color Ns Bq Ar x
-Color of the status bar window in screen
+Background color of the status bar(s) in screen
 .Ar x .
-.It Ic bar_delay
-Update frequency, in seconds, of external script that populates the status
-bar.
 .It Ic bar_enabled
-Enable or disable status bar.
+Set default
+.Ar bar_toggle
+state; default is 1.
+.It Ic bar_enabled_ws Ns Bq Ar x
+Set default
+.Ar bar_toggle_ws
+state on workspace
+.Ar x ;
+default is 1.
 .It Ic bar_font
 Font used in the status bar. Either Xft or X Logical Font Description (XLFD)
 may be used to specify fonts. Fallback fonts may be specified by separating
@@ -159,17 +170,18 @@ It may contain the following character sequences:
 .It Sy "Character sequence" Ta Sy "Replaced with"
 .It Li "+<" Ta "Pad with a space"
 .It Li "+A" Ta "Output of the external script"
-.It Li "+C" Ta "Window class"
+.It Li "+C" Ta "Window class (from WM_CLASS)"
 .It Li "+D" Ta "Workspace name"
 .It Li "+F" Ta "Floating indicator"
 .It Li "+I" Ta "Workspace index"
+.It Li "+M" Ta "Number of iconic (minimized) windows in workspace"
 .It Li "+N" Ta "Screen number"
-.It Li "+P" Ta "Window class and title separated by a colon"
+.It Li "+P" Ta "Window class and instance separated by a colon"
 .It Li "+S" Ta "Stacking algorithm"
-.It Li "+T" Ta "Window title"
+.It Li "+T" Ta "Window instance (from WM_CLASS)"
 .It Li "+U" Ta "Urgency hint"
 .It Li "+V" Ta "Program version"
-.It Li "+W" Ta "Window name"
+.It Li "+W" Ta "Window name (from _NET_WM_NAME/WM_NAME)"
 .It Li "++" Ta "A literal" Ql +
 .El
 .Pp
@@ -199,12 +211,20 @@ section below.
 .It Ic border_width
 Set window border thickness in pixels.
 Disable all borders by setting to 0.
+.It Ic boundary_width
+Set region containment boundary width in pixels.  This is how far a window
+must be dragged/resized beyond the region edge before it is allowed outside
+the region.  This has no effect when manipulating the window with key
+bindings.  Disable the window containment effect by setting to 0.
 .It Ic clock_enabled
 Enable or disable displaying the clock in the status bar.
 Disable by setting to 0
 so a custom clock could be used in the
 .Pa bar_action
 script.
+.It Ic iconic_enabled
+Display the number of iconic (minimized) windows in the status bar.
+Enable by setting to 1.
 .It Ic color_focus
 Border color of the currently focussed window.
 .It Ic color_unfocus
@@ -215,7 +235,7 @@ This ratio is the screen size to what they will be resized.
 For example, 0.6 is 60% of the physical screen size.
 .It Ic disable_border
 Remove border when bar is disabled and there is only one window on the
-screen.
+region.
 .It Ic focus_close
 Window to put focus when the focused window is closed.
 Possible values are
@@ -250,6 +270,9 @@ and changes to layout.
 .It Cm manual
 Set window focus on window interaction only.
 .El
+.It Ic java_workaround
+Workaround a Java GUI rendering issue on non-reparenting window managers by
+impersonating LG3D window manager, written by Sun. Default is 1.
 .It Ic keyboard_mapping
 Clear all key bindings and load new key bindings from the specified file.
 This allows you to load pre-defined key bindings for your keyboard layout.
@@ -290,15 +313,21 @@ This setting is not retained at restart.
 .It Ic modkey
 Change mod key.
 Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
+.It Ic name Ns Bq Ar n
+Set name of workspace
+.Ar n
+at start-of-day.
 .It Ic program Ns Bq Ar p
 Define new action to spawn a program
 .Ar p .
 See the
 .Sx PROGRAMS
 section below.
-.It Ic quirk Ns Bq Ar c:n
+.It Ic quirk Ns Bq Ar c:i:n
 Add "quirk" for windows with class
-.Ar c
+.Ar c ,
+instance
+.Ar i
 and name
 .Ar n .
 See the
@@ -310,9 +339,12 @@ same space on the screen.
 Defined in the format screen[<idx>]:WIDTHxHEIGHT+X+Y,
 e.g.\& screen[1]:800x1200+0+0.
 .Pp
-To make a screen span multiple monitors, create a region big enough to cover
-them all, e.g. screen[1]:2048x768+0+0 makes the screen span two monitors with
+To make a region span multiple monitors, create a region big enough to cover
+them all, e.g. screen[1]:2048x768+0+0 makes the region span two monitors with
 1024x768 resolution sitting one next to the other.
+.It Ic region_padding
+Pixel width of empty space within region borders.
+Disable by setting to 0.
 .It Ic spawn_position
 Position in stack to place newly spawned windows.
 Possible values are
@@ -346,29 +378,42 @@ Users may need to set program[term] (see the
 section) to use an alternate copy of the
 .Xr xterm 1
 binary without the setgid bit set.
-.It Ic title_class_enabled
-Enable or disable displaying the window class in the status bar.
-Enable by setting to 1.
-.It Ic title_name_enabled
-Enable or disable displaying the window title in the status bar.
-Enable by setting to 1.
+.It Ic tile_gap
+Pixel width of empty space between tiled windows.  Negative values cause overlap.
+Set this to the opposite of border_width to collapse the border between tiles.
+Disable by setting to 0.
 .It Ic urgent_enabled
-Enable or disable the urgency hint.
-Note that many terminal emulators require this to be enabled for it to
-propagate.
-In xterm, for example, one needs to add the following line
-.Pa xterm.bellIsUrgent: true
-to
-.Pa .Xdefaults .
+Enable or disable the urgency hint indicator in the status bar.
+Note that many terminal emulators require an explicit setting for the bell
+character to trigger urgency on the window.  In xterm, for example, one needs to
+add the following line to
+.Pa .Xdefaults :
+.Bd -literal -offset indent
+xterm.bellIsUrgent: true
+.Ed
 .It Ic verbose_layout
-Enable or disable displaying the current master and stack values in the
-status bar. Enable by setting to 1.
-.It Ic window_name_enabled
-Enable or disable displaying the window name in the status bar.
+Enable or disable displaying the current master window count and stack column/row
+count in the status bar.
 Enable by setting to 1.
+See
+.Pa master_add ,
+.Pa master_del ,
+.Pa stack_inc
+and
+.Pa stack_dec
+for more information.
+.It Ic window_class_enabled
+Enable or disable displaying the window class name (from WM_CLASS) in the
+status bar.  Enable by setting to 1.
+.It Ic window_instance_enabled
+Enable or disable displaying the window instance name (from WM_CLASS) in the
+status bar.  Enable by setting to 1.
+.It Ic window_name_enabled
+Enable or disable displaying the window display name (from _NET_WM_NAME/WM_NAME)
+in the status bar.  Enable by setting to 1.
 .Pp
 To prevent excessively large window names from pushing the remaining text off
-the screen, it's limited to 64 characters, by default.
+the bar, it's limited to 64 characters, by default.
 See the
 .Ic bar_format
 option for more details.
@@ -384,43 +429,22 @@ See the
 .Sx BINDINGS
 section below.
 .Pp
-The default programs are described below:
-.Pp
-.Bl -tag -width "screenshot_wind" -offset indent -compact
-.It Cm term
-xterm
-.It Cm screenshot_all
-screenshot.sh full
-.It Cm screenshot_wind
-screenshot.sh window
-.It Cm lock
-xlock
-.It Cm initscr
-initscreen.sh
-.It Cm menu
-dmenu_run \-fn $bar_font \-nb $bar_color \-nf $bar_font_color \-sb
-$bar_border \-sf $bar_color
-.El
-.Pp
 Custom programs in the configuration file are specified as follows:
 .Pp
-.Dl program[<name>] = <progpath> [<arg> [... <arg>]]
+.Dl program[<action>] = <progpath> [<arg> [... <arg>]]
 .Pp
-.Aq name
+.Aq action
 is any identifier that does not conflict with a built-in action or keyword,
 .Aq progpath
 is the desired program, and
 .Aq arg
 is zero or more arguments to the program.
 .Pp
-The following variables represent settable values in
-.Nm
-(see the
-.Sx CONFIGURATION FILES
-section above),
-and may be used in the
-.Aq arg
-fields and will be substituted for values at the time the program is spawned:
+Remember that when using # in your program call, it must be escaped with a
+backslash. i.e. \e#
+.Pp
+The following argument variables will be substituted for values at the time the program
+is spawned:
 .Pp
 .Bl -tag -width "$bar_font_color" -offset indent -compact
 .It Cm $bar_border
@@ -429,18 +453,56 @@ fields and will be substituted for values at the time the program is spawned:
 .It Cm $bar_font_color
 .It Cm $color_focus
 .It Cm $color_unfocus
+.It Cm $dmenu_bottom
+-b if bar_at_bottom is enabled.
+.It Cm $region_index
+.It Cm $workspace_index
 .El
 .Pp
 Example:
 .Bd -literal -offset indent
 program[ff] = /usr/local/bin/firefox http://spectrwm.org/
-bind[ff] = Mod+Shift+b # Now Mod+Shift+B launches firefox
+bind[ff] = Mod+Shift+b # Now M-S-b launches firefox
 .Ed
 .Pp
-To undo the previous:
+To cancel the previous, unbind it:
 .Bd -literal -offset indent
 bind[] = Mod+Shift+b
-program[ff] =
+.Ed
+.Pp
+Default programs:
+.Bl -tag -width "screenshot_wind" -offset indent -compact
+.It Cm lock
+xlock
+.It Cm menu
+dmenu_run $dmenu_bottom \-fn $bar_font \-nb $bar_color \-nf $bar_font_color \-sb
+$bar_border \-sf $bar_color
+.It Cm term
+xterm
+.It Cm initscr
+initscreen.sh        # optional
+.It Cm screenshot_all
+screenshot.sh full   # optional
+.It Cm screenshot_wind
+screenshot.sh window # optional
+.El
+.Pp
+Note that optional default programs will not be validated unless overridden.
+If a default program fails validation, you can resolve the exception
+by installing the program, modifying the program call or disabling the program
+by freeing the respective key binding.
+.Pp
+For example, to override
+.Ic lock :
+.Bd -literal -offset indent
+program[lock] = xscreensaver-command --lock
+.Ed
+.Pp
+To unbind
+.Ic lock
+and prevent it from being validated:
+.Bd -literal -offset indent
+bind[] = MOD+Shift+Delete
 .Ed
 .Sh BINDINGS
 .Nm
@@ -503,6 +565,8 @@ focus_prev
 .It Cm M-m
 focus_main
 .It Cm M-S-j
+focus_urgent
+.It Cm M-u
 swap_next
 .It Cm M-S-k
 swap_prev
@@ -518,6 +582,10 @@ wind_kill
 .Pf ws_ Aq Ar 1-22
 .It Cm M-S- Ns Aq Ar 1-9,0,F1-F12
 .Pf mvws_ Ns Aq Ar 1-22
+.It Cm M- Ns Aq Ar Keypad 1-9
+.Pf rg_ Aq Ar 1-9
+.It Cm M-S- Ns Aq Ar Keypad 1-9
+.Pf mvrg_ Aq Ar 1-9
 .It Cm M- Ns Aq Cm Right
 ws_next
 .It Cm M- Ns Aq Cm Left
@@ -527,11 +595,15 @@ ws_next_all
 .It Cm M- Ns Aq Cm Down
 ws_prev_all
 .It Cm M-a
+ws_next_move
+.It Cm M-S- Ns Aq Cm Left
+ws_prev_move
+.It Cm M-S- Ns Aq Cm Up
 ws_prior
 .It Cm M-S- Ns Aq Cm Right
-screen_next
+rg_next
 .It Cm M-S- Ns Aq Cm Left
-screen_prev
+rg_prev
 .It Cm M-s
 screenshot_all
 .It Cm M-S-s
@@ -621,6 +693,8 @@ Focus next window in workspace.
 Focus previous window in workspace.
 .It Cm focus_main
 Focus on main window in workspace.
+.It Cm focus_urgent
+Focus on next window with the urgency hint flag set.  The workspace is switched if needed.
 .It Cm swap_next
 Swap with next window in workspace.
 .It Cm swap_prev
@@ -645,6 +719,18 @@ Move current window to workspace
 where
 .Ar n
 is 1 through workspace_limit.
+.It Cm rg_ Ns Ar n
+Focus on region
+.Ar n ,
+where
+.Ar n
+is 1 through 9.
+.It Cm mvrg_ Ns Ar n
+Move current window to region
+.Ar n ,
+where
+.Ar n
+is 1 through 9.
 .It Cm ws_next
 Switch to next workspace with a window in it.
 .It Cm ws_prev
@@ -653,12 +739,16 @@ Switch to previous workspace with a window in it.
 Switch to next workspace.
 .It Cm ws_prev_all
 Switch to previous workspace.
+.It Cm ws_next_move
+Switch to next workspace with the current window.
+.It Cm ws_prev_move
+Switch to previous workspace with the current window.
 .It Cm ws_prior
 Switch to last visited workspace.
-.It Cm screen_next
-Move pointer to next region.
-.It Cm screen_prev
-Move pointer to previous region.
+.It Cm rg_next
+Switch to next region.
+.It Cm rg_prev
+Switch to previous region.
 .It Cm screenshot_all
 Take screenshot of entire screen (if enabled)
 (see
@@ -686,7 +776,9 @@ above).
 .It Cm iconify
 Minimize (unmap) currently focused window.
 .It Cm uniconify
-Maximize (map) window returned by dmenu selection.
+Restore (map) window returned by dmenu selection.
+.It Cm maximize_toggle
+Toggle maximization of focused window.
 .It Cm always_raise
 When set tiled windows are allowed to obscure floating windows.
 .It Cm button2
@@ -720,12 +812,13 @@ Custom bindings in the configuration file are specified as follows:
 .Dl bind[<action>] = <keys>
 .Pp
 .Aq action
-is one of the actions listed above (or empty) and
+is one of the actions listed above (or empty to unbind) and
 .Aq keys
 is in the form of zero or more modifier keys
 (MOD, Mod1, Shift, etc.) and one or more normal keys
 (b, space, etc.), separated by "+".
-For example:
+.Pp
+Example:
 .Bd -literal -offset indent
 bind[reset] = Mod4+q # bind Windows-key + q to reset
 bind[] = Mod1+q # unbind Alt + q
@@ -827,30 +920,60 @@ Allow window to position itself, uncentered.
 .It XTERM_FONTADJ
 Adjust xterm fonts when resizing.
 .It FULLSCREEN
-Remove border to allow window to use full screen size.
+Remove border to allow window to use full region size.
 .It FOCUSPREV
 On exit force focus on previously focused application not previous
 application in the stack.
+.It NOFOCUSONMAP
+Don't change focus to the window when it first appears on the screen.
+Has no effect when
+.Ic focus_mode
+is set to follow.
+.It FOCUSONMAP_SINGLE
+When the window first appears on the screen, change focus to the window
+if there are no other windows on the workspace with the same WM_CLASS
+class/instance value.  Has no effect when
+.Ic focus_mode
+is set to follow.
 .El
 .Pp
 Custom quirks in the configuration file are specified as follows:
 .Pp
-.Dl quirk[<class>:<name>] = <quirk> [ + <quirk> ... ]
+.Dl quirk[<class>[:<instance>[:<name>]]] = <quirk> [ + <quirk> ... ]
 .Pp
-.Aq class
-and
+.Aq class ,
+.Aq instance
+(optional) and
 .Aq name
-specify the window to which the quirk(s) apply, and
+(optional) are patterns used to determine which window(s) the quirk(s) apply
+and
 .Aq quirk
 is one of the quirks from the list above.
+.Pp
+Note that patterns are interpreted as POSIX Extended Regular Expressions.
+Any ':', '[' or ']' must be escaped with '\\'.
+See
+.Xr regex 7
+for more information on POSIX Extended Regular Expressions.
+.Pp
 For example:
 .Bd -literal -offset indent
-quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
-quirk[pcb:pcb] = NONE  # remove existing quirk
+quirk[MPlayer] = FLOAT + FULLSCREEN + FOCUSPREV # Float all windows having a \
+class of 'MPlayer'
+quirk[.*] = FLOAT # Float all windows by default.
+quirk[.*:.*:.*] = FLOAT # Same as above.
+quirk[Firefox:Navigator] = FLOAT # Float all Firefox browser windows.
+quirk[::Console] = FLOAT # Float windows with WM_CLASS not set and a \
+window name of 'Console'.
+quirk[\\[0-9\\].*:.*:\\[\\[\\:alnum\\:\\]\\]*] = FLOAT # Float windows with WM_CLASS \
+class beginning with a number, any WM_CLASS instance and a \
+_NET_WM_NAME/WM_NAME either blank or containing alphanumeric characters without spaces.
+quirk[pcb:pcb] = NONE # remove existing quirk
 .Ed
 .Pp
 You can obtain
-.Aq class
+.Aq class ,
+.Aq instance
 and
 .Aq name
 by running
@@ -858,11 +981,18 @@ by running
 and then clicking on the desired window.
 In the following example the main window of Firefox was clicked:
 .Bd -literal -offset indent
-$ xprop | grep WM_CLASS
+$ xprop | grep -E "^(WM_CLASS|_NET_WM_NAME|WM_NAME)"
 WM_CLASS(STRING) = "Navigator", "Firefox"
+WM_NAME(STRING) = "spectrwm - ConformalOpenSource"
+_NET_WM_NAME(UTF8_STRING) = "spectrwm - ConformalOpenSource"
 .Ed
 .Pp
-Note that grepping for WM_CLASS flips class and name.
+Note that
+.Xr xprop 1
+displays WM_CLASS as:
+.Bd -literal -offset indent
+WM_CLASS(STRING) = "<instance>", "<class>"
+.Ed
 In the example above the quirk entry would be:
 .Bd -literal -offset indent
 quirk[Firefox:Navigator] = FLOAT
@@ -913,7 +1043,7 @@ and
 .Xr grep 1 :
 .Bd -literal -offset indent
 $ WINDOWID=`xprop \-root _NET_ACTIVE_WINDOW | grep \-o "0x.*"`
-$ xprop \-id $WINDOWID WM_NAME | grep \-o "\\".*\\""
+$ xprop \-id $WINDOWID _NET_WM_NAME | grep \-o "\\".*\\""
 .Ed
 .Pp
 A window can be focused by sending a _NET_ACTIVE_WINDOW client message
@@ -949,6 +1079,12 @@ or un-floated):
 $ wmctrl \-i \-r 0x4a0000b \-b toggle,_NET_WM_STATE_ABOVE
 .Ed
 .Pp
+Windows can also be iconified and un-iconified by substituting
+_NET_WM_STATE_HIDDEN for _NET_WM_STATE_ABOVE in the previous example:
+.Bd -literal -offset indent
+$ wmctrl \-i \-r 0x4a0000b \-b toggle,_NET_WM_STATE_HIDDEN
+.Ed
+.Pp
 Floating windows can also be resized and moved by sending a
 _NET_MOVERESIZE_WINDOW client message to the root window.
 For example,