]> code.delx.au - spectrwm/blobdiff - spectrwm.1
Fix focus issue when a window is manipulated via EWMH.
[spectrwm] / spectrwm.1
index 67aa5513789dd40dece7c16497efc4fe9f666b29..5875d5ad7dc65efa76b0dd21868cab480ce5e123 100644 (file)
@@ -1,5 +1,9 @@
-.\" Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
+.\" 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-2012 Lawrence Teo <lteo@lteo.net>
+.\" Copyright (c) 2011-2012 Tiago Cunha <tcunha@gmx.com>
+.\" Copyright (c) 2012 David Hill <dhill@mindcry.org>
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above
@@ -74,6 +78,10 @@ For example:
 .Pp
 Enabling or disabling an option is done by using 1 or 0 respectively.
 .Pp
+Colors need to be specified per the
+.Xr XQueryColor 3
+specification.
+.Pp
 The file supports the following keywords:
 .Bl -tag -width 2m
 .It Ic autorun
@@ -95,20 +103,93 @@ Disable border by setting to 0.
 Color of the status bar window in screen
 .Ar x .
 .It Ic bar_delay
-Update frequency, in seconds, of external script that populates the status bar.
+Update frequency, in seconds, of external script that populates the status
+bar.
 .It Ic bar_enabled
 Enable or disable status bar.
 .It Ic bar_font
-Status 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 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 dmenu does
+not support Xft fonts.
+.Pp
+Xft examples:
+.Bd -literal -offset indent
+bar_font = Terminus:style=Regular:pixelsize=14:antialias=true
+
+bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,Terminus:pixelsize=14,\
+-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*
+.Ed
+.Pp
+Font set examples:
+.Bd -literal -offset indent
+bar_font = -*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*
+
+bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,\
+-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*,\
+-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*
+.Ed
+.Pp
+To list the available fonts in your system see
+.Xr fc-list 1
+or
+.Xr xlsfonts 1
+manpages.
+The
+.Xr xfontsel 1
+application can help with the XLFD setting.
+.Pp
 .It Ic bar_font_color Ns Bq Ar x
 Color of the font in status bar in screen
 .Ar x .
+.It Ic bar_format
+Set the bar_format string and overrides
+.Ic clock_format
+and all of the
+.Ic enabled
+options.
+The format is passed through
+.Xr strftime 3
+before being used.
+It may contain the following character sequences:
+.Bl -column "Character sequence" "Replaced with" -offset indent
+.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 "+D" Ta "Workspace name"
+.It Li "+F" Ta "Floating indicator"
+.It Li "+I" Ta "Workspace index"
+.It Li "+N" Ta "Screen number"
+.It Li "+P" Ta "Window class and title separated by a colon"
+.It Li "+S" Ta "Stacking algorithm"
+.It Li "+T" Ta "Window title"
+.It Li "+U" Ta "Urgency hint"
+.It Li "+V" Ta "Program version"
+.It Li "+W" Ta "Window name"
+.It Li "++" Ta "A literal" Ql +
+.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.
 .It Ic bar_justify
 Justify the status bar text. Possible values are
 .Pa left ,
 .Pa center ,
 and
 .Pa right .
+.Pp
+Note that if the output is not
+.Pa left
+justified, it may not be properly aligned in some circumstances, due to the
+white-spaces in the default static format.
+See the
+.Ic bar_format
+option for more details.
 .It Ic bind Ns Bq Ar x
 Bind key combo to action
 .Ar x .
@@ -133,12 +214,42 @@ Some applications have dialogue windows that are too small to be useful.
 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.
+Remove border when bar is disabled and there is only one window on the
+screen.
+.It Ic focus_close
+Window to put focus when the focused window is closed.
+Possible values are
+.Pa first ,
+.Pa next ,
+.Pa previous
+(default) and
+.Pa last .
+.Pa next
+and
+.Pa previous
+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.
+.It Ic focus_default
+Window to put focus when no window has been focused. Possible values are
+.Pa first
+and
+.Pa last
+(default).
 .It Ic focus_mode
-Using a value of
-.Pa follow_cursor
-will make the window manager focus the window
-under the mouse when switching workspaces and creating windows.
+Window focus behavior with respect to the mouse cursor. Possible values:
+.Pp
+.Bl -tag -width "default" -offset indent -compact
+.It Cm default
+Set window focus on border crossings caused by cursor motion and
+window interaction.
+.It Cm follow
+Set window focus on all cursor border crossings, including workspace switches
+and changes to layout.
+.It Cm manual
+Set window focus on window interaction only.
+.El
 .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.
@@ -147,15 +258,16 @@ See the
 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
 ws[idx]:master_grow:master_add:stack_inc:layout:always_raise:stack_mode, e.g.
 ws[2]:-4:0:1:0:horizontal sets worskspace 2 to the horizontal stack mode and
 shrinks the master area by 4 ticks and adds one window to the stack, while
 maintaining default floating window behavior.
 Possible stack_mode values are
 .Pa vertical ,
-.Pa horizontal
+.Pa vertical_flip ,
+.Pa horizontal ,
+.Pa horizontal_flip
 and
 .Pa fullscreen .
 .Pp
@@ -169,8 +281,8 @@ See
 and
 .Pa 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
 .Pa layout
 option.
 .Pp
@@ -193,16 +305,30 @@ See the
 .Sx QUIRKS
 section below.
 .It Ic region
-Allocates a custom region, removing any autodetected regions which occupy the same
-space on the screen.
+Allocates a custom region, removing any autodetected regions which occupy the
+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
 1024x768 resolution sitting one next to the other.
+.It Ic spawn_position
+Position in stack to place newly spawned windows.
+Possible values are
+.Pa first ,
+.Pa next ,
+.Pa previous
+and
+.Pa last
+(default).
+.Pa next
+and
+.Pa previous
+are relative to the focused window.
 .It Ic stack_enabled
-Enable or disable displaying the current stacking algorithm in the status bar.
+Enable or disable displaying the current stacking algorithm in the status
+bar.
 .It Ic term_width
 Set a preferred minimum width for the terminal.
 If this value is greater than 0,
@@ -231,38 +357,29 @@ 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.urgentOnBell: true
+.Pa xterm.bellIsUrgent: true
 to
 .Pa .Xdefaults .
 .It Ic verbose_layout
-Enable or disable displaying the current master and stack values in the status
-bar.
-Enable by setting to 1.
+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 by setting to 1.
-.El
 .Pp
-Colors need to be specified per the
-.Xr XQueryColor 3
-specification and fonts need to be specified per the
-.Xr XQueryFont 3
-specification.
-.Pp
-To list the available fonts in your system see
-.Xr fc-list 1
-or
-.Xr xlsfonts 1
-manpages.
-The
-.Xr xfontsel 1
-application can help you to show the X Logical Font Description ("XLFD") used
-as setting in the keyword
-.Pa bar_font .
+To prevent excessively large window names from pushing the remaining text off
+the screen, it's limited to 64 characters, by default.
+See the
+.Ic bar_format
+option for more details.
+.It Ic workspace_limit
+Set the total number of workspaces available. Minimum is 1, maximum is 22,
+default is 10.
+.El
 .Sh PROGRAMS
 .Nm
-allows you to define custom actions to launch programs of your choice and then
-bind them the same as with built-in actions.
+allows you to define custom actions to launch programs of your choice and
+then bind them the same as with built-in actions.
 See the
 .Sx BINDINGS
 section below.
@@ -281,7 +398,8 @@ 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
+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:
@@ -343,7 +461,7 @@ Resize window while maintaining it centered
 .Pp
 The default key bindings are described below:
 .Pp
-.Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
+.Bl -tag -width "M-j, M-<TAB>XXXXXX" -offset indent -compact
 .It Cm M-S- Ns Aq Cm Return
 term
 .It Cm M-p
@@ -394,10 +512,10 @@ bar_toggle
 wind_del
 .It Cm M-S-x
 wind_kill
-.It Cm M- Ns Aq Ar n
-.Pf ws_ Ar n
-.It Cm M-S- Ns Aq Ar n
-.Pf mvws_ Ar n
+.It Cm M- Ns Aq Ar 1-9,0,F1-F12
+.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 Cm Right
 ws_next
 .It Cm M- Ns Aq Cm Left
@@ -516,13 +634,13 @@ Switch to workspace
 .Ar n ,
 where
 .Ar n
-is 1 through 10.
+is 1 through workspace_limit.
 .It Cm mvws_ Ns Ar n
 Move current window to workspace
 .Ar n ,
 where
 .Ar n
-is 1 through 10.
+is 1 through workspace_limit.
 .It Cm ws_next
 Switch to next workspace with a window in it.
 .It Cm ws_prev
@@ -614,6 +732,24 @@ To use the currently defined
 specify MOD as the modifier key.
 .Pp
 Multiple key combinations may be bound to the same action.
+.Pp
+To bind non-latin characters such as å or π 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.
+In the fallowing example for å:
+.Bd -literal -offset indent
+KeyPress event, serial 41, synthetic NO, window 0x2600001,
+    root 0x15a, subw 0x0, time 106213808, (11,5), root:(359,823),
+    state 0x0, keycode 24 (keysym 0xe5, aring), same_screen YES,
+    XLookupString gives 2 bytes: (c3 a5) "å"
+    XmbLookupString gives 2 bytes: (c3 a5) "å"
+    XFilterEvent returns: False
+.Ed
+.Pp
+The xkb name is aring. In other words, in .spectrwm.conf add:
+.Bd -literal -offset indent
+bind[program] = MOD+aring
+.Ed
 .Sh KEYBOARD MAPPING FILES
 Keyboard mapping files for several keyboard layouts are listed
 below.
@@ -643,7 +779,8 @@ in a tiling window manager, such as some dialogs and fullscreen apps.
 .Pp
 The default quirks are described below:
 .Pp
-.Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent -compact
+.Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent \
+-compact
 .It Firefox\-bin:firefox\-bin
 TRANSSZ
 .It Firefox:Dialog
@@ -688,8 +825,8 @@ Adjust xterm fonts when resizing.
 .It FULLSCREEN
 Remove border to allow window to use full screen size.
 .It FOCUSPREV
-On exit force focus on previously focused application not previous application
-in the stack.
+On exit force focus on previously focused application not previous
+application in the stack.
 .El
 .Pp
 Custom quirks in the configuration file are specified as follows:
@@ -843,7 +980,8 @@ was inspired by xmonad & dwm.
 .Nm
 was written by:
 .Pp
-.Bl -tag -width "Ryan Thomas McBride Aq mcbride@countersiege.com " -offset indent -compact
+.Bl -tag -width "Ryan Thomas McBride Aq mcbride@countersiege.com " -offset \
+indent -compact
 .It Cm Marco Peereboom Aq marco@peereboom.us
 .It Cm Ryan Thomas McBride Aq mcbride@countersiege.com
 .It Cm Darrin Chandler Aq dwchandler@stilyagin.com
@@ -853,4 +991,5 @@ was written by:
 .It Cm Reginald Kennedy Aq rk@rejii.com
 .It Cm Lawrence Teo Aq lteo@lteo.net
 .It Cm Tiago Cunha Aq tcunha@gmx.com
+.It Cm David Hill Aq dhill@mindcry.org
 .El