Yeah this window manager takes a little effort at first, but trust me, it's well worth it. If you type M-p, (M for alt), you get the application menu, you can start a lot of things there, not all, terminal commands don't open a terminal for instance, that can be done with the M-shift-return combination, opens a terminal that is.
below is a good page of config settings and navigation keys near the bottom.
Code: Select all
<https://manpages.ubuntu.com/>
Menu <#navigation> Close menu <#navigation-closed>
//
//
Jump to main content <#main-content>
* 18.04 LTS <https://manpages.ubuntu.com/manpages/bionic>
* 20.04 LTS <https://manpages.ubuntu.com/manpages/focal>
* 21.10 <https://manpages.ubuntu.com/manpages/impish>
* 22.04 LTS <https://manpages.ubuntu.com/manpages/jammy>
* 22.10 <https://manpages.ubuntu.com/manpages/kinetic>
* name <#name>
* synopsis <#synopsis>
* options <#options>
* description <#description>
* configuration files <#configuration files>
* programs <#programs>
* bindings <#bindings>
* keyboard mapping files <#keyboard mapping files>
* quirks <#quirks>
* ewmh <#ewmh>
* signals <#signals>
* files <#files>
* history <#history>
* authors <#authors>
jammy <https://manpages.ubuntu.com/manpages/jammy/> (1
<https://manpages.ubuntu.com/manpages/jammy/man1>)
spectrwm.1.html#bindings
<https://manpages.ubuntu.com/manpages.gz/jammy/man1/spectrwm.1.html#bindings>
Provided by: spectrwm_3.4.1-1_amd64
<https://launchpad.net/ubuntu/jammy/+package/spectrwm> bug
<https://bugs.launchpad.net/ubuntu/+source/spectrwm/+filebug-advanced>
*NAME*
*spectrwm* — window manager for X11
*SYNOPSIS*
*spectrwm* [*-c* _file_] [*-v*]
*OPTIONS*
*-c* _file_
Specify a configuration file to load instead of scanning for one.
*-v* Print version and exit.
*DESCRIPTION*
*spectrwm* is a minimalistic window manager that tries to stay out of the way so that valuable
screen real estate can be used for much more important stuff. It has sane defaults and does
not require one to learn a language to do any configuration. It was written by hackers for
hackers and it strives to be small, compact and fast.
When *spectrwm* starts up, it reads settings from its configuration file, _spectrwm.conf_. See
the _CONFIGURATION_ _FILES_ section below.
The following notation is used throughout this page:
*M* Meta
*S* Shift
⟨*Name*⟩ Named key or button
*spectrwm* is very simple in its use. Most of the actions are initiated via key or pointer
bindings. See the _BINDINGS_ section below for defaults and customizations.
*CONFIGURATION* *FILES*
*spectrwm* looks for the user-configuration file in the following order:
1. _$XDG_CONFIG_HOME/spectrwm/spectrwm.conf_
2. _~/.config/spectrwm/spectrwm.conf <file:///~/.config/spectrwm/spectrwm.conf>_ (if _$XDG_CONFIG_HOME_ is either not set or empty)
3. _~/.spectrwm.conf <file:///~/.spectrwm.conf>_.
If the user-configuration file is not found, *spectrwm* then looks for the global
configuration file in the following order:
1. _$XDG_CONFIG_DIRS/spectrwm/spectrwm.conf_ (each colon-separated directory in
_$XDG_CONFIG_DIRS_)
2. _/etc/xdg/spectrwm/spectrwm.conf_ (if _$XDG_CONFIG_DIRS_ is either not set or empty)
3. _/etc/spectrwm.conf_
The format of the file is
_keyword_ = _setting_
For example:
color_focus = red
Enabling or disabling an option is done by using 1 or 0 respectively.
Colors need to be specified per the XQueryColor <https://manpages.ubuntu.com/manpages/jammy/man3/XQueryColor.3.html>(3) specification.
Comments begin with a #. When a literal ‘#’ is desired in an option, then it must be
escaped with a backslash, i.e. \#
The file supports the following keywords:
*autorun*
Launch an application in a specified workspace at start-of-day. Defined in the format
ws[_idx_]:_application_, e.g. ws[2]:xterm launches an xterm <https://manpages.ubuntu.com/manpages/jammy/man1/xterm.1.html>(1) in workspace 2.
Note that workspace mapping is handled via _libswmhack.so_. When *autorun* spawns windows
via a daemon, ensure the daemon is started with the correct _LD_PRELOAD_ in its
environment.
For example, starting urxvtd <https://manpages.ubuntu.com/manpages/jammy/man1/urxvtd.1.html>(1) via xinit <https://manpages.ubuntu.com/manpages/jammy/man1/xinit.1.html>(1):
LD_PRELOAD=/usr/lib/libswmhack.so.0.0 urxvtd -q -o -f
Spawned programs automatically have _LD_PRELOAD_ set when executed.
It is advised to check the man page of _ld.so_ as _LD_PRELOAD_ is sometimes ignored by some
operating systems. A workaround is available, e.g. launch an xterm <https://manpages.ubuntu.com/manpages/jammy/man1/xterm.1.html>(1) in workspace 2:
autorun = ws[2]:xterm -name ws2
quirk[XTerm:ws2] = WS[2]
*bar_action*
External script that populates additional information in the status bar, such as battery
life.
*bar_action_expand*
Process *bar_format* character sequences in *bar_action* output; default is 0.
*bar_at_bottom*
Place the statusbar at the bottom of each region instead of the top.
*bar_border*[_x_]
Border color of the status bar(s) in screen _x_.
*bar_border_unfocus*[_x_]
Border color of the status bar(s) on unfocused region(s) in screen _x_.
*bar_border_width*
Set status bar border thickness in pixels. Disable border by setting to 0.
*bar_color*[_x_]
Background color of the status bar(s) in screen _x_.
A comma separated list of up to 10 colors can be specified. The first value is used as
the default background color. Any of these colors can then be selected as a background
color in the status bar through the use of the markup sequence *+@bg=n;* where n is
between 0 and 9.
*bar_color_selected*[_x_]
Background color for selections on the status bar(s) in screen _x_. Defaults to the value
of *bar_border*.
*bar_enabled*
Set default *bar_toggle* state; default is 1.
*bar_enabled_ws*[_x_]
Set default *bar_toggle_ws* state on workspace _x_; default is 1.
*bar_font*
Fonts 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.
The default is to use font set.
If Xft is used, a comma-separated list of up to 10 fonts can be specified. The first
entry is the default font. Any font defined here can then be selected in the status bar
through the use of the markup sequence *+@fn=n;* where n is between 0 and 9.
Also note that dmenu <https://manpages.ubuntu.com/manpages/jammy/man1/dmenu.1.html>(1) does not support Xft fonts.
Xft examples:
bar_font = Terminus:style=Regular:pixelsize=14:antialias=true
bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,Terminus:pixelsize=14,-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*
Font set examples:
bar_font = -*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*
bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*,-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*
To list the available fonts in your system see fc-list <https://manpages.ubuntu.com/manpages/jammy/man1/fc-list.1.html>(1) or xlsfonts <https://manpages.ubuntu.com/manpages/jammy/man1/xlsfonts.1.html>(1) manpages. The
xfontsel <https://manpages.ubuntu.com/manpages/jammy/man1/xfontsel.1.html>(1) application can help with the XLFD setting.
*bar_font_color*[_x_]
Foreground color of the status bar(s) in screen _x_.
A comma separated list of up to 10 colors can be specified. The first value is used as
the default foreground color. Any of these colors can then be selected as a foreground
color in the status bar through the use of the markup sequence *+@fg=n;* where n is
between 0 and 9.
*bar_font_color_selected*[_x_]
Foreground color for selections on the status bar(s) in screen _x_. Defaults to the value
of *bar_color*.
*bar_font_pua*
Specify a font which uses the Unicode Private Use Area (U+E000 -> U+F8FF). Some fonts
use these code points to provide special icon glyphs. Available only with Xft fonts.
*bar_format*
Set the bar format string, overriding *clock_format* and all of the *enabled* options. The
format is passed through strftime <https://manpages.ubuntu.com/manpages/jammy/man3/strftime.3.html>(3) before being used. It may contain the following
character sequences:
*Character* *sequence* *Replaced* *with*
+< Pad with a space
+A Output of the external script
+C Window class (from WM_CLASS)
+D Workspace name
+F Floating indicator
+I Workspace index
+L Workspace list indicator
+M Number of iconic (minimized) windows in workspace
+N Screen number
+P Window class and instance separated by a colon
+R Region index
+S Stacking algorithm
+T Window instance (from WM_CLASS)
+U Urgency hint
+V Program version
+W Window name (from _NET_WM_NAME/WM_NAME)
+|[weight][justify] Begin new section and reset markup sequence effects.
*weight* is a positive integer used to
allocate horizontal space between 'L', 'C'
and 'R' sections (see justify). The
default weight is 1.
*justify* can have the value L, C, R or T. L,
C, R are for left, center and right
justified sections respectively. A 'T'
section will limit its space usage to fit
to the text. If no value is specified for
a given section, the setting from
*bar_justify* is used.
++ A literal ‘+’
+@ Prefix for text markup sequences
The currently recognized text markup sequences are:
*Character* *sequence* *Action*
+@fn=n; Selects font n (from 0 to 9) from *bar_font*.
+@fg=n; Selects foreground color n (from 0 to 9) from
*bar_font_color*.
+@bg=n; Selects background color n (from 0 to 9) from *bar_color*.
+@stp; Stops the interpretation of markup sequences. Any markup
sequence found after +@stp will appear as normal
characters in the status bar.
Note that markup sequences in *bar_action* script output will only be processed if
*bar_action_expand* is enabled.
All character sequences may limit its output to a specific length, for example +64A. By
default, no padding/alignment is done in case the length of the replaced string is less
than the specified length (64 in the example). The padding/alignment can be enabled
using a '_' character in the sequence. For example: +_64W, +64_W and +_64_W enable
padding before (right alignment), after (left alignment), and both before and after
(center alignment) window name, respectively. Any characters that don't match the
specification are copied as-is.
*bar_justify*
Justify the status bar text. Possible values are _left_, _center_, and _right_.
Note that if the output is not left justified, it may not be properly aligned in some
circumstances, due to the white-spaces in the default static format. See the *bar_format*
option for more details.
*bind*[_x_]
Bind key or button combo to action _x_. See the _BINDINGS_ section below.
*border_width*
Set window border thickness in pixels. Disable all borders by setting to 0.
*boundary_width*
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.
*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 *bar_action* script.
*color_focus*
Border color of the currently focused window. Default is red.
*color_focus_maximized*
Border color of the currently focused, maximized window. Defaults to the value of
*color_focus*.
*color_unfocus*
Border color of unfocused windows, default is rgb:88/88/88.
*color_unfocus_maximized*
Border color of unfocused, maximized windows. Defaults to the value of *color_unfocus*.
*dialog_ratio*
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.
*disable_border*
Remove border when bar is disabled and there is only one window on the region. Enable
by setting to 1. Setting this to _always_ removes border from lone tiled windows,
regardless of the bar being enabled/disabled. Defaults to 0.
*focus_close*
Window to put focus when the focused window is closed. Possible values are _first_, _next_,
_previous_ (default) and _last_. _next_ and _previous_ are relative to the window that is
closed.
*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.
*focus_default*
Window to put focus when no window has been focused. Possible values are _first_ and _last_
(default).
*focus_mode*
Window focus behavior with respect to the pointer. Possible values:
_default_ Set window focus on border crossings caused by cursor motion and window
interaction.
_follow_ Set window focus on all cursor border crossings, including workspace
switches and changes to layout.
_manual_ Set window focus on window interaction only.
*iconic_enabled*
Display the number of iconic (minimized) windows in the status bar. Enable by setting
to 1.
*keyboard_mapping*
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 _KEYBOARD_ _MAPPING_ _FILES_ section below for a list of keyboard mapping files that have
been provided for several keyboard layouts.
Note that _/dev/null_ can be specified if you only want to clear bindings.
*layout*
Select layout to use at start-of-day. Defined in the format
ws[_idx_]:_master_grow_:_master_add_:_stack_inc_:_always_raise_:_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 stack, while maintaining default
floating window behavior. Possible _stack_mode_ values are _vertical_, _vertical_flip_,
_horizontal_, _horizontal_flip_ and _max_.
See *master_grow*, *master_shrink*, *master_add*, *master_del*, *stack_inc*, *stack_dec*,
*stack_balance*, and *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 *layout* option.
This setting is not retained at restart.
*maximize_hide_bar*
When set to 1, *maximize_toggle* will also hide/restore the bar visibility of the affected
workspace. Defaults to 0.
*modkey*
Change mod key. Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
*name*
Set the name of a workspace at start-of-day. Defined in the format ws[_idx_]:_name_, e.g.
ws[1]:Console sets the name of workspace 1 to “Console”.
*program*[_p_]
Define new action to spawn a program _p_. See the _PROGRAMS_ section below.
*quirk*[_c_[:_i_[:_n_]]]
Add "quirk" for windows with class _c_, instance _i_ (optional) and name _n_ (optional). See
the _QUIRKS_ section below.
*region*
Allocates a custom region, removing any autodetected regions which occupy the same space
on the screen. Defined in the format screen[_idx_]:_width_x_height_+_x_+_y_, e.g.
screen[1]:800x1200+0+0.
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.
*region_padding*
Pixel width of empty space within region borders. Disable by setting to 0.
*spawn_position*
Position in stack to place newly spawned windows. Possible values are _first_, _next_,
_previous_ and _last_ (default). _next_ and _previous_ are relative to the focused window.
*stack_enabled*
Enable or disable displaying the current stacking algorithm in the status bar.
*term_width*
Set a preferred minimum width for the terminal. If this value is greater than 0,
*spectrwm* will attempt to adjust the font sizes in the terminal to keep the terminal
width above this number as the window is resized. Only xterm <https://manpages.ubuntu.com/manpages/jammy/man1/xterm.1.html>(1) is currently supported.
The xterm <https://manpages.ubuntu.com/manpages/jammy/man1/xterm.1.html>(1) binary must not be setuid or setgid, which it is by default on most
systems. Users may need to set program[term] (see the _PROGRAMS_ section) to use an
alternate copy of the xterm <https://manpages.ubuntu.com/manpages/jammy/man1/xterm.1.html>(1) binary without the setgid bit set.
*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.
*urgent_collapse*
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.
*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 xterm <https://manpages.ubuntu.com/manpages/jammy/man1/xterm.1.html>(1), for example, one needs to add the following line to _.Xdefaults_:
xterm.bellIsUrgent: true
*verbose_layout*
Enable or disable displaying the current master window count and stack column/row count
in the status bar. Enable by setting to 1. See _master_add_, _master_del_, _stack_inc_ and
_stack_dec_ for more information.
*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 _workspace_clamp_ is
enabled, focus on the region with the target workspace. Enable by setting to 1.
*warp_pointer*
Centers the pointer on the focused window when using bindings to change focus, switch
workspaces, change regions, etc. Enable by setting to 1.
*window_class_enabled*
Enable or disable displaying the window class name (from WM_CLASS) in the status bar.
Enable by setting to 1.
*window_instance_enabled*
Enable or disable displaying the window instance name (from WM_CLASS) in the status bar.
Enable by setting to 1.
*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.
To prevent excessively large window names from pushing the remaining text off the bar,
it's limited to 64 characters, by default. See the *bar_format* option for more details.
*workspace_clamp*
Prevents workspaces from being swapped when attempting to switch to a workspace that is
mapped to another region. Use _warp_focus_ if you want to focus on the region containing
the workspace and _warp_pointer_ if you want to also send the pointer. Enable by setting
to 1.
*workspace_indicator*
Configure the status bar workspace indicator. One or more of the following options may
be specified in a comma-separated list:
_listcurrent_ Include the current workspace.
_listactive_ Include workspaces with windows.
_listempty_ Include empty workspaces.
_listnamed_ Include named workspaces.
_listurgent_ Include workspaces with urgent window(s).
_listall_ Include all workspaces.
_hidecurrent_ Always exclude the current workspace from the list.
_markcurrent_ Indicate the current workspace if it is in the list.
_markurgent_ Indicate workspaces in the list that contain urgent window(s).
_printnames_ Display the names of named workspaces in the list.
The default is _listcurrent_,_listactive_,_markcurrent_,_printnames_
*workspace_limit*
Set the total number of workspaces available. Minimum is 1, maximum is 22, default is
10.
*PROGRAMS*
*spectrwm* 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 _BINDINGS_ section below.
Custom programs in the configuration file are specified as follows:
program[_action_] = _progpath_ [_arg_ [_arg_ _..._]]
_action_ is any identifier that does not conflict with a built-in action or keyword, _progpath_
is the desired program, and _arg_ is zero or more arguments to the program.
With the exception of '~' expansion, program calls are executed as-is without any
interpretation. A shell can be called to execute shell commands. (e.g. sh -c 'command
string').
Remember that when using ‘#’ in your program call, it must be escaped with a backslash, i.e.
\#
The following argument variables will be substituted for values at the time the program is
spawned:
*$bar_border*
*$bar_color*
*$bar_color_selected*
*$bar_font*
*$bar_font_color*
*$bar_font_color_selected*
*$color_focus*
*$color_unfocus*
*$dmenu_bottom* -b if *bar_at_bottom* is enabled.
*$region_index*
*$workspace_index*
Example:
program[ff] = /usr/local/bin/firefox http://spectrwm.org/ <http://spectrwm.org/>
bind[ff] = MOD+Shift+b # Now M-S-b launches firefox
To cancel the previous, unbind it:
bind[] = MOD+Shift+b
Default programs:
*term* x-terminal-emulator
*lock* slock
*menu* dmenu_run $dmenu_bottom -fn $bar_font -nb $bar_color -nf
$bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
*search* dmenu $dmenu_bottom -i -fn $bar_font -nb $bar_color -nf
$bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
*name_workspace* dmenu $dmenu_bottom -p Workspace -fn $bar_font -nb $bar_color -nf
$bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
*initscr* initscreen.sh # optional
*screenshot_all* screenshot.sh full # optional
*screenshot_wind* 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 binding.
For example, to override *lock*:
program[lock] = xscreensaver-command -lock
To unbind *lock* and prevent it from being validated:
bind[] = MOD+Shift+Delete
*BINDINGS*
*spectrwm* provides many functions (or actions) accessed via key or pointer bindings.
The default bindings are listed below:
⟨*Button1*⟩ focus
*M-*⟨*Button1*⟩ move
*M-*⟨*Button3*⟩ resize
*M-S-*⟨*Button3*⟩ resize_centered
*M-S-*⟨*Return*⟩ term
*M-p* menu
*M-S-q* quit
*M-q* restart
⟨_unbound_⟩ restart_of_day
*M-*⟨*Space*⟩ cycle_layout
*M-S-\* flip_layout
⟨_unbound_⟩ layout_vertical
⟨_unbound_⟩ layout_horizontal
⟨_unbound_⟩ layout_max
*M-S-*⟨*Space*⟩ stack_reset
⟨_unbound_⟩ stack_balance
*M-h* master_shrink
*M-l* master_grow
*M-,* master_add
*M-.* master_del
*M-S-,* stack_inc
*M-S-.* stack_dec
*M-*⟨*Return*⟩ swap_main
*M-j*, *M-*⟨*TAB*⟩ focus_next
*M-k*, *M-S-*⟨*TAB*⟩ focus_prev
*M-m* focus_main
*M-u* focus_urgent
*M-S-j* swap_next
*M-S-k* swap_prev
*M-b* bar_toggle
*M-S-b* bar_toggle_ws
*M-x* wind_del
*M-S-x* wind_kill
*M-*⟨_1-9,0,F1-F12_⟩ ws_⟨_1-22_⟩
*M-S-*⟨_1-9,0,F1-F12_⟩ mvws_⟨_1-22_⟩
*M-*⟨_Keypad_ _1-9_⟩ rg_⟨_1-9_⟩
*M-S-*⟨_Keypad_ _1-9_⟩ mvrg_⟨_1-9_⟩
⟨_unbound_⟩ mvrg_next
⟨_unbound_⟩ mvrg_prev
⟨_unbound_⟩ ws_empty
⟨_unbound_⟩ ws_empty_move
*M-*⟨*Right*⟩ ws_next
*M-*⟨*Left*⟩ ws_prev
*M-*⟨*Up*⟩ ws_next_all
*M-*⟨*Down*⟩ ws_prev_all
*M-a* ws_prior
*M-S-*⟨*Down*⟩ ws_prev_move
*M-S-*⟨*Up*⟩ ws_next_move
*M-S-*⟨*Right*⟩ rg_next
*M-S-*⟨*Left*⟩ rg_prev
⟨_unbound_⟩ rg_move_next
⟨_unbound_⟩ rg_move_prev
*M-s* screenshot_all
*M-S-s* screenshot_wind
*M-S-v* version
*M-t* float_toggle
*M-S-*⟨*Delete*⟩ lock
*M-S-i* initscr
*M-w* iconify
*M-S-w* uniconify
*M-e* maximize_toggle
*M-S-e* fullscreen_toggle
*M-r* raise
*M-S-r* always_raise
*M-v* button2
*M--* width_shrink
*M-=* width_grow
*M-S--* height_shrink
*M-S-=* height_grow
*M-[* move_left
*M-]* move_right
*M-S-[* move_up
*M-S-]* move_down
*M-S-/* name_workspace
*M-/* search_workspace
*M-f* search_win
The action names and descriptions are listed below:
*focus* Focus window/region under pointer.
*move* Move window with pointer while binding is pressed.
*resize* Resize window with pointer while binding is pressed.
*resize_centered* Same as *resize* but keep window centered.
*term* Spawn a new terminal (see _PROGRAMS_ above).
*menu* Menu (see _PROGRAMS_ above).
*quit* Quit *spectrwm*.
*restart* Restart *spectrwm*.
*restart_of_day* Same as *restart* but configuration file is loaded in full.
*cycle_layout* Cycle layout.
*flip_layout* Swap the master and stacking areas.
*layout_vertical* Switch to vertical layout.
*layout_horizontal* Switch to horizontal layout.
*layout_max* Switch to max layout.
*stack_reset* Reset layout.
*stack_balance* Balance master/stacking area.
*master_shrink* Shrink master area.
*master_grow* Grow master area.
*master_add* Add windows to master area.
*master_del* Remove windows from master area.
*stack_inc* Add columns/rows to stacking area.
*stack_dec* Remove columns/rows from stacking area.
*swap_main* Move current window to master area.
*focus_next* Focus next window in workspace.
*focus_prev* Focus previous window in workspace.
*focus_main* Focus on main window in workspace.
*focus_urgent* Focus on next window with the urgency hint flag set. The
workspace is switched if needed.
*swap_next* Swap with next window in workspace.
*swap_prev* Swap with previous window in workspace.
*bar_toggle* Toggle overall visibility of status bars.
*bar_toggle_ws* Toggle status bar on current workspace.
*wind_del* Delete current window in workspace.
*wind_kill* Destroy current window in workspace.
*ws_*_n_ Switch to workspace _n_, where _n_ is 1 through *workspace_limit*.
*mvws_*_n_ Move current window to workspace _n_, where _n_ is 1 through
*workspace_limit*.
*rg_*_n_ Focus on region _n_, where _n_ is 1 through 9.
*mvrg_*_n_ Move current window to region _n_, where _n_ is 1 through 9.
*mvrg_next* Move current window to workspace in next region.
*mvrg_prev* Move current window to workspace in previous region.
*ws_empty* Switch to the first empty workspace.
*ws_empty_move* Switch to the first empty workspace and move current window.
*ws_next* Switch to next workspace with a window in it.
*ws_prev* Switch to previous workspace with a window in it.
*ws_next_all* Switch to next workspace.
*ws_prev_all* Switch to previous workspace.
*ws_next_move* Switch to next workspace with the current window.
*ws_prev_move* Switch to previous workspace with the current window.
*ws_prior* Switch to last visited workspace.
*rg_next* Switch to next region.
*rg_prev* Switch to previous region.
*rg_move_next* Switch region to next screen.
*rg_move_prev* Switch region to previous screen.
*screenshot_all* Take screenshot of entire screen (if enabled) (see _PROGRAMS_
above).
*screenshot_wind* Take screenshot of selected window (if enabled) (see _PROGRAMS_
above).
*version* Toggle version in status bar.
*float_toggle* Toggle focused window between tiled and floating.
*lock* Lock screen (see _PROGRAMS_ above).
*initscr* Reinitialize physical screens (see _PROGRAMS_ above).
*iconify* Minimize (unmap) currently focused window.
*uniconify* Restore (map) window returned by dmenu <https://manpages.ubuntu.com/manpages/jammy/man1/dmenu.1.html>(1) selection.
*maximize_toggle* Toggle maximization of focused window.
*fullscreen_toggle* Toggle fullscreen state of focused window.
*raise* Raise the current window.
*always_raise* When set tiled windows are allowed to obscure floating windows.
*button2* Fake a middle mouse button click (Button2).
*width_shrink* Shrink the width of a floating window.
*width_grow* Grow the width of a floating window.
*height_shrink* Shrink the height of a floating window.
*height_grow* Grow the height of a floating window.
*move_left* Move a floating window a step to the left.
*move_right* Move a floating window a step to the right.
*move_up* Move a floating window a step upwards.
*move_down* Move a floating window a step downwards.
*name_workspace* Name the current workspace.
*search_workspace* Search for a workspace.
*search_win* Search the windows in the current workspace.
Custom bindings in the configuration file are specified as follows:
bind[_action_] = _combo_
_action_ is one of the actions listed above (or empty to unbind) and _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 ‘+’. Multiple
key/button combinations may be bound to the same action.
Special arguments:
*MOD* Substituted for the currently defined *modkey*.
*ANYMOD* Select all modifier combinations not handled by another binding.
*REPLAY* Reprocess binding press/release events for other programs to handle.
Unavailable for *move*, *resize* and *resize_centered*.
*MOD* example:
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.
*ANYMOD* example:
bind[focus] = ANYMOD+Button3
bind[move] = MOD+Button3
In the above example, *M-*⟨*Button3*⟩ initiates *move* and ⟨*Button3*⟩ pressed with any other
combination of modifiers sets focus to the window/region under the pointer.
*REPLAY* example:
bind[focus] = REPLAY+Button3
In the above example, when ⟨*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.
To bind non-latin characters such as å or π you must enter the xkb character name instead of
the character itself. Run xev <https://manpages.ubuntu.com/manpages/jammy/man1/xev.1.html>(1), focus the window and press the specific key and in the
terminal output read the symbol name. In the following example for å:
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
The xkb name is aring. In other words, in _spectrwm.conf_ add:
bind[program] = MOD+aring
To clear all default keyboard bindings and specify your own, see the *keyboard_mapping*
option.
*KEYBOARD* *MAPPING* *FILES*
Keyboard mapping files for several keyboard layouts are listed below. These files can be
used with the *keyboard_mapping* setting to load pre-defined key bindings for the specified
keyboard layout.
*spectrwm_cz.conf* Czech Republic keyboard layout
*spectrwm_es.conf* Spanish keyboard layout
*spectrwm_fr.conf* French keyboard layout
*spectrwm_fr_ch.conf* Swiss French keyboard layout
*spectrwm_se.conf* Swedish keyboard layout
*spectrwm_us.conf* United States keyboard layout
*QUIRKS*
*spectrwm* provides "quirks" which handle windows that must be treated specially in a tiling
window manager, such as some dialogs and fullscreen apps.
The default quirks are described below:
Firefox-bin:firefox-bin TRANSSZ
Firefox:Dialog FLOAT
Gimp:gimp FLOAT + ANYWHERE
MPlayer:xv FLOAT + FULLSCREEN + FOCUSPREV
OpenOffice.org 2.4:VCLSalFrame FLOAT
OpenOffice.org 3.1:VCLSalFrame FLOAT
pcb:pcb FLOAT
xine:Xine Window FLOAT + ANYWHERE
xine:xine Panel FLOAT + ANYWHERE
xine:xine Video Fullscreen Window FULLSCREEN + FLOAT
Xitk:Xitk Combo FLOAT + ANYWHERE
Xitk:Xine Window FLOAT + ANYWHERE
XTerm:xterm XTERM_FONTADJ
The quirks themselves are described below:
ANYWHERE Allow window to position itself, uncentered.
FLOAT This window should not be tiled, but allowed to float freely.
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
*focus_mode* is set to _follow_.
FOCUSPREV On exit force focus on previously focused application not
previous application in the stack.
FULLSCREEN Remove border to allow window to use full region size.
IGNOREPID Ignore the PID when determining the initial workspace for a new
window. Especially useful for terminal windows that share a
process.
IGNORESPAWNWS Ignore the spawn workspace when determining the initial
workspace for a new window.
MINIMALBORDER Remove border when window is unfocused and floating.
NOFOCUSCYCLE Remove from normal focus cycle (focus_prev or focus_next). The
window can still be focused using search_win.
NOFOCUSONMAP Don't change focus to the window when it first appears on the
screen. Has no effect when *focus_mode* is set to _follow_.
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.
TRANSSZ Adjusts size on transient windows that are too small using
*dialog_ratio* (see _CONFIGURATION_ _FILES_).
WS[_n_] Force a new window to appear on workspace _n_.
XTERM_FONTADJ Adjust xterm <https://manpages.ubuntu.com/manpages/jammy/man1/xterm.1.html>(1) fonts when resizing.
Custom quirks in the configuration file are specified as follows:
quirk[_class_[:_instance_[:_name_]]] = _quirk_ [+ _quirk_ _..._]
_class_, _instance_ (optional) and _name_ (optional) are patterns used to determine which
window(s) the quirk(s) apply to and _quirk_ is one of the quirks from the list above.
Note that patterns are interpreted as POSIX Extended Regular Expressions. Any ':', '[' or
']' must be escaped with '\'. See regex <https://manpages.ubuntu.com/manpages/jammy/man7/regex.7.html>(7) for more information on POSIX Extended Regular
Expressions.
For example:
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
You can obtain _class_, _instance_ and _name_ by running xprop <https://manpages.ubuntu.com/manpages/jammy/man1/xprop.1.html>(1) and then clicking on the desired
window. In the following example the main window of Firefox was clicked:
$ 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"
Note that xprop <https://manpages.ubuntu.com/manpages/jammy/man1/xprop.1.html>(1) displays WM_CLASS as:
WM_CLASS(STRING) = "<instance>", "<class>"
In the example above the quirk entry would be:
quirk[Firefox:Navigator] = FLOAT
*spectrwm* also automatically assigns quirks to windows based on the value of the window's
_NET_WM_WINDOW_TYPE property as follows:
_NET_WM_WINDOW_TYPE_DOCK FLOAT + ANYWHERE
_NET_WM_WINDOW_TYPE_TOOLBAR FLOAT + ANYWHERE
_NET_WM_WINDOW_TYPE_UTILITY FLOAT + ANYWHERE
_NET_WM_WINDOW_TYPE_SPLASH FLOAT
_NET_WM_WINDOW_TYPE_DIALOG FLOAT
In all other cases, no automatic quirks are assigned to the window. Quirks specified in the
configuration file override the automatic quirks.
*EWMH*
*spectrwm* partially implements the Extended Window Manager Hints (EWMH) specification. This
enables controlling windows as well as *spectrwm* itself from external scripts and programs.
This is achieved by *spectrwm* responding to certain ClientMessage events. From the terminal
these events can be conveniently sent using tools such as wmctrl <https://manpages.ubuntu.com/manpages/jammy/man1/wmctrl.1.html>(1) and xdotool <https://manpages.ubuntu.com/manpages/jammy/man1/xdotool.1.html>(1). For the
actual format of these ClientMessage events, see the EWMH specification.
The id of the currently focused window is stored in the _NET_ACTIVE_WINDOW property of the
root window. This can be used for example to retrieve the title of the currently active
window with xprop <https://manpages.ubuntu.com/manpages/jammy/man1/xprop.1.html>(1) and grep <https://manpages.ubuntu.com/manpages/jammy/man1/grep.1.html>(1):
$ WINDOWID=`xprop -root _NET_ACTIVE_WINDOW | grep -o "0x.*"`
$ xprop -id $WINDOWID _NET_WM_NAME | grep -o "\".*\""
A window can be focused by sending a _NET_ACTIVE_WINDOW client message to the root window.
For example, using wmctrl <https://manpages.ubuntu.com/manpages/jammy/man1/wmctrl.1.html>(1) to send the message (assuming 0x4a0000b is the id of the window
to be focused):
$ wmctrl -i -a 0x4a0000b
Windows can be closed by sending a _NET_CLOSE_WINDOW client message to the root window. For
example, using wmctrl <https://manpages.ubuntu.com/manpages/jammy/man1/wmctrl.1.html>(1) to send the message (assuming 0x4a0000b is the id of the window to
be closed):
$ wmctrl -i -c 0x4a0000b
Windows can be floated and un-floated by adding or removing the _NET_WM_STATE_ABOVE atom
from the _NET_WM_STATE property of the window. This can be achieved by sending a
_NET_WM_STATE client message to the root window. For example, the following toggles the
floating state of a window using wmctrl <https://manpages.ubuntu.com/manpages/jammy/man1/wmctrl.1.html>(1) to send the message (assuming 0x4a0000b is the id
of the window to be floated or un-floated):
$ wmctrl -i -r 0x4a0000b -b toggle,_NET_WM_STATE_ABOVE
Windows can also be iconified and un-iconified by substituting _NET_WM_STATE_HIDDEN for
_NET_WM_STATE_ABOVE in the previous example:
$ wmctrl -i -r 0x4a0000b -b toggle,_NET_WM_STATE_HIDDEN
Floating windows can also be resized and moved by sending a _NET_MOVERESIZE_WINDOW client
message to the root window. For example, using wmctrl <https://manpages.ubuntu.com/manpages/jammy/man1/wmctrl.1.html>(1) to send the message (assuming
0x4a0000b is the id of the window to be resize/moved):
$ wmctrl -i -r 0x4a0000b -e 0,100,50,640,480
This moves the window to (100,50) and resizes it to 640x480.
Any _NET_MOVERESIZE_WINDOW events received for stacked windows are ignored.
*SIGNALS*
Sending *spectrwm* a HUP signal will restart it.
*FILES*
~/.spectrwm.conf <file:///~/.spectrwm.conf> *spectrwm* user specific settings.
/etc/spectrwm.conf *spectrwm* global settings.
*HISTORY*
*spectrwm* was inspired by xmonad & dwm.
*AUTHORS*
*spectrwm* was written by:
Marco Peereboom ⟨_marco@peereboom.us <mailto:marco@peereboom.us>_⟩
Ryan Thomas McBride ⟨_mcbride@countersiege.com <mailto:mcbride@countersiege.com>_⟩
Darrin Chandler ⟨_dwchandler@stilyagin.com <mailto:dwchandler@stilyagin.com>_⟩
Pierre-Yves Ritschard ⟨_pyr@spootnik.org <mailto:pyr@spootnik.org>_⟩
Tuukka Kataja ⟨_stuge@xor.fi <mailto:stuge@xor.fi>_⟩
Jason L. Wright ⟨_jason@thought.net <mailto:jason@thought.net>_⟩
Reginald Kennedy ⟨_rk@rejii.com <mailto:rk@rejii.com>_⟩
Lawrence Teo ⟨_lteo@lteo.net <mailto:lteo@lteo.net>_⟩
Tiago Cunha ⟨_tcunha@gmx.com <mailto:tcunha@gmx.com>_⟩
David Hill ⟨_dhill@mindcry.org <mailto:dhill@mindcry.org>_⟩
Powered by the Ubuntu Manpage Repository
<https://launchpad.net/ubuntu-manpage-repository>, file bugs in
Launchpad <https://bugs.launchpad.net/ubuntu-manpage-repository/+filebug>
© 2019 Canonical Ltd. Ubuntu and Canonical are registered trademarks of
Canonical Ltd.
And upon viewing this post I noticed that spectrwm works with Extended window hints, so it will work with wmctrl, and now I'm going to install wmctrl as I have a lot of scripts already written for that.
I thoroughly enjoy working in this desktop environment. M-t floats any window, and you can move it using M-leftmousebutton and resize it using M-rightmousebutton. So basically you can have 3 or 4 windows opened in the stack, hover the mouse over, type M-t, and then size it if needed. M-t puts it back in the stack and M-t will float it again exactly as previously sized and positioned.
This image shows the rox pinboard, which becomes the "master window" and all the other windows go in the stack to the right. The master window (rox pinboard) is shrunk using M-h and Rox options has the iconified windows enabled. This is a handy setup, as you can see I have launcher icons at the bottom and the iconified windows added to the upper left of the pinboard. This way I can see the contents of windows in the stack, M-w minimizes them to an iconified window. You can also minimize windows if you don't have a pinboard with M-w, and get a list of minimized windows in the status bar with M-shift-w, and windows can be chosen with the arrow keys and enter will open them again.