| SCROTWMOS.CONF(5) | File Formats Manual | SCROTWMOS.CONF(5) |
NAME
scrotwmos.conf —
scrotwmos window manager configuration file
DESCRIPTION
scrotwmos.conf configures the scrotwmos
window manager: swm-wl(1), the Wayland
compositor, and swm-x11(1), the X11
window manager. Both read the same file. Most keywords mean the same on
both. The BACKENDS section lists the ones
that do not.
A spectrwm configuration works with few changes. spectrwm's
bar_delay, java_workaround,
screenshot_app, and
screenshot_enabled are read and ignored.
scrotwmos.conf adds sessions, which run each
workspace's programs in a container or a virtual machine, and the keys of
the appliance, where swm-wl(1) is the
whole operating system.
The window manager reads the first of these files that exists:
- ~/.scrotwmos.conf
- /etc/scrotwmos.conf
swm-wl(1) then reads
~/.scrotwmos-wayland.conf, if it exists, on top of
it. A file named with -c
(swm-x11(1)) or
-f (swm-wl(1))
replaces all of them, the Wayland file included. On the appliance, the file
is /etc/scrotwmos/dom0.conf, sealed by the
installer.
Each line is
keyword[selector]
= valuewhere ‘=’ may be
‘+=’ or
‘-=’ for the keywords that take a
list. For example:
color_focus = redquirk[XTerm] += FLOATsession_isolation[www] =
vmKeywords are not case sensitive. Enable or disable an option with 1 or 0.
A ‘#’ starts a comment, at
the start of a line or after a value. Write
‘\#’ for a
‘#’ that is part of the value. A line
that ends in ‘\’ continues on the next
line. A ‘\’ in a comment does not.
Write ‘\\’ for a
‘\’ that is part of the value. A value
keeps the quotes in it as written. Only the *_mark_*
keywords and the arguments of a program take quotes
off. There, single or double quotes keep spaces together, and a backslash
escapes a quote. A mark may be the empty string,
''.
The first line that does not parse stops the parse, and the window manager refuses to start. A restart of swm-x11(1) comes up instead on what parsed before the bad line. A reload that fails keeps the lines before the bad one and says so.
A color is
rgb:r/g/b
or
rgba:r/g/b/a,
with 1 to 4 hex digits each,
\#rrggbb, or a name, such as
red. swm-x11(1)
takes every name its X server knows. See
BACKENDS for the names
swm-wl(1) knows. Anything else stops the
parse. The alpha of rgba: shows only on an X screen
with an alpha channel, a 32-bit visual. On any other screen, the color is
opaque.
KEYWORDS
autorun- Launch an application in a specified workspace at start. Defined in the
format
ws[idx]:application. For example, ws[2]:foot launches a terminal in workspace 2. Specify ‘ws[-1]’ to launch applications such as panels in free mode to keep them always mapped. swm-wl(1) starts these on the host, not in a session, once at start. Refused on the appliance. bar_action- External script that populates additional information in the status bar, such as battery life. Refused on the appliance.
bar_action_expand- Process
bar_formatcharacter sequences inbar_actionoutput. The default is 0. bar_at_bottom- Place the status bar at the bottom of each region instead of the top. The default is 0.
bar_border[x]- Border color of status bar(s) on screen number x. The default is rgb:00/80/80.
bar_border_free[x]- Border color of a status bar for a focused region on screen number x when a workspace-free window is focused. The default is rgb:80/80/00.
bar_border_unfocus[x]- Border color of status bar(s) for unfocused region(s) on screen number x. The default is rgb:00/40/40.
bar_border_width- Set status bar border thickness in pixels. The default is 1. Set it to 0 to disable the border.
bar_color[x]- Background color of status bar(s) on screen number
x. The default is black.
A comma-separated list of colors: the first is the background, and the markup sequence
+@bg=n;selects color n, counting from 0.bar_color_freeandbar_color_unfocustake the same list. A color they leave out is taken frombar_color. bar_color_free[x]- Background color of a status bar for a focused region on screen number x when a workspace-free window is focused. The default is rgb:40/40/00.
bar_color_selected[x]- Background color for selected
menuitems on screen number x. Defaults to the value ofbar_border. bar_color_unfocus[x]- Background color of status bar(s) for unfocused region(s) on screen number
x. Defaults to the value of
bar_color. bar_enabled- Set the default
bar_togglestate. The default is 1. bar_enabled_ws[x]- Set the default
bar_toggle_wsstate on workspace x. The default is 1. bar_font- A comma-separated list of status bar fonts, each Xft or X Logical Font
Description (XLFD). The later ones are fallbacks. If every entry is XLFD,
a font set is used, which is the default. If any entry is Xft, Xft is
used. With Xft, the first entry is the default font, and the markup
sequence
+@fn=n;selects font n, counting from 0.swm-wl(1) draws the bar with Terminus bitmap fonts and no fontconfig. It takes the family and the pixel size of each entry, looks for the matching ter-u*.otb file under /usr/share/fonts, /usr/local/share/fonts, or /usr/share/X11/fonts, and uses the first one that loads. XLFD entries are skipped. Its default is
monospace:pixelsize=14.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-*-*-*-*-*-*-*
fc-list(1) and xlsfonts(1) list the fonts installed. xfontsel(1) helps build an XLFD.
bar_font_color[x]- Foreground color of the status bar(s) on screen number
x. The default is rgb:a0/a0/a0.
A comma-separated list of colors: the first is the foreground, and the markup sequence
+@fg=n;selects color n, counting from 0.bar_font_color_freeandbar_font_color_unfocustake the same list. A color they leave out is taken frombar_font_color. bar_font_color_free[x]- Foreground color of a status bar for a focused region on screen number x when a workspace-free window is focused. The default is rgb:ff/ff/ff.
bar_font_color_unfocus[x]- Foreground color of status bar(s) for unfocused region(s) on screen number
x. Defaults to the value of
bar_font_color. bar_font_color_selected[x]- Foreground color for selected
menuitems on screen number x. Defaults to the value ofbar_color. bar_font_pua- Specify a font to override the Unicode Private Use Area code points (U+E000 -> U+F8FF, U+F0000 -> U+FFFFD, U+100000 -> U+10FFFD). 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_formatand all of theenabledoptions. The format is passed through strftime(3) before it is used. It may contain the following character sequences:Character sequence Replaced with +<Pad with a space +AOutput of the external script +CWindow class (from WM_CLASS) +DWorkspace name +EThe workspace's session; default for session_default +FFocus status indicator +IWorkspace index +LWorkspace list indicator +MNumber of iconic (minimized) windows in workspace +NScreen number +PWindow class and instance separated by a colon +RRegion index +SStacking algorithm +TWindow instance (from WM_CLASS) +UUrgency hint +VProgram version +wNumber of windows in workspace +WWindow name (from _NET_WM_NAME/WM_NAME) +|[weight][justify]Begin new section and reset markup sequence effects. weightis a positive integer used to allocate horizontal space between 'L', 'C', and 'R' sections (see justify). The default weight is 1.justifycan have the value L, C, R, or T. L, C, and R are for left, center, and right justified sections, respectively. A 'T' section limits its space to fit the text. If no value is specified for a given section, the setting frombar_justifyis used.++A literal ‘ +’+@Prefix for text markup sequences The currently recognized text markup sequences are:
Character sequence Action +@fn=n;Selects font n (starting at 0) from bar_font.+@fg=n;Selects foreground color n (starting at 0) from bar_font_color.+@bg=n;Selects background color n (starting at 0) from bar_color.+@stp;Stops the interpretation of markup sequences. Any markup sequence found after +@stp appears as normal characters in the status bar. Markup sequences in
bar_actionscript output are processed only ifbar_action_expandis enabled.A length limits a sequence's output, as in +64A. A shorter string is not padded unless the sequence has a '_': +_64W, +64_W, and +_64_W pad the window name before (right aligned), after (left aligned), and on both sides (centered). Other characters are copied as they are.
bar_justify- Justify the status bar text. Possible values are
left, center, and
right. The default is left.
Output that is not left justified may not align well, because of the spaces in the default format. See
bar_format. bar_padding_horizontal- Set status bar horizontal padding in pixels. The default is 0.
bar_padding_vertical- Set status bar vertical padding in pixels. The default is 0.
bar_workspace_limit- Set the maximum workspace index (counting from 1) to list in the status bar workspace (+L) and urgency hint (+U) indicators. Workspaces beyond this value are not shown. The default is 0 (disabled).
bind[x]- Bind key or button combo to action x. See the BINDINGS section below.
border_width- Set window border thickness in pixels. The default is 1. Set it to 0 to disable all borders.
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. The default is 50. Set it to 0 to disable the window containment effect.
cancelkey- Change the key used as an alternative means of terminating move/resize
operations. The default is Escape.
See the BINDINGS section below for details on how to find key names.
center_adaptive- In centered mode, enable to center the master area only when centering does not create empty space (for example, with one stack, revert to non-centered). The default is 0.
center_autobalance- Automatically balance the master and stack areas when centered mode is toggled. The default is 0.
center_noautostack- In centered mode, an extra stack is automatically added when there is only
one stack. Set it to 1 to disable the automatic stack. Use it with
center_adaptiveto center the master area only when there are at least two stacks. The default is 0. center_nowrap- In centered mode, stacks are positioned from one side of the master area and spill over to the opposite side. Enable to maintain the original order of stacks, split by the master area without wrapping. The default is 0.
click_to_raise- Enable or disable raising stacking priority when clicking on a window. The default is 1.
clock_enabled- Enable or disable displaying the clock in the status bar. The default is
1. Set it to 0 so that a custom clock can be used in the
bar_actionscript. Ignored whenbar_formatis set. clock_format- The strftime(3) format of the clock
in the default bar. The default is ‘
%a %b %d %R %Z %Y’. It is ignored whenbar_formatis set. color_focus_free- Border color of the currently focused window that is in free mode. The default is yellow.
color_focus_maximized_free- Border color of the currently focused maximized window that is in free
mode. Defaults to the value of
color_focus_free. color_unfocus_free- Border color of unfocused windows that are in free mode. The default is rgb:88/88/00.
color_unfocus_maximized_free- Border color of unfocused maximized windows that are in free mode.
Defaults to the value of
color_unfocus_free. color_urgent_free- Border color of urgent windows that are in free mode. Defaults to the
value of
color_unfocus_free. color_urgent_maximized_free- Border color of urgent maximized windows that are in free mode. Defaults
to the value of
color_urgent_free. color_focus- Border color of the currently focused window. The 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. The default is rgb:88/88/88.
color_unfocus_maximized- Border color of unfocused maximized windows. Defaults to the value of
color_unfocus. color_urgent- Border color of urgent windows. Defaults to the value of
color_unfocus. color_urgent_maximized- Border color of urgent maximized windows. Defaults to the value of
color_urgent. cycle_empty- Include empty workspaces when switching with
ws_nextandws_prev. The default is 0.ws_next_all,ws_prev_all,ws_next_move, andws_prev_movealways include them. cycle_visible- Include workspaces that are mapped when switching with
ws_next,ws_prev,ws_next_all,ws_prev_all,ws_next_move, orws_prev_move. Enable by setting to 1.Mapped workspaces are swapped unless
workspace_clampis enabled. Ifwarp_focusis also enabled, focus goes to the region where the workspace is mapped. dialog_ratio- The window/region size ratio for transient windows with the TRANSSZ quirk, for dialogs too small to be useful. For example, 0.6 (default) is 60% of the output size if the current region spans the output.
disable_border- Remove the border when the bar is disabled and there is only one window on the region. Enable by setting to 1. Setting this to always removes the border regardless of the bar being enabled/disabled. The default is 0.
disable_padding- Remove region padding when the bar is disabled and there is only one window on the region. Enable by setting to 1. Setting this to always removes the region padding regardless of the bar being enabled/disabled. The default is 0.
focus_close- The window to focus when the focused window is closed. Possible values are first, next, previous (default), last, and prior. next and previous are relative to the window that is closed. prior is the last focused window in the workspace.
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- The window to focus when no window has been focused. Possible values are first and last (default).
focus_mark_none- The +F mark when no window is focused. The default is ''.
focus_mark_normal- The +F mark when a normal window, not floating, maximized, or free, is focused. The default is ''.
focus_mark_floating- The +F mark when a floating window is focused. The default is '(f)'.
focus_mark_free- The +F mark when a window in free mode is focused. The default is '(*)'.
focus_mark_maximized- The +F mark when a maximized window is focused. The default is '(m)'.
focus_mode[t]- Set 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
- Prioritize the pointer location. Set window focus on all cursor border crossings, including workspace switches and changes to layout.
- manual
- Ignore the pointer location. Set window focus on window interaction only.
Optionally, adjust the focus mode for specific focus situations. A comma-separated list of the following situations can be specified for t:
- border
- Pointer enters a window. The default is follow.
- configure
- Window position/size changed by the client/EWMH. The default is manual.
- iconify
- Window iconified. The default is manual.
- layout
- Workspace layout changed. The default is manual.
- map
- Window maps. The default is manual.
- move
- Window moved to another workspace. The default is manual.
- startup
- The window manager (re)started. The default is manual.
- uniconify
- Window uniconified. The default is manual.
- unmap
- Window unmaps. The default is manual.
- workspace
- Workspace switched. The default is manual.
Without t, the setting applies to every situation. Example:
focus_mode = follow # Set all focus situations to 'follow'. focus_mode[map,unmap] = manual # Change only map and unmap to 'manual'. focus_mode = default # Reset all focus situations to respective default values.
fullscreen_hide_other- When a fullscreen window is focused and not in
belowstate, hide unrelated windows in the same workspace. Useful for transparent windows. The default is 0. fullscreen_unfocus- Set handling when a fullscreen window loses focus. Possible values:
- none
- Leave the window fullscreen (default).
- restore
- Exit fullscreen.
- iconify
- Minimize/hide the window.
- float
- Exit fullscreen and float the window.
- below
- Set
belowstate on the window. - quick_below
- Set
belowstate on the window, unset when refocused.
Ignored in max layout.
guru_grab- When an alert band is up, give it the keyboard until it is continued. The default is 1. With 0, the band shows but grabs nothing. swm-wl(1) 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 read the named file. The
file is a configuration file of its own, usually a list of
bindlines for a keyboard layout. If it does not parse, the parse stops and the default key bindings come back./dev/null only clears the bindings. On the appliance, that also clears the tab bindings,
MOD+F1toMOD+F12. layout- Select the layout to use at start. Defined in the format
ws[idx]:master_grow:master_add:stack_inc:always_raise:stack_mode. For example, ws[2]:-4:0:1:0:horizontal sets workspace 2 to the horizontal stack mode, shrinks the master area by 4 ticks, and adds one row to the stack area. It keeps the default floating window behavior. Possible stack_mode values are vertical, vertical_flip, vertical_center, vertical_center_flip, horizontal, horizontal_flip, horizontal_center, horizontal_center_flip, max, and floating.See
master_grow,master_shrink,master_add,master_del,stack_inc,stack_dec,stack_balance, andalways_raise. This setting is not retained at restart. layout_order- Define the layout sequence used by the
cycle_layoutaction. Possible values are vertical, horizontal, max, and floating. At least one value must be specified, without duplicates. The default is vertical,horizontal,max,floating. max_layout_maximize- Automatically maximize windows in max layout. Automatic maximize is
disabled for windows unmaximized in max layout. Maximizing the window or
resetting the layout with
stack_resetenables it again. The default is 1. Set it to 0 to disable it. maximize_hide_bar- When set to 1,
maximize_togglealso hides or restores the bar of the affected workspace. The default is 0. maximize_hide_other- When a maximized window is focused and not in
belowstate, hide unrelated windows in the same workspace. Useful for transparent windows. The default is 0. maximized_unfocus- Set handling when a maximized window loses focus. Possible values:
- none
- Leave the window maximized.
- restore
- Unmaximize the window (default).
- iconify
- Minimize/hide the window.
- float
- Unmaximize and float the window.
- below
- Set
belowstate on the window. - quick_below
- Set
belowstate on the window, unset when refocused.
Ignored in max layout.
modkey- Change the current modifier value of
MODinbindentries that come later in the configuration file. For existing bindings, the new value is substituted for the previous value. Possible values are Mod1 (default), Mod2, Mod3, Mod4, Mod5, and Control. The appliance uses Mod4.Mod1 is generally the Alt key, Mod2 is the Command key on macOS, and Mod4 is the Windows key on a PC. Under X11, xmodmap(1) shows the current modifier key mapping. swm-wl(1) never sees Mod2 (Num Lock), so a binding on it never fires there.
move_step- Set the pixel amount to move a window for the
move_left,move_right,move_up, andmove_downactions. The default is 50. name- Set the name of a workspace at start. Defined in the format
ws[idx]:name. For example, ws[1]:Console sets the name of workspace 1 to “Console”. program[p]- Define a new action to spawn the program p. See the PROGRAMS section below.
quirk[c[:i[:n[:t]]]]- Add a quirk for windows with class c, instance i (optional), name n (optional), and type t (optional). See the QUIRKS section below.
region- Allocates a custom region, removing any autodetected regions that occupy
the same space on the specified logical X screen number. Defined in the
format
screen[idx]:widthxheight+x+y[,rotation]. For example, screen[1]:800x1200+0+0 or screen[1]:800x1200+0+0,inverted (with optional rotation).To make a region span several outputs, create a region big enough to cover them all. For example, screen[1]:2048x768+0+0 makes the region span two 1024x768 outputs side by side.
Possible values for the optional rotation argument are normal (default), left, inverted, and right. The rotation is used by
workspace_autorotate. region_padding- Pixel width of empty space within region borders. Disable by setting to 0.
resize_step- Set the pixel amount to resize a window for the
width_shrink,width_grow,height_shrink, andheight_growactions. The default is 50. snap_range- Set the distance in pixels a tiled/maximized window must be moved (with the pointer) to unsnap and float freely. Set to 0 to unsnap immediately. The default is 25.
spawn_flags[p]- If the search pattern p is specified, change the
spawn flags of existing program entries. If p is
omitted, change the default spawn flags for any
programorautorunentries that come later in the configuration file. p is a POSIX extended regular expression.The value is a comma-separated list of flags:
- nospawnws
- When the program is spawned, do not associate the spawn workspace with the program's windows.
- xterm_fontadj
- Enable automatic font size adjustments when
xterm(1) windows are resized. See
term_width. - optional
- Disable program validation.
- none
- No flags specified.
The default is none. ‘
+=’ and ‘-=’ add and remove flags.Under swm-wl(1), a program's windows open on its spawn workspace by their activation token, and xterm_fontadj does nothing.
spawn_position- The position in the stack for newly spawned windows. Possible values are first, next, previous, and last (default). next and previous are relative to the focused window.
spawn_term- The old name of
program[term]. It setsprogram[spawn_term] too. stack_enabled- Enable or disable displaying the current stacking algorithm in the status bar. The default is 1.
stack_mark_floating- The +S mark of the floating layout. The default is '[~]'.
stack_mark_horizontal- The +S mark of the horizontal layout. The default is '[-]'.
stack_mark_horizontal_center- The +S mark of the horizontal_center layout. The default is '(-)'.
stack_mark_horizontal_center_flip- The +S mark of the horizontal_center_flip layout. The default is '(v)'.
stack_mark_horizontal_flip- The +S mark of the horizontal_flip layout. The default is '[v]'.
stack_mark_max- The +S mark of the max layout. The default is '[ ]'.
stack_mark_vertical- The +S mark of the vertical layout. The default is '[|]'.
stack_mark_vertical_center- The +S mark of the vertical_center layout. The default is '(|)'.
stack_mark_vertical_center_flip- The +S mark of the vertical_center_flip layout. The default is '(>)'.
stack_mark_vertical_flip- The +S mark of the vertical_flip layout. The default is '[>]'.
term_width- A preferred minimum terminal width. Above 0, the window manager adjusts
the terminal's font size to keep its width above this as the window is
resized. The default is 0.
Only xterm(1) is supported. It needs the xterm_fontadj spawn flag, the XTERM_FONTADJ quirk, and an xterm(1) binary without the setuid or setgid bit, which most systems set: point
program[term] at a copy without it. uniconify_order- Set the window order in the uniconify menu. Possible values are earliest, latest, and workspace (default).
tile_gap- Pixel width of empty space between tiled windows. Negative values cause
overlap. Set this to the opposite of
border_widthto collapse the border between tiles. Disable by setting to 0. title_class_enabled- The old name of
window_class_enabled. title_name_enabled- The old name of
window_instance_enabled. 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. Enable by
setting to 1.
Many terminals mark a window urgent on a bell only when told to. For xterm(1), add 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, andstack_dec. warp_focus- Focus on the target window/workspace/region when clamped. For example,
when you switch to a workspace that is mapped on another region and
workspace_clampis 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.
With
focus_modeset to follow, it does not warp when a window is iconified, uniconified, maximized, or moved to another workspace. wayland_clipboard_sync- Copy the primary selection to the clipboard and back, so a middle click
pastes what was last copied and the other way round. Text alone is copied,
once the two have settled. The default is 1. Set it to 0 to keep the two
apart. It holds in the dom0 compositor and in every session's. A session's
clipboard is its own: nothing copied in one session pastes in another. The
old keyword
session_clipboardis refused. wayland_cursor_size- The cursor size in pixels. The default is 24.
wayland_output_height- See
wayland_output_width. wayland_output_width- The mode an output starts in, with
wayland_output_height. Both must be set. The output takes the matching mode when it has one, a custom mode when it is virtual, and its preferred mode otherwise. The default is 0: the preferred mode. It applies when an output appears. wayland_scale- The scale of every output, a number above 0 and at most 10. The default is 0: each output's own scale. Any other value also gives each output its own scale. The bar scales with it.
wayland_setenv- Set an environment variable for every program the compositor starts, as
KEY=VALUE, for example
wayland_setenv = GDK_DPI_SCALE=1.5. Each program puts it in its own environment as it starts, before the compositor's own words for it. The compositor's own environment is not changed. A session with no isolation gets the lines after itssession_env, the two at most 32 lines. A reload takes the file's lines anew. The compositor sets no toolkit variables of its own. 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. The name
is cut at 64 characters by default. See
bar_formatto change the length. workspace_autorotate- When a workspace moves across regions, auto-rotate vertical/horizontal layouts based on rotation data from xrandr(1). Enable by setting to 1.
workspace_clamp- Prevents workspaces from being swapped when you try to switch to a
workspace that is mapped to another region. Use
warp_focusif you want to focus on the region containing the workspace, andwarp_pointerif 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.
- markactive
- Indicate workspaces in the list that are active.
- markempty
- Indicate workspaces in the list that are empty.
- markurgent
- Indicate workspaces in the list that contain urgent window(s).
- printnames
- Display the names of named workspaces in the list.
- noindexes
- Hide the index of the workspaces.
The default is listcurrent,listactive,markcurrent,printnames.
Markup sequences style the workspace indicator. For example, to change the color of the current workspace:
workspace_mark_current = '+@fg=1;' workspace_mark_current_suffix = '+@fg=0;'
workspace_limit- Set the total number of workspaces available. The minimum is 1, the
maximum is 100, and the default is 10. Workspaces 23 and above have no
default bindings. See the BINDINGS
section below for defaults and customization. To limit the workspaces
listed in the bar, see
bar_workspace_limit. workspace_mark_active- Set the string inserted before active workspaces in the
workspace_indicator. The default is '^'. workspace_mark_active_suffix- Set the string inserted after active workspaces in the
workspace_indicator. The default is '' (empty string). workspace_mark_current- Set the string inserted before the current workspace in the
workspace_indicator. The default is '*'. workspace_mark_current_suffix- Set the string inserted after the current workspace in the
workspace_indicator. The default is '' (empty string). workspace_mark_empty- Set the string inserted before empty workspaces in the
workspace_indicator. The default is '-'. workspace_mark_empty_suffix- Set the string inserted after empty workspaces in the
workspace_indicator. The default is '' (empty string). workspace_mark_urgent- Set the string inserted before urgent workspaces in the
workspace_indicator. The default is '!'. workspace_mark_urgent_suffix- Set the string inserted after urgent workspaces in the
workspace_indicator. The default is '' (empty string).
SESSIONS
A session is where programs run. Each workspace belongs to one session. A program started on a workspace runs in that workspace's session. A window cannot move to a workspace of another session. Sessions are swm-wl(1) only. See BACKENDS.
A session is named by its keywords' selector, for example
session_isolation[www] = vm. Names are not case
sensitive. Under the root monitor, a name is 1 to 63 letters, digits,
‘_’, or
‘-’. Without the root monitor, a name
does not start with a dot or hold a slash, a colon, or a control character.
A VM's name is also its guest's username: at most 32 characters, and it does
not start with ‘-’. The name
host is reserved: it means the compositor's own
host, and takes no session keywords. Every session keyword takes only
‘=’.
swm-wl(1) refuses to start when the configuration gets a session wrong. A session that fails to launch at start is skipped. A program started on its workspace tries the launch again and is refused if that fails.
reload and restart
read the session keywords again. A running session keeps the settings it was
launched with. A session that is down starts with the new ones when a
program is next started on it, unless the reload changed its isolation or
its uid. A session the reload adds is not launched until the compositor
starts again.
session_default- The session of every workspace that
workspace_sessiondoes not name, orhost. It takes no selector. swm-wl(1) does not start without it. workspace_session[n]- The session of workspace n, from 1 to
workspace_limit. session_isolation[s]none(the default),container, orvm.noneruns the session's daemon as a plain host process.containerruns it in Linux namespaces with its own uid, seccomp, cgroup limits, and no capabilities, on the host's kernel.vmruns it in its own virtual machine under swm-vmm(8), with its own kernel. Whatever the isolation, the cost is rootless netfilter: every scrotwmos kernel, dom0's and each VM's, takes netfilter commands only from its own root, so in a session a podman or docker network of its own, firejail --netfilter and unshare -rn nft get EPERM. Rootless podman's and docker's default network, pasta or slirp4netns, works. A container or a VM needssession_uidandsession_daemon.session_uid[s]- The uid the session runs as, from 500000 to 4294967294. Each session has its own, and none may be a user or a group on the host. A VM whose network the host routes, with no net VM, takes one below 1048576.
session_daemon[s]- The session's display daemon, scrotwmd(8) for a container, or swm-vmm(8) for a VM.
session_color[s]- The color of the window borders on the session's workspaces, at full
strength when focused and half when not. Urgent windows keep
color_urgent. session_net[s]- What the session reaches:
none(the default),guest,lan, orfull.nonegives the session no network, only its own loopback.guestreaches the internet but not the LAN.lanreaches the LAN but not the internet.fullreaches both. The LAN is 10/8, 172.16/12, 192.168/16, 169.254/16, and the uplink's own subnet. Where the network comes from is not the config's: the net VM routes it, or the host routes a VM's, and both drop what the session may not reach. On a host with neither, a container ofguest,lan, orfullis routed by the host as a VM is on byol, where swm-wl(1) is not PID 1. On the appliance it gets none. A container's /etc/resolv.conf names its gateway, read-only. On byol a nat VM's or container's gateway sends DNS on to the first IPv4 server of the host's /etc/resolv.conf not in 0/8, 127/8, 169.254/16, 224/4 and up, or the VMs' 100.64/10, read again at each change of that file. A local stub on 127.0.0.1 cannot serve a VM or a container; the monitor says so at the session's start. session_env[s]- An environment variable for the session's programs, as
KEY=VALUE. Repeat it for more,
up to 32.
LD_*variables are refused. A VM takes none: its environment is the guest's. session_mount[s]- A directory bound into a container, as src dst
[
ro|rw]. The default isro. Repeat it for more, up to 32. src may start with ~. session_rootfs[s]- A container's root directory, /srv/label.
session_image[s]- A container's root image or a VM's disk,
/swmdata/images/label. A
container with it takes no
session_rootfs. A VM with it takes nosession_disk,session_kernel, orsession_initrd, and is never a template. It opens only on a box whose data is unlocked. session_home[s]- A container's home image,
/swmdata/images/label, not
the same as its root image. It needs
session_image. With it,HOMEis /home/name, andsession_envmay name no other. session_kernel[s]- A VM's kernel. Without it, the VM boots the signed guest kernel.
session_initrd[s]- A VM's initramfs, with
session_kernel. session_disk[s]- A VM's disk, which the guest makes its root.
session_ram[s]- A VM's memory, in bytes or with a
K,M, orGsuffix. The default is 3G. It costs nothing until the guest uses it, and the guest gives back what it frees. session_vcpus[s]- A VM's processors, 1 to 64. The default is the smallest of 8, the
machine's processors, and
session_cpu_maxin whole processors. More thansession_cpu_maxallows are only throttled, which is said. The net VM always has one. session_gpu[s]none(the default),graphics, orcompute. A VM withgraphicsgets the box's held GPU, the one given whole to one VM a boot, and draws its desktop on it. Only a VM that asks gets it. F9 shows which GPU is ready and who has it. After that VM stops, the GPU is held until the next power off.computegets the same GPU the same way, and its guest also makes NVIDIA's unified-memory device nodes, so CUDA programs run on it.session_class[s]none(the default) ortemplate. A template must be a VM with asession_disk. It is the one updater of that shared disk. The disk is locked while it runs, and a template that does not power off cleanly leaves the disk marked dirty.session_resume[s]- Set to 1 for one start to accept a template's dirty disk. Only a template takes it.
- Set to 1 to bind
share_dirinto a container or a VM at /share. session_mem_max[s]- The most memory the session's cgroup may hold, as a size. A VM's
session_rammay not be more. session_mem_high[s]- The memory above which the kernel slows the session down, as a size, no
more than
session_mem_max. session_swap_max[s]- The most swap the session may use, as a size.
session_pids_max[s]- The most processes and threads the session may run.
session_cpu_weight[s]- The session's share of the CPU against the others, from 1 to 10000.
session_cpu_max[s]- The most CPU the session may use, from 1 to 10000 percent of one CPU.
- The host directory that
session_sharebinds. It must be a directory owned by root, with the setgid bit, and withshare_gidas its group. - The group that owns
share_dirand that every sharing session joins: 500000 or more, and not a group in /etc/group.
THE APPLIANCE
On the appliance, swm-wl(1) is
the first process, and its root monitor reads these keywords before anything
else starts. They take ‘=’ and no
selector, and are read only from
/etc/scrotwmos/dom0.conf or the file named with
-f.
allow_hotplug- Set to 1 to take input devices plugged in after boot. The default is 0: the compositor takes the devices there at boot and refuses the rest, which the usb tab can let in by hand. A keyboard taken this way, not there at boot nor let in by hand, cannot turn the points off, delete them, or make a place in F11.
boot_log- Read and ignored: the boot's log is always kept, in the kernel log, which the F3 panel shows and the root monitor writes to swmdata as it comes.
dom0_netnone(the default) ordhcp. Withdhcp, the root monitor takes a lease on the wired port for dom0 itself. The dom0 kernel drives no network card, so there is no port today. The old keyworddhcpis refused. Write ‘dom0_net = dhcp’.net_uplink- Set to
autoto give the world a network: the net VM takes every PCI network card whole, each whose IOMMU group holds network cards alone and passes the gate. Unset, the world has none. net_dns- One IPv4 name server: the net VM's clients', and, with
dom0_netset todhcp, dom0's. net_ntp- One to four IPv4 time servers for the net VM, separated by commas.
points- Set to 0 to keep no points of the world's homes, and delete those there. The default is 1: each hour a home changed in, the root monitor keeps a copy of it as it was, read-only, on the same disk. It keeps one an hour for a day, one a day for a week, then one a week, 104 weeks at most. Under 5% free space, it takes none. Under 1%, it deletes them all.
rescue- The name of the rescue world's session. That session runs alone, as root, with the host's network and every disk. Every other session is refused.
The disk table
The appliance mounts the world's disks from /etc/scrotwmos/dom0.fstab, which comes sealed with the world's configuration. Each line is
device mountpoint
fstype [options]The device is a path or
LABEL=name: an XFS label, or a
LUKS2 label on a crypt line. When the boot loader
names the partition it booted from, the /swmdata
label is looked for only on that disk. The mountpoint
is /swmdata or
/srv/name, where
name holds only letters, digits,
‘.’,
‘_’, and
‘-’. A line that names another is not
mounted. The options are a comma-separated list of
ro, noexec, and
crypt. The root monitor opens a
crypt device with the world's disk key and mounts
the mapping. Every mount is nosuid, nodev, noexec, and noatime, whatever the
line says. Blank lines and lines that start with
‘#’ are skipped.
Refused on the appliance
The appliance refuses autorun,
bar_action, a session of
host, and the search and name menus: its dom0 runs
no program of its own. It also refuses quit.
STACK MODES
The window manager places every window. A new window takes its share of the screen, and the others make room. Each output is a region, and each region shows one workspace. A workspace splits its region in two: the master area holds the main window, and the stack area holds the rest. The layout decides how the two are placed:
vertical- The master area is on the left and the stack area on the right. The stack windows tile top to bottom.
vertical flipped- The same, with the two areas swapped.
horizontal- The master area is on top and the stack area below. The stack windows tile left to right.
horizontal flipped- The same, with the two areas swapped.
centered- The vertical or horizontal layout with the master area in the middle and
the stacks on both sides. See
center_layout. max- The focused window fills the region, except for the bar.
floating- Nothing is tiled. Every window can be moved and resized.
WINDOW STATES
Each state has a toggle action. See BINDINGS.
floating- The window sits above the tiles and can be moved and resized anywhere.
below- The window floats, but below the others.
maximized- The window fills the work area, the region without the bar. It stops being
maximized when another window takes the focus. See
maximized_unfocus. fullscreen- The window fills the whole region. It stays fullscreen when another window
takes the focus. See
fullscreen_unfocus. free- The window floats and belongs to no workspace or region. It stays on screen everywhere until you hide it.
PROGRAMS
A program entry defines an action that starts a program. Bind it like a built-in action (see BINDINGS):
program[action]
= progpath [arg
[arg ...]]action is any name that is not a built-in
action or keyword. The command runs as written, with
‘~’ expanded and nothing else. For
shell syntax, run sh -c 'command string'.
These variables in the arguments are replaced when the program starts:
$bar_border$bar_color$bar_color_selected$bar_font$bar_font_color$bar_font_color_selected$color_focus$color_focus_free$color_focus_maximized$color_focus_maximized_free$color_unfocus$color_unfocus_free$color_unfocus_maximized$color_unfocus_maximized_free$color_urgent$color_urgent_free$color_urgent_maximized$color_urgent_maximized_free- -b if
bar_at_bottomis enabled; otherwise the argument is dropped. $region_index$window_geometry- The focused window's place and size as ‘
X,Y WxH’, or the region's when no window has the focus. swm-wl(1) only. $workspace_index
Under swm-wl(1),
$bar_font is a family and a pixel size, the colors
are RRGGBB hex, and
$bar_border and the $color_*
variables are left as they are.
Example:
program[ff] = firefox https://www.openbsd.org/ bind[ff] = MOD+Shift+b
To cancel the previous binding, unbind it:
bind[] = MOD+Shift+b
These built-in actions start a program, by default, under swm-x11(1):
term- xterm
spawn_term- xterm
lock- xlock
- 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
Under swm-wl(1):
term- foot
spawn_term- foot
lock- swaylock, run on the host whatever the workspace's session; the appliance locks with its own lock screen instead
- wmenu-run -f $bar_font -N $bar_color -n $bar_font_color -S $bar_color_selected -s $bar_font_color_selected
search- wmenu -f $bar_font and the same colors
name_workspace- wmenu -p Workspace -f $bar_font and the same colors
initscr- initscreen.sh # optional
screenshot_all- grim, the whole output, into ~/screenshots/date.png
screenshot_wind- grim -g $window_geometry, the focused window, into ~/screenshots/date-window.png
Under swm-wl(1), a program runs in the session of the focused workspace, as that session's user, so a screenshot lands in that session's home.
search has no binding of its own.
search_win,
search_workspace, and
uniconify need it.
swm-x11(1) checks that each program exists, except the default entries marked “optional”. If the check fails, install the program, add the optional flag to the program entry's spawn flags, or free the respective binding. swm-wl(1) checks nothing: the program runs in a session, which has its own files.
For example, to add the optional flag to
lock:
spawn_flags[lock] += optional
To unbind lock so that it is not
validated:
bind[] = MOD+Shift+Delete
A program's windows open on the workspace it was started from.
BINDINGS
Actions are started from a key or a mouse button.
MOD is the modkey. Keys are
named by their keysym names, as in bind.
Default bindings
Button1- focus
MOD+Button1- move
MOD+Button3- resize
MOD+Shift+Button3- resize_centered
MOD+Shift+Return- term
MOD+p- menu
MOD+Shift+q- quit
MOD+q- restart
MOD+space- cycle_layout
MOD+backslash- center_layout
MOD+Shift+backslash- flip_layout
MOD+Shift+space- stack_reset
MOD+h- master_shrink
MOD+l- master_grow
MOD+comma- master_add
MOD+period- master_del
MOD+Shift+comma- stack_inc
MOD+Shift+period- stack_dec
MOD+Return- swap_main
MOD+j,MOD+Tab- focus_next
MOD+k,MOD+Shift+Tab- focus_prev
MOD+m- focus_main
MOD+grave- focus_free
MOD+Shift+a- focus_prior
MOD+u- focus_urgent
MOD+Shift+j- swap_next
MOD+Shift+k- swap_prev
MOD+b- bar_toggle
MOD+Shift+b- bar_toggle_ws
MOD+x- wind_del
MOD+Shift+x- wind_kill
MOD+1..MOD+0- ws_1 to ws_10
MOD+F1..MOD+F12- ws_11 to ws_22
MOD+Control+1..MOD+Control+0,MOD+Control+minus,MOD+Control+equal- ws_11 to ws_22
MOD+Shift+1..MOD+Shift+0- mvws_1 to mvws_10
MOD+Shift+F1..MOD+Shift+F12- mvws_11 to mvws_22
MOD+Control+Shift+1..MOD+Control+Shift+0,MOD+Control+Shift+minus,MOD+Control+Shift+equal- mvws_11 to mvws_22
MOD+KP_End..MOD+KP_Prior- rg_1 to rg_9
MOD+Shift+KP_End..MOD+Shift+KP_Prior- mvrg_1 to mvrg_9
MOD+Right- ws_next
MOD+Left- ws_prev
MOD+Up- ws_next_all
MOD+Down- ws_prev_all
MOD+Shift+Up- ws_next_move
MOD+Shift+Down- ws_prev_move
MOD+a- ws_prior
MOD+Shift+Right- rg_next
MOD+Shift+Left- rg_prev
MOD+s- screenshot_all
MOD+Shift+s- screenshot_wind
MOD+Shift+v- version
MOD+t- float_toggle
MOD+Shift+t- below_toggle
MOD+Shift+grave- free_toggle
MOD+Shift+Delete- lock
MOD+Shift+i- initscr
MOD+w- iconify
MOD+Shift+w- uniconify
MOD+e- maximize_toggle
MOD+Shift+e- fullscreen_toggle
MOD+r- raise
MOD+Shift+r- raise_toggle
MOD+v- button2
MOD+minus- width_shrink
MOD+equal- width_grow
MOD+Shift+minus- height_shrink
MOD+Shift+equal- height_grow
MOD+bracketleft- move_left
MOD+bracketright- move_right
MOD+Shift+bracketleft- move_up
MOD+Shift+bracketright- move_down
MOD+Shift+slash- name_workspace
MOD+slash- search_workspace
MOD+f- search_win
MOD+d- debug_toggle (debug mode only)
MOD+Shift+d- dumpwins (debug mode only)
The appliance binds MOD+F1 to
MOD+F12 to panel_1 to
panel_12, its tabs, and leaves
MOD+Shift+F1 to
MOD+Shift+F12 unbound. Workspaces 11 to 22 are on
MOD+Control there. Its installer binds
poweroff to the power key,
XF86PowerOff.
term, menu,
lock, initscr, and the
screenshots are programs. See
PROGRAMS.
Actions
focus- Focus the window or region under the pointer.
move- Move the window with the pointer while held.
resize- Resize the window with the pointer while held.
resize_centered- Resize the window, and keep it centered.
quit- Quit.
restart- Restart.
restart_of_day- Restart, and load the config in full.
reload- Read the config again.
cycle_layout- Switch to the next layout.
center_layout- Center the master area, or stop centering it.
flip_layout- Swap the master area and the stack area.
prior_layout- Switch back to the layout used before.
layout_vertical- Switch to the vertical layout.
layout_horizontal- Switch to the horizontal layout.
layout_max- Switch to the max layout: one window fills it.
layout_floating- Switch to the floating layout.
stack_reset- Reset the layout.
stack_balance- Balance the master area and the stack area.
master_shrink- Shrink the master area.
master_grow- Grow the master area.
master_add- Add a window to the master area.
master_del- Take a window out of the master area.
stack_inc- Add a column or a row to the stack area.
stack_dec- Remove a column or a row from the stack area.
swap_main- Move the window into the master area.
focus_next- Focus the next window on the workspace.
focus_prev- Focus the previous window on the workspace.
focus_main- Focus the main window.
focus_prior- Focus the window that had the focus before.
focus_free- Focus a window in free mode, if there is one.
focus_urgent- Focus the next urgent window, on any workspace.
swap_next- Swap the window with the next one.
swap_prev- Swap the window with the previous one.
bar_toggle- Show or hide the bar on every workspace.
bar_toggle_ws- Show or hide the bar on this workspace.
wind_del- Close the window.
wind_kill- Kill the program that owns the window.
ws_n- Switch to workspace n.
mvws_n- Move the window to workspace n.
rg_n- Focus region n.
mvrg_n- Move the window to region n.
mvrg_next- Move the window to the next region's workspace.
mvrg_prev- Move the window to the previous region's workspace.
ws_empty- Switch to the first empty workspace.
ws_empty_move- Take the window to the first empty workspace.
ws_next- Switch to the next workspace that has windows.
ws_prev- Switch to the previous workspace that has windows.
ws_next_all- Switch to the next workspace.
ws_prev_all- Switch to the previous workspace.
ws_next_move- Take the window to the next workspace.
ws_prev_move- Take the window to the previous workspace.
ws_prior- Switch to the workspace you were on before.
rg_next- Focus the next region.
rg_prev- Focus the previous region.
rg_move_next- Move this workspace to the next region.
rg_move_prev- Move this workspace to the previous region.
screen_next- Focus the next region, as rg_next does.
screen_prev- Focus the previous region, as rg_prev does.
version- Show or hide the version in the bar.
float_toggle- Toggle the window between tiled and floating.
below_toggle- Keep the window below the others, or stop.
free_toggle- Toggle the window between workspace and free mode.
iconify- Hide the window.
uniconify- Show a hidden window, picked from a list.
uniconify_quick- Show the window that was hidden last.
maximize_toggle- Make the window fill the work area, or stop.
fullscreen_toggle- Make the window fill the region, or stop.
raise- Raise the window.
raise_toggle- Let tiled windows cover floating ones, or stop.
- Send a middle mouse button click.
width_shrink- Make a floating window narrower.
width_grow- Make a floating window wider.
height_shrink- Make a floating window shorter.
height_grow- Make a floating window taller.
move_left- Move a floating window left a step.
move_right- Move a floating window right a step.
move_up- Move a floating window up a step.
move_down- Move a floating window down a step.
name_workspace- Name this workspace.
search_workspace- Search for a workspace.
search_win- Search the windows on this workspace.
spawn_custom- Start the program that the binding names.
panel_n- Open tab n.
poweroff- Power the machine off.
debug_toggle- Show or hide the debug overlay.
dumpwins- Write the window state to the debug log.
A number n is at least 1.
panel_n and
poweroff work on the appliance only.
scrotwmos(7) describes the tabs.
Custom bindings
bind[action] =
comboaction is one of the actions above, or empty
to unbind. combo is zero or more modifiers and special
arguments (Mod1, Shift, Control, MOD, etc.) and one key (b, Space, etc.) or
button (Button1 .. Button255), joined by
‘+’. An action may have several
bindings.
Special arguments:
MOD example:
bind[restart] = Mod4+q # bind Windows-key + q to restart bind[] = Mod1+q # unbind Alt + q bind[move] = MOD+Button3 # bind move to MOD+Button3 bind[] = MOD+Button1 # Unbind default move binding.
ANYMOD example:
bind[focus] = ANYMOD+Button3 bind[move] = MOD+Button3
In the above example, MOD+Button3 starts
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.
Bind a non-Latin character such as å or π by its xkb
name, not the character itself. xev(1)
prints the name of a key pressed in its window: for å it is
aring:
bind[term] = MOD+aring
To clear the default key bindings and set your own, see
keyboard_mapping.
QUIRKS
A quirk tells the window manager to treat a window specially, such as a dialog or a fullscreen program.
Default quirks
- .*:.*:.*:splash,dialog
- FLOAT
- .*:.*:.*:toolbar,utility
- FLOAT + ANYWHERE
- .*:.*:.*:notification
- FLOAT + ANYWHERE + MINIMALBORDER + NOFOCUSONMAP
- Firefox-bin:firefox-bin
- TRANSSZ
- Firefox:Dialog
- FLOAT
- Gimp:gimp
- FLOAT + ANYWHERE
- MPlayer:xv
- FLOAT + FULLSCREEN + FOCUSPREV
- OpenOffice.org 3.2:VCLSalFrame
- FLOAT
- pcb:pcb
- FLOAT
- SDL_App:SDL_App
- FLOAT + FULLSCREEN
- 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
A window also takes quirks from its _NET_WM_WINDOW_TYPE:
- _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
- _NET_WM_WINDOW_TYPE_NOTIFICATION
- FLOAT + ANYWHERE + MINIMALBORDER + NOFOCUSONMAP
Other types take none. Quirks in the configuration file override these.
Quirk list
- ANYWHERE
- Allow the window to position itself, uncentered.
- BELOW
- Put the window into below state when it is managed.
- FLOAT
- Do not tile the window; let it float.
- 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_modeis set to follow. - FOCUSPREV
- On exit, force focus on the previously focused application, not the previous application in the stack.
- FULLSCREEN
- Remove the border to let the window use the full region size.
- ICONIFY
- Hide/minimize the window when it is managed.
- IGNOREPID
- Accepted for a spectrwm configuration. A new window's workspace is never taken from a PID here.
- IGNORESPAWNWS
- Ignore the spawn workspace when determining the initial workspace for a new window.
- IGNOREURGENT
- Ignore the urgency hint.
- MAXIMIZE
- Put the window into maximized state when it is managed.
- MINIMALBORDER
- Remove the border when the window is unfocused and floating.
- NOFOCUSCYCLE
- Remove the window from the normal focus cycle (focus_prev or focus_next). The window can still be focused using search_win.
- NOFOCUSONMAP
- Do not change focus to the window when it first appears on the screen. Has
no effect when
focus_modeis set to follow. - NOFOCUSPOINTER
- Do not focus the window via pointer interaction. The window can still be focused using key bindings.
- NONE
- No quirk. An entry of NONE alone removes the entry for the same window, such as a default one.
- OBEYAPPFOCUSREQ
- When an application requests focus on the window via a _NET_ACTIVE_WINDOW client message (source indication of 1), comply with the request. A source indication of 0 (unspecified) or 2 (pager) is always obeyed.
- TRANSSZ
- Adjust the size of transient windows that are too small with
dialog_ratio(see KEYWORDS). - WS[n]
- Force a new window to appear on workspace n. Specify -1 to put the window into free mode so that it is mapped independently of workspaces and regions.
- XTERM_FONTADJ
- Adjust xterm(1) fonts when the window
is resized. It needs the xterm_fontadj spawn flag on
the program or autorun entry. See
spawn_flags. - NOTILE
- Never tile the window. The window always floats, whether or not _NET_WM_STATE_ABOVE is set.
Custom quirks
quirk[class[:instance[:name[:type]]]]
{=|+=|-=} quirk [+ quirk
...]class and instance are
patterns for the two fields of the WM_CLASS property,
name for the window name (WM_NAME/_NET_WM_NAME). The
last three are optional. A pattern is a POSIX extended regular expression
(regex(7)) that matches the whole field.
Escape ‘:’,
‘[’, and
‘]’ with
‘\’. type is a
comma-separated list of zero or more window types (_NET_WM_WINDOW_TYPE):
desktop, dock,
toolbar, menu,
utility, splash,
dialog, dropdown_menu,
popup_menu, tooltip,
notification, combo,
dnd, and normal. An empty
list matches any type.
Quirk entries apply in file order when a window is managed.
‘=’ replaces the window's quirks.
‘+=’ and
‘-=’ add and remove them.
For example:
# Float all windows having a class of 'MPlayer'. quirk[MPlayer] = FLOAT + FULLSCREEN + FOCUSPREV quirk[.*] = FLOAT # Float all windows by default. quirk[.*:.*:.*] = FLOAT # Same as above. quirk[firefox:Navigator] = FLOAT # Float all Firefox browser windows. # Float windows with WM_CLASS not set and a window name of 'Console'. quirk[::Console] = FLOAT # Float windows with a 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[\[0-9\].*:.*:\[\[\:alnum\:\]\]*] = FLOAT quirk[pcb:pcb] = NONE # Remove the default quirk entry. # Force windows with a WM_CLASS name of 'ws10' to workspace 10 without # removing existing quirks. quirk[.*:ws10] += WS[10] quirk[.*:.*:.*:splash,dialog] = FLOAT + ANYWHERE # Override default quirk entry.
xprop(1) prints a window's class, instance, and name when you click it. It shows WM_CLASS as instance, then class:
$ xprop | grep -E "^(WM_CLASS|_NET_WM_NAME|WM_NAME)" WM_CLASS(STRING) = "Navigator", "Firefox" WM_NAME(STRING) = "OpenBSD" _NET_WM_NAME(UTF8_STRING) = "OpenBSD"
The quirk entry for that window is:
quirk[Firefox:Navigator] = FLOAT
Under swm-wl(1), a native
Wayland window's class and instance are both its app id, and it has no type,
so a quirk with a type never matches it. An Xwayland window keeps its class,
instance, and type. A native window with a fixed size floats on its own. The
WS quirk and XTERM_FONTADJ
work under swm-x11(1) only.
BACKENDS
swm-x11(1) reads the whole
file but ignores the session keywords,
workspace_session and
session_default included, and says so once. It
ignores the appliance keywords and the wayland_*
keywords. It still refuses the old keywords dhcp and
session_clipboard, and a
dom0_net that is not none or
dhcp.
swm-wl(1) ignores
bar_font_pua,
click_to_raise,
fullscreen_hide_other,
maximize_hide_other,
snap_range, term_width,
warp_focus, warp_pointer,
and workspace_autorotate. It ignores a region's
rotation and says so. In bar_format, it ignores
+@fn=.
swm-wl(1) knows these color names, in any case, with the values X gives them: black, white, red, green, blue, cyan, magenta, yellow, gray, darkgray, lightgray, darkred, darkgreen, darkblue, darkcyan, darkmagenta, orange, darkorange, teal, steelblue, slategray, navy, maroon, olive, purple, brown, coral, gold, tomato, and wheat, with grey for gray. It has one screen, so a color key's selector is 1 or none.
Under swm-wl(1),
restart and restart_of_day
reload the configuration in place, and quit ends
every client with the display.
FILES
- ~/.scrotwmos.conf
- user settings
- /etc/scrotwmos.conf
- global settings, read only when there is no ~/.scrotwmos.conf
- ~/.scrotwmos-wayland.conf
- user settings that swm-wl(1) reads on top
- /etc/scrotwmos/dom0.conf
- the appliance's settings, sealed by the installer
- /etc/scrotwmos/dom0.fstab
- the appliance's disks
- /etc/scrotwmos/swm-wl.conf
- a byol install's settings, which its run script names with
-f - /etc/scrotwmos/dark
- on a byol install, there when the install chose a dark desktop; the run script then sets the programs' dark settings at each start
EXAMPLES
A workspace for banking in a container and one for the web in a VM:
modkey = Mod4 session_default = host session_isolation[bank] = container session_uid[bank] = 500001 session_daemon[bank] = /usr/local/bin/scrotwmd session_rootfs[bank] = /srv/bank session_mount[bank] = /srv/bank-home /home/bank rw session_env[bank] = HOME=/home/bank session_net[bank] = guest session_color[bank] = rgb:2b/68/98 workspace_session[4] = bank session_isolation[www] = vm session_uid[www] = 500002 session_daemon[www] = /usr/local/bin/swm-vmm session_disk[www] = ~/www.img session_net[www] = guest session_color[www] = rgb:be/6d/2c workspace_session[5] = www workspace_session[6] = www
SEE ALSO
swm-wl(1), swm-x11(1), scrotwmos(7), scrotwmd(8), swm-vmm(8), swmtool(8)
HISTORY
The tiling part of scrotwmos.conf is the
configuration of spectrwm, which was inspired by xmonad and dwm.
AUTHORS
The tiling library of scrotwmos derives from spectrwm, written by:
- Marco Peereboom <marco@peereboom.us>
- Ryan Thomas McBride <mcbride@countersiege.com>
- Darrin Chandler <dwchandler@stilyagin.com>
- Pierre-Yves Ritschard <pyr@spootnik.org>
- Tuukka Kataja <stuge@xor.fi>
- Jason L. Wright <jason@thought.net>
- Reginald Kennedy <rk@rejii.com>
- Lawrence Teo <lteo@lteo.net>
- Tiago Cunha <tcunha@gmx.com>
- David Hill <dhill@mindcry.org>
- Yuri D'Elia <yuri.delia@eurac.edu>
| October 9, 2026 | Void Linux |