]> code.delx.au - spectrwm/blobdiff - spectrwm.1
linux: Use --as-needed when linking
[spectrwm] / spectrwm.1
index 1a7ac7458d4a542ce9b7434dddd1856942268d60..6e7f521abde93e1a2e90dc556c49c19674491987 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-2014 Reginald Kennedy <rk@rejii.com>
+.\" Copyright (c) 2011-2015 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>
@@ -50,16 +50,12 @@ Meta
 .It Cm S
 Shift
 .It Aq Cm Name
-Named key
-.It Cm M1
-Mouse button 1
-.It Cm M3
-Mouse button 3
+Named key or button
 .El
 .Pp
 .Nm
 is very simple in its use.
-Most of the actions are initiated via key or mouse bindings.
+Most of the actions are initiated via key or pointer bindings.
 See the
 .Sx BINDINGS
 section below for defaults and customizations.
@@ -85,10 +81,10 @@ Colors need to be specified per the
 .Xr XQueryColor 3
 specification.
 .Pp
-Comments begin with a #.  When a literal
+Comments begin with a #.
+When a literal
 .Ql #
-is desired in an option, then it
-must be escaped with a backslash. i.e. \e#
+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
@@ -97,7 +93,29 @@ Launch an application in a specified workspace at start-of-day.
 Defined in the format
 .Li ws Ns Bo Ar idx Bc : Ns Ar application ,
 e.g. ws[2]:xterm launches an
-xterm in workspace 2.
+.Xr xterm 1
+in workspace 2.
+.Pp
+Note that workspace mapping is handled via
+.Pa libswmhack.so .
+When
+.Ic autorun
+spawns windows via a daemon, ensure the daemon is started
+with the correct
+.Pa LD_PRELOAD
+in its environment.
+.Pp
+For example, starting
+.Xr urxvtd 1
+via
+.Xr xinit 1 :
+.Bd -literal -offset indent
+LD_PRELOAD=/usr/lib/libswmhack.so.0.0 urxvtd -q -o -f
+.Ed
+.Pp
+Spawned programs automatically have
+.Pa LD_PRELOAD
+set when executed.
 .It Ic bar_action
 External script that populates additional information in the status bar,
 such as battery life.
@@ -126,12 +144,15 @@ 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
-each font with a comma. If all entries are in XLFD syntax, font set will be
-used. If at least one entry is Xft, Xft will be used. Note that if Xft is in
-use, only the first font that successfully loads will be used regardless of
-missing glyphs. The default is to use font set. Also note that
+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 each font with a comma.
+If all entries are in XLFD syntax, font set will be used.
+If at least one entry is Xft, Xft will be used.
+Note that if Xft is in use, only the first font that successfully loads will
+be used regardless of missing glyphs.
+The default is to use font set.
+Also note that
 .Xr dmenu 1
 does not support Xft fonts.
 .Pp
@@ -193,10 +214,11 @@ It may contain the following character sequences:
 .El
 .Pp
 All character sequences may limit its output to a specific length, for
-example +64A. Any characters that don't match the specification are copied
-as-is.
+example +64A.
+Any characters that don't match the specification are copied as-is.
 .It Ic bar_justify
-Justify the status bar text. Possible values are
+Justify the status bar text.
+Possible values are
 .Ar left ,
 .Ar center ,
 and
@@ -209,7 +231,7 @@ See the
 .Ic bar_format
 option for more details.
 .It Ic bind Ns Bq Ar x
-Bind key combo to action
+Bind key or button combo to action
 .Ar x .
 See the
 .Sx BINDINGS
@@ -218,10 +240,10 @@ section below.
 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.
+Set region containment boundary width in pixels.
+This is how far a window must be dragged/resized (with the pointer)
+beyond the region edge before it is allowed outside the region.
+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
@@ -232,15 +254,17 @@ script.
 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 focused window.  Default is red.
+Border color of the currently focused window.
+Default is red.
 .It Ic color_focus_maximized
-Border color of the currently focused, maximized window.  Defaults to the
-value of
+Border color of the currently focused, maximized window.
+Defaults to the value of
 .Ic color_focus .
 .It Ic color_unfocus
 Border color of unfocused windows, default is rgb:88/88/88.
 .It Ic color_unfocus_maximized
-Border color of unfocused, maximized windows.  Defaults to the value of
+Border color of unfocused, maximized windows.
+Defaults to the value of
 .Ic color_unfocus .
 .It Ic dialog_ratio
 Some applications have dialogue windows that are too small to be useful.
@@ -263,15 +287,18 @@ and
 are relative to the window that is closed.
 .It Ic focus_close_wrap
 Whether to allow the focus to jump to the last window when the first window
-is closed or vice versa. Disable by setting to 0.
+is closed or vice versa.
+Disable by setting to 0.
 .It Ic focus_default
-Window to put focus when no window has been focused. Possible values are
+Window to put focus when no window has been focused.
+Possible values are
 .Ar first
 and
 .Ar last
 (default).
 .It Ic focus_mode
-Window focus behavior with respect to the mouse cursor. Possible values:
+Window focus behavior with respect to the pointer.
+Possible values:
 .Pp
 .Bl -tag -width "default" -offset indent -compact
 .It Ar default
@@ -283,18 +310,26 @@ and changes to layout.
 .It Ar manual
 Set window focus on window interaction only.
 .El
+.It Ic maximize_hide_bar
+When set to 1,
+.Ic maximize_toggle
+will also hide/restore the bar visibility of the affected workspace.
+Defaults to 0.
 .It Ic java_workaround
 Workaround a Java GUI rendering issue on non-reparenting window managers by
-impersonating the LG3D window manager, written by Sun. Default is 1.
+impersonating the 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.
+Clear all key bindings (not button bindings) and load new bindings from the
+specified file.
 This allows you to load pre-defined key bindings for your keyboard layout.
 See the
 .Sx KEYBOARD MAPPING FILES
 section below for a list of keyboard mapping files that have been provided
 for several keyboard layouts.
 .It Ic layout
-Select layout to use at start-of-day. Defined in the format
+Select layout to use at start-of-day.
+Defined in the format
 .Li ws Ns Bo Ar idx Bc : Ns Ar master_grow : Ns Ar master_add : Ns Ar stack_inc : Ns Ar always_raise : Ns Ar stack_mode ,
 e.g. ws[2]:-4:0:1:0:horizontal sets worskspace 2 to the horizontal stack
 mode, shrinks the master area by 4 ticks and adds one window to the
@@ -316,11 +351,13 @@ See
 .Ic master_del ,
 .Ic stack_inc ,
 .Ic stack_dec ,
+.Ic stack_balance ,
 and
 .Ic always_raise
 for more information.
-Note that the stacking options are complicated and have side-effects. One
-should familiarize oneself with these commands before experimenting with the
+Note that the stacking options are complicated and have side-effects.
+One should familiarize oneself with these commands before experimenting
+with the
 .Ic layout
 option.
 .Pp
@@ -397,16 +434,22 @@ section) to use an alternate copy of the
 .Xr xterm 1
 binary without the setgid bit set.
 .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.
+Pixel width of empty space between tiled windows.
+Negative values cause overlap.
+Set this to the opposite of
+.Ic border_width
+to collapse the border between tiles.
 Disable by setting to 0.
 .It Ic urgent_collapse
-Enables hiding of placeholders in the urgency hint indicator for workspaces that
-do not have any urgent windows.  Enable by setting to 1.
+Minimizes the space consumed by the urgency hint indicator by removing the
+placeholders for non-urgent workspaces, the trailing space when there are
+urgent windows and the default leading space.
+Enable by setting to 1.
 .It Ic urgent_enabled
 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
+character to trigger urgency on the window.
+In
 .Xr xterm 1 ,
 for example, one needs to add the following line to
 .Pa .Xdefaults :
@@ -424,27 +467,47 @@ See
 and
 .Ar stack_dec
 for more information.
+.It Ic workspace_clamp
+Prevents workspaces from being swapped when attempting to switch to a workspace
+that is mapped to another region.
+Use
+.Ar warp_focus
+if you want to focus on the region containing the workspace and
+.Ar warp_pointer
+if you want to also send the pointer.
+Enable by setting to 1.
 .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.
+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.
+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.
+in the status bar.
+Enable by setting to 1.
 .Pp
 To prevent excessively large window names from pushing the remaining text off
 the bar, it's limited to 64 characters, by default.
 See the
 .Ic bar_format
 option for more details.
+.It Ic warp_focus
+Focus on the target window/workspace/region when clamped.
+For example, when attempting to switch to a workspace that is mapped on another
+region and
+.Ar workspace_clamp
+is enabled, focus on the region with the target workspace.
+Enable by setting to 1.
 .It Ic warp_pointer
-Centers the mouse pointer on the focused window when using key bindings to
-change focus, switch workspaces, change regions, etc.  Enable by setting to 1.
+Centers the pointer on the focused window when using bindings to
+change focus, switch workspaces, change regions, etc.
+Enable by setting to 1.
 .It Ic workspace_limit
-Set the total number of workspaces available. Minimum is 1, maximum is 22,
-default is 10.
+Set the total number of workspaces available.
+Minimum is 1, maximum is 22, default is 10.
 .El
 .Sh PROGRAMS
 .Nm
@@ -465,8 +528,9 @@ is the desired program, and
 .Ar arg
 is zero or more arguments to the program.
 .Pp
-Remember that when using # in your program call, it must be escaped with a
-backslash. i.e. \e#
+Remember that when using
+.Ql #
+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:
@@ -479,7 +543,9 @@ is spawned:
 .It Cm $color_focus
 .It Cm $color_unfocus
 .It Cm $dmenu_bottom
-\-b if bar_at_bottom is enabled.
+\-b if
+.Ic bar_at_bottom
+is enabled.
 .It Cm $region_index
 .It Cm $workspace_index
 .El
@@ -515,12 +581,12 @@ screenshot.sh window # optional
 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.
+by freeing the respective binding.
 .Pp
 For example, to override
 .Ic lock :
 .Bd -literal -offset indent
-program[lock] = xscreensaver\-command \-\-lock
+program[lock] = xscreensaver\-command \-lock
 .Ed
 .Pp
 To unbind
@@ -531,24 +597,19 @@ bind[] = MOD+Shift+Delete
 .Ed
 .Sh BINDINGS
 .Nm
-provides many functions (or actions) accessed via key or mouse bindings.
-.Pp
-The current mouse bindings are described below:
-.Pp
-.Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
-.It Cm M1
-Focus window
-.It Cm M-M1
-Move window
-.It Cm M-M3
-Resize window
-.It Cm M-S-M3
-Resize window while maintaining it centered
-.El
+provides many functions (or actions) accessed via key or pointer bindings.
 .Pp
-The default key bindings are described below:
+The default bindings are listed below:
 .Pp
 .Bl -tag -width "M-j, M-<TAB>XXXXXX" -offset indent -compact
+.It Cm Ns Aq Cm Button1
+focus
+.It Cm M- Ns Aq Cm Button1
+move
+.It Cm M- Ns Aq Cm Button3
+resize
+.It Cm M-S- Ns Aq Cm Button3
+resize_centered
 .It Cm M-S- Ns Aq Cm Return
 term
 .It Cm M-p
@@ -563,6 +624,8 @@ cycle_layout
 flip_layout
 .It Cm M-S- Ns Aq Cm Space
 stack_reset
+.It Cm Aq Ar unbound
+stack_balance
 .It Cm M-h
 master_shrink
 .It Cm M-l
@@ -611,6 +674,10 @@ wind_kill
 .Pf rg_ Aq Ar 1-9
 .It Cm M-S- Ns Aq Ar Keypad 1-9
 .Pf mvrg_ Aq Ar 1-9
+.It Cm Aq Ar unbound
+mvrg_next
+.It Cm Aq Ar unbound
+mvrg_prev
 .It Cm M- Ns Aq Cm Right
 ws_next
 .It Cm M- Ns Aq Cm Left
@@ -620,15 +687,19 @@ 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_prior
+.It Cm M-S- Ns Aq Cm Down
 ws_prev_move
 .It Cm M-S- Ns Aq Cm Up
-ws_prior
+ws_next_move
 .It Cm M-S- Ns Aq Cm Right
 rg_next
 .It Cm M-S- Ns Aq Cm Left
 rg_prev
+.It Cm Aq Ar unbound
+rg_move_next
+.It Cm Aq Ar unbound
+rg_move_prev
 .It Cm M-s
 screenshot_all
 .It Cm M-S-s
@@ -647,6 +718,10 @@ iconify
 uniconify
 .It Cm M-e
 maximize_toggle
+.It Cm M-S-e
+fullscreen_toggle
+.It Cm M-r
+raise
 .It Cm M-S-r
 always_raise
 .It Cm M-v
@@ -678,6 +753,16 @@ search_win
 The action names and descriptions are listed below:
 .Pp
 .Bl -tag -width "M-j, M-<TAB>XXXX" -offset indent -compact
+.It Cm focus
+Focus window/region under pointer.
+.It Cm move
+Move window with pointer while binding is pressed.
+.It Cm resize
+Resize window with pointer while binding is pressed.
+.It Cm resize_centered
+Same as
+.Ic resize
+but keep window centered.
 .It Cm term
 Spawn a new terminal
 (see
@@ -700,6 +785,8 @@ Cycle layout.
 Swap the master and stacking areas.
 .It Cm stack_reset
 Reset layout.
+.It Cm stack_balance
+Balance master/stacking area.
 .It Cm master_shrink
 Shrink master area.
 .It Cm master_grow
@@ -721,7 +808,8 @@ 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.
+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
@@ -760,6 +848,10 @@ Move current window to region
 where
 .Ar n
 is 1 through 9.
+.It Cm mvrg_next
+Move current window to workspace in next region.
+.It Cm mvrg_prev
+Move current window to workspace in previous region.
 .It Cm ws_next
 Switch to next workspace with a window in it.
 .It Cm ws_prev
@@ -778,6 +870,10 @@ Switch to last visited workspace.
 Switch to next region.
 .It Cm rg_prev
 Switch to previous region.
+.It Cm rg_move_next
+Switch region to next screen.
+.It Cm rg_move_prev
+Switch region to previous screen.
 .It Cm screenshot_all
 Take screenshot of entire screen (if enabled)
 (see
@@ -810,10 +906,14 @@ Restore (map) window returned by
 selection.
 .It Cm maximize_toggle
 Toggle maximization of focused window.
+.It Cm fullscreen_toggle
+Toggle fullscreen state of focused window.
+.It Cm raise
+Raise the current window.
 .It Cm always_raise
 When set tiled windows are allowed to obscure floating windows.
 .It Cm button2
-Fake a middle mouse button click (mouse button 2).
+Fake a middle mouse button click (Button2).
 .It Cm width_shrink
 Shrink the width of a floating window.
 .It Cm width_grow
@@ -840,31 +940,74 @@ Search the windows in the current workspace.
 .Pp
 Custom bindings in the configuration file are specified as follows:
 .Pp
-.Dl bind Ns Bo Ar action Bc = Ar keys
+.Dl bind Ns Bo Ar action Bc = Ar combo
 .Pp
 .Ar action
 is one of the actions listed above (or empty to unbind) and
-.Ar 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
+.Ar combo
+is in the form of zero or more modifier keys and/or special arguments
+(Mod1, Shift, MOD, etc.) and a normal key (b, Space, etc.)
+or a button (Button1 .. Button255), separated by
 .Ql + .
+Multiple key/button combinations may be bound to the same action.
+.Pp
+Special arguments:
+.Bl -tag -width "anymodxxxx" -offset indent -compact
+.It Cm MOD
+Substituted for the currently defined
+.Ic modkey .
+.It Cm ANYMOD
+Select all modifier combinations not handled by another binding.
+.It Cm REPLAY
+Reprocess binding press/release events for other programs to handle.  Unavailable for
+.Ic move ,
+.Ic resize
+and
+.Ic resize_centered .
+.El
 .Pp
-Example:
+.Cm MOD
+example:
 .Bd -literal -offset indent
 bind[reset] = Mod4+q # bind Windows-key + q to reset
 bind[] = Mod1+q # unbind Alt + q
+bind[move] = MOD+Button3 # Bind move to M-Button3
+bind[] = MOD+Button1 # Unbind default move binding.
+.Ed
+.Pp
+.Cm ANYMOD
+example:
+.Bd -literal -offset indent
+bind[focus] = ANYMOD+Button3
+bind[move] = MOD+Button3
 .Ed
 .Pp
-To use the currently defined
-.Ic modkey ,
-specify MOD as the modifier key.
+In the above example,
+.Cm M- Ns Aq Cm Button3
+initiates
+.Ic move
+and
+.Cm Aq Cm Button3
+pressed with any other combination of modifiers
+sets focus to the window/region under the pointer.
 .Pp
-Multiple key combinations may be bound to the same action.
+.Cm REPLAY
+example:
+.Bd -literal -offset indent
+bind[focus] = REPLAY+Button3
+.Ed
+.Pp
+In the above example, when
+.Cm Aq Cm Button3
+is pressed without any modifier(s), focus is set to the window under the
+pointer and the button press is passed to the window.
 .Pp
 To bind non-latin characters such as \[oa] or \[*p] you must enter the xkb
-character name instead of the character itself. Run xev, focus the window
-and press the specific key and in the terminal output read the symbol name.
+character name instead of the character itself.
+Run
+.Xr xev 1 ,
+focus the window and press the specific key and in the terminal output read
+the symbol name.
 In the following example for \[oa]:
 .Bd -literal -offset indent
 KeyPress event, serial 41, synthetic NO, window 0x2600001,
@@ -875,7 +1018,8 @@ KeyPress event, serial 41, synthetic NO, window 0x2600001,
     XFilterEvent returns: False
 .Ed
 .Pp
-The xkb name is aring. In other words, in
+The xkb name is aring.
+In other words, in
 .Pa spectrwm.conf
 add:
 .Bd -literal -offset indent
@@ -943,49 +1087,57 @@ XTERM_FONTADJ
 The quirks themselves are described below:
 .Pp
 .Bl -tag -width "XTERM_FONTADJ<TAB>XXX" -offset indent -compact
-.It FLOAT
-This window should not be tiled, but allowed to float freely.
-.It TRANSSZ
-Adjusts size on transient windows that are too small using
-.Ic dialog_ratio
-(see
-.Sx CONFIGURATION FILES ) .
 .It ANYWHERE
 Allow window to position itself, uncentered.
-.It XTERM_FONTADJ
-Adjust xterm fonts when resizing.
-.It FULLSCREEN
-Remove border to allow window to use full region size.
+.It FLOAT
+This window should not be tiled, but allowed to float freely.
+.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
+.Ar follow .
 .It FOCUSPREV
 On exit force focus on previously focused application not previous
 application in the stack.
+.It FULLSCREEN
+Remove border to allow window to use full region size.
+.It IGNOREPID
+Ignore the PID when determining the initial workspace for a new window.
+Especially useful for terminal windows that share a process.
+.It IGNORESPAWNWS
+Ignore the spawn workspace when determining the initial workspace for a
+new window.
+.It MINIMALBORDER
+Remove border when window is unfocused and floating.
+.It NOFOCUSCYCLE
+Remove from normal focus cycle (focus_prev or focus_next). The window can
+still be focused using search_win.
 .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
 .Ar 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
-.Ar follow .
 .It OBEYAPPFOCUSREQ
 When an application requests focus on the window via a _NET_ACTIVE_WINDOW
 client message (source indication of 1), comply with the request.
 Note that a source indication of 0 (unspecified) or 2 (pager) are always
 obeyed.
-.It IGNOREPID
-Ignore the PID when determining the initial workspace for a new window.
-Especially useful for terminal windows that share a process.
-.It IGNORESPAWNWS
-Ignore the spawn workspace when determining the initial workspace for a
-new window.
+.It TRANSSZ
+Adjusts size on transient windows that are too small using
+.Ic dialog_ratio
+(see
+.Sx CONFIGURATION FILES ) .
 .It WS Ns Bq Ar n
 Force a new window to appear on workspace
 .Ar n .
+.It XTERM_FONTADJ
+Adjust
+.Xr xterm 1
+fonts when resizing.
 .El
 .Pp
 Custom quirks in the configuration file are specified as follows: