Skip to content
A small dynamic tiling window manager for X11.
C Roff HTML Makefile Shell
Branch: master
Clone or download
andreabolognani and LordReg baraction: Simplify update loop
The current loop is a bit awkward for a number of reasons:

  * iostat exits after a number of iterations, so to keep the script
    going we need to run it in a nested loop;

  * we also run iostat concurrently using the |& syntax, which in
    addition to being non-portable requires us to set up a cleanup
    path so that we don't leave stray processes around when spectrwm
    is restarted;

  * due to the fact that iostat prints its headers again every 20
    records, we have to keep careful track of the number of
    iterations - something which has proven to be error-prone.

Once we do away with the idea of iostat driving the update loop, all
of these issues disappear and the code becomes much simpler.

We still cache battery data for 11 seconds, which is the same amount
as before; tweaking it further, if desired, will be trivial now.

This patch is better viewed with 'git show -w'.
Latest commit 5bc8f01 Dec 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
freebsd Add initial pledge(2) support on OpenBSD (#217) Jan 7, 2019
lib Link libswmhack against libX11 Nov 29, 2019
linux linux: Add baraction script Dec 20, 2019
netbsd Update to latest pledge(2). Jan 8, 2019
osx Add initial pledge(2) support on OpenBSD (#217) Jan 7, 2019
outdated_man_pages retire man pages that are way outdated and add html target for englis… May 2, 2016
.gitattributes Add .gitattributes to exclude some files from release archives. Jun 10, 2016
.gitignore Use version.h on osx and more files in .gitignore. Dec 21, 2012
.travis.yml [travis] Fix build failure. Ubuntu Xenial is missing libxcb-xinput-dev. Apr 11, 2019 Fix changelog. Dec 19, 2019 Fix formatting issue. Dec 9, 2016
Makefile Keep -g greatness again. May 22, 2019 Add reference to wiki Installation guide in Aug 29, 2018 baraction: Simplify update loop Feb 16, 2020 give up on printing tag Apr 14, 2016 kill cvs tags Oct 25, 2011 rename scrotwm to spectrwm Feb 15, 2012 kill cvs tags Oct 25, 2011
spectrwm.1 Add note on clearing default bindings to BINDINGS section of man page. Feb 2, 2020
spectrwm.c Fix width calculation of a Xft glyph Feb 2, 2020
spectrwm.conf Add new configurable status bar workspace list indicator. Sep 7, 2018
spectrwm.html add html man page May 2, 2016
spectrwm_cz.conf Add missing binds to keymapping files. Feb 27, 2015
spectrwm_es.conf Add missing binds to keymapping files. Feb 27, 2015
spectrwm_fr.conf Add missing binds to keymapping files. Feb 27, 2015
spectrwm_fr_ch.conf Add missing binds to keymapping files. Feb 27, 2015
spectrwm_se.conf Add missing binds to keymapping files. Feb 27, 2015
spectrwm_us.conf Add missing binds to keymapping files. Feb 27, 2015
version.h Prepare for release v3.3.0 Dec 17, 2019


spectrwm is a small dynamic tiling and reparenting window manager for X11. It 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 is written by hackers for hackers and it strives to be small, compact and fast.

It was largely inspired by xmonad and dwm. Both are fine products but suffer from things like: crazy-unportable-language-syndrome, silly defaults, asymmetrical window layout, "how hard can it be?" and good old NIH. Nevertheless dwm was a phenomenal resource and many good ideas and code was borrowed from it. On the other hand xmonad has great defaults, key bindings and xinerama support but is crippled by not being written in C.

spectrwm is a beautiful pearl! For it too, was created by grinding irritation. Nothing is a bigger waste of time than moving windows around until they are the right size-ish or having just about any relevant key combination being eaten for some task one never needs. The path of agony is too long to quote and in classical OpenBSD fashion (put up, or hack up) a brand new window manager was whooped up to serve no other purpose than to obey its masters. It is released under the ISC license. Patches can be accepted provided they are ISC licensed as well.

Building and installation

Click here for current installation guide

Feedback and questions

You can and come chat with us on IRC. We use OFTC channel #spectrwm.

Major features

  • Dynamic RandR support (multi-head)
  • Navigation anywhere on all screens with either the keyboard or mouse
  • Customizable status bar
  • Human readable configuration file
  • Restartable without losing state
  • Quick launch menu
  • Many screen layouts possible with a few simple key strokes
  • Windows can be added or removed from master area
  • Windows can be moved to any workspace or within a region
  • Resizable master area
  • Move/resize floating windows
  • Drag-to-float
  • Extended Window Manager Hints (EWMH) Support
  • Configureable tiling
  • Adjustable tile gap allows for a true one pixel border.
  • Customizable colors and border width.
  • User definable regions
  • User definable modkey & key bindings
  • User definable quirk bindings
  • User definable key bindings to launch applications
  • Multi OS support (*BSD, Linux, OSX, Windows/cygwin)
  • Reparenting window manager


Click here for current man page


spectrwm is ISC licensed unless otherwise specified in individual files.


Vertical stack

Horizontal stack

Horizontal stack

Vertical stack with floater and extra window in master area

mplayer, resized and moved

You can’t perform that action at this time.