To configure spectrwm, you edit the ~/.spectrwm.conf file. It's pretty self-explanatory and editing it while you also have the man page open makes configuration really simple. The configuration file lists all the default settings, if you want to make a change, uncomment the line and make the change.
A couple changes I typically make:
# workspace_limit = 22
workspace_limit = 9 <-- I can think of no situation where I need 22 workspaces
# focus_mode = default
focus_mode = manual <-- the default is focus follows mouse which is sort of annoying in a tiler, manual is the familiar click-to-focus
and similar through the rest of the file.
Note that for colors, spectrwm works with rgb notation or the name so its (for black): rgb:00/00/00, or black - not #000000 or "#000000".
Spectrwm has the typical default layouts, but I make a couple changes:
# layout = ws:4:0:0:0:vertical
# layout = ws:0:0:0:0:horizontal
layout = ws:0:0:0:0:horizontal
layout = ws:0:1:0:0:vertical
I prefer the horizontal (bottom stack) as default so I use it on workspace 1 ( ws ). That first nuber (4) is a size increment increase (-4 would decrease) for the master window, I change it to 0 so that the master window is the same size as the stack, occupying 50% of the screen. For workspace 2, I add a master window - the 1 - so that the vertical layout is now a grid:
Definitely worth reading how to code those layouts in the spectrwm man page.
Spectrwm has it's own status bar, if you can script you can output to the bar by changing the line:
# bar_action = baraction.sh <-- note that baraction.sh is included with the git download, but gives me a syntax error
bar_action = some_script.sh <- may need to use full path to script.
or if you prefer to use conky:
bar_action = conky
conky needs to be configured so that it does not output to X:
<all your conky stuff>
If you prefer a statusbar like dzen2, you can use it as well. Either run it so that it covers the spectrwm statusbar, or create a region for it (or any panel). Creating a region in spectrwm is done by editing:
# region = screen:1280x1024+0+0
# region = screen:1280x1024+1280+0
It's somewhat counter intuitive in that the region is the amount of screen real estate used by the open windows, not the amount you want used by the panel. My laptop resolution is 1366x768 so a region:
region = screen:1366x740+0+0
makes a working area of 1366x740 and places the upper left corner of the region at +0+0 (upper left corner of screen). Leaves a 28 pixel gap at the bottom of the screen that I ca fill with my own dzen taksbar:
tint2 and xfce4-panel do not work well with spectrwm.
If you want to change the default keybindings of spectrwm, make edits to the ~/.spectrwm_us.conf file, if you want to add your own, add them to the ~/.spectrwm.conf file. Just follow the example provided for firefox.
Some apps you don't want tiled - like xcalc - for that you need to define a quirk for that app using the class. Use xprop to get the class name for the app, and then define the quirk - note that the quirk reverses the order of the class name provided by xprop.
Without a quirk -
quirk[XCalc:xcalc] = FLOAT + ANYWHERE
to get -
quirks are also handy if you want to have a system tray - stalonetray works pretty well with spectrwm. This quirk:
quirk[stalonetray:stalonetray] = FLOAT + ANYWHERE + NOFOCUSCYCLE + NOFOCUSONMAP + OBEYAPPFOCUSREQ
causes stalonetray to float, and removes it from the cycling order so that Alt-Tabbing does not bring it into focus:
quirks can be set up for any app - like xfce4-appliction finder if you don't want to use dmenu. Another section of the man page you'll want to read.
That pretty much covers the hilights. The configuration file is well annotated and the man page is well written. Also read through the default keybinding file to know what the basics are:
MOD+Shift+Return - starts an xterm <- by default the Alt key is the MOD, that can be changed in the .spectrwm.conf file
MOD+q - restarts the window manager
MOD+Shift+q - exits the window manager
MOD+p - runs dmenu
and plenty more for changing workspaces, resizing the master area, toggle floating etc ...
Spectrwm is an excellent window manager, and an excellent introduction to tiling.