scrotwm(1) window manager for X11

SYNOPSIS

scrotwm

DESCRIPTION

scrotwm 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 scrotwm starts up, it reads settings from its configuration file, scrotwm.conf See the Sx CONFIGURATION FILES section below.

The following notation is used throughout this page:

M
Meta
S
Shift
Aq Name
Named key
M1
Mouse button 1
M3
Mouse button 3

scrotwm is very simple in its use. Most of the actions are initiated via key or mouse bindings. See the Sx BINDINGS section below for defaults and customizations.

CONFIGURATION FILES

scrotwm first tries to open the user specific file, ~/.scrotwm.conf If that file is unavailable, it then tries to open the global configuration file /etc/scrotwm.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.

The file supports the following keywords:

color_focus
Border color of the currently focussed window.
color_unfocus
Border color of unfocussed windows.
bar_enabled
Enable or disable status bar.
bar_border Bq x
Color of the status bar border in screen x
bar_color Bq x
Color of the status bar window in screen x
bar_font_color Bq x
Color of the font in status bar in screen x
bar_font
Status bar font.
bar_action
External script that populates additional information in the status bar, such as battery life.
bar_delay
Update frequency, in seconds, of external script that populates the status bar.
stack_enabled
Enable or disable displaying the current stacking algorithm in the status bar.
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.
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.
region
Allocates a custom region, removing any autodetected regions which occupy the same space on the screen. Defined in the format screen[<idx>]:WIDTHxHEIGHT+X+Y, e.g. screen[1]:800x1200+0+0.
term_width
Set a preferred minimum width for the terminal If this value is greater than 0, scrotwm 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(1) is currently supported. The xterm(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 Sx PROGRAMS section) to use an alternate copy of the xterm(1) binary without the setgid bit set.
title_class_enabled
Enable or disable displaying the window class in the status bar. Enable by setting to 1
title_name_enabled
Enable or disable displaying the window title in the status bar. Enable by setting to 1
modkey
Change mod key. Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
program Bq p
Define new action to spawn a program p See the Sx PROGRAMS section below.
bind Bq x
Bind key combo to action x See the Sx BINDINGS section below.
quirk Bq c:n
Add "quirk" for windows with class c and name n See the Sx QUIRKS section below.

Colors need to be specified per the XQueryColor(3) specification and fonts need to be specified per the XQueryFont(3) specification.

PROGRAMS

scrotwm allows you to define custom actions to launch programs of your choice and then bind them the same as with built-in actions. See the Sx BINDINGS section below.

The default programs are described below:

term
xterm
screenshot_all
screenshot.sh full
screenshot_wind
screenshot.sh window
lock
xlock
initscr
initscreen.sh
menu
dmenu_run -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_border -sf $bar_color

Custom programs in the configuration file are specified as follows:

program[<name>] = <progpath> [<arg> [... <arg>]]

Aq name is any identifier that does not conflict with a built-in action or keyword, Aq progpath is the desired program, and Aq arg is zero or more arguments to the program.

The following variables represent settable values in scrotwm (see the Sx CONFIGURATION FILES section above), and may be used in the Aq arg fields and will be substituted for values at the time the program is spawned:

$bar_border
$bar_color
$bar_font
$bar_font_color
$color_focus
$color_unfocus

Example:

program[ff] = /usr/local/bin/firefox http://scrotwm.org/
bind[ff] = Mod+f # Now Mod+F launched firefox

To undo the previous:

bind[] = Mod+f
program[ff] =

BINDINGS

scrotwm provides many functions (or actions) accessed via key or mouse bindings.

The current mouse bindings are described below:

M1
Focus window
M-M1
Move window
M-M3
Resize window
M-S-M3
Resize window while maintaining it centered

The default key bindings are described below:

M-S- Aq Return
term
M-p
menu
M-S-q
quit
M-q
restart scrotwm
M- Aq Space
cycle_layout
M-S- Aq Space
reset_layout
M-h
master_shrink
M-l
master_grow
M-,
master_add
M-.
master_del
M-S-,
stack_inc
M-S-.
stack_del
M- Aq Return
swap_main
M-j M- Aq TAB
focus_next
M-k M-S- Aq TAB
focus_prev
M-m
focus_main
M-S-j
swap_next
M-S-k
swap_prev
M-b
bar_toggle
M-x
wind_del
M-S-x
wind_kill
M- Aq n
ws_ n
M-S- Aq n
mvws_ n
M- Aq Right
ws_next
M- Aq Left
ws_prev
M-S- Aq Right
screen_next
M-S- Aq Left
screen_prev
M-s
screenshot_all
M-S-s
screenshot_wind
M-S-v
version
M-t
float_toggle
M-S Aq Delete
lock
M-S-i
initscr

The action names and descriptions are listed below:

term
Spawn a new terminal (see Sx PROGRAMS above)
menu
Menu (see Sx PROGRAMS above)
quit
Quit scrotwm
restart
Restart scrotwm
cycle_layout
Cycle layout
reset_layout
Reset layout
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_del
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
swap_next
Swap with next window in workspace
swap_prev
Swap with previous window in workspace
bar_toggle
Toggle status bar in all workspaces
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 10
mvws_ n
Move current window to workspace n where n is 1 through 10
ws_next
Switch to next workspace with a window in it
ws_prev
Switch to previous workspace with a window in it
screen_next
Move pointer to next region
screen_prev
Move pointer to previous region
screenshot_all
Take screenshot of entire screen (if enabled) (see Sx PROGRAMS above)
screenshot_wind
Take screenshot of selected window (if enabled) (see Sx PROGRAMS above)
version
Toggle version in status bar
float_toggle
Toggle focused window between tiled and floating
lock
Lock screen (see Sx PROGRAMS above)
initscr
Reinitialize physical screens (see Sx PROGRAMS above)

Custom bindings in the configuration file are specified as follows:

bind[<action>] = <keys>

Aq action is one of the actions listed above (or empty) and Aq keys is in the form of zero or more modifier keys (MOD, Mod1, Shift, etc.) and one or more normal keys (b, space, etc.), separated by "+". For example:

bind[reset] = Mod4+q # bind Windows-key + q to reset
bind[] = Mod1+q # unbind Alt + q

Multiple key combinations may be bound to the same action.

QUIRKS

scrotwm 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
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:

FLOAT
This window should not be tiled, but allowed to float freely.
TRANSSZ
Adjusts size on transient windows that are too small using dialog_ratio (see Sx CONFIGURATION FILES ) .
ANYWHERE
Allow window to position itself, uncentered.
XTERM_FONTADJ
Adjust xterm fonts when resizing.
FULLSCREEN
Remove border to allow window to use full screen size.

Custom quirks in the configuration file are specified as follows:

quirk[<class>:<name>] = <quirk> [ + <quirk> ...

Aq class and Aq name specify the window to which the quirk(s) apply, and Aq quirk is one of the quirks from the list above. For example:

quirk[MPlayer:xv] = FLOAT + FULLSCREEN # let mplayer play
quirk[pcb:pcb] = NONE  # remove existing quirk

You can obtain Aq class and Aq name by running xprop(1) and then clicking on the desired window. In the following example the main window of Firefox was clicked:

$ xprop | grep WM_CLASS
WM_CLASS(STRING) = "Navigator", "Firefox"

Note that grepping for WM_CLASS flips class and name. In the example above the quirk entry would be:

quirk[Firefox:Navigator] = FLOAT

FILES

~/.scrotwm.conf
scrotwm user specific settings.
/etc/scrotwm.conf
scrotwm global settings.

HISTORY

scrotwm was inspired by xmonad & dwm.

AUTHORS

An -nosplit

scrotwm was written by An Marco Peereboom Aq [email protected] , An Ryan Thomas McBride Aq [email protected] and An Darrin Chandler Aq [email protected] .

BUGS

Currently the menu, invoked with M-p depends on dmenu.