My Spectrwm Configuration File (with comments)

Actually, the default spectrwm.conf works pretty well, apart perhaps from changing the Mod key. It’s easy to try out changes on the fly; just edit the file with the help of the man page and test it with Mod+q. If you make a mistake spectrwm will tell you by printing an error message in the bar.

Just one caution: some mistakes may prevent spectrwm (and therefore X)  from starting, so be careful about using Mod+Shift+q. If that happens you will have to edit .spectrwm.conf without using X. This doesn’t apply to Mod+q.

Note: to improve readability I mostly don’t show unused (commented out) options. See the man page for these.
____________________________________________________________

# PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE #

# Important
# Mod key, (Windows key is Mod4) (Apple key on OSX is Mod2)
modkey = Mod4

# Workspaces and Layout
workspace_limit = 5 # I don’t need more than this.

# Changes to Defaults
# The next two entries replace the default Mod+Space. Why? By default, this command cycles between the different layouts (vertical, horizontal, full screen). I seldom need to do this whereas I very frequently need to alternate the focus between main and stack. So I set Mod+Space to toggle focus_main and use Mod+c to cycle the layout.
bind[focus_main] = Mod+space
bind[cycle_layout] = Mod+c

# Other (minor) changes to defaults
bind[] = Mod+Shift+Delete # I don’t need to lock the screen and I want to avoid doing so accidentally, so disable the default.

# Window Decoration
border_width = 2
color_focus = red
color_unfocus = blue
tile_gap = 2

# Bar Settings
bar_enabled = 1
bar_border_width = 2
bar_border[1] = yellow
bar_border_unfocus[1] = yellow
bar_font_color[1] = white
bar_font = -*-courier-*-r-*-*-*-160-*-*-*-*-*-*
bar_format = %a %b %d %R +S +F +L +V
bar_at_bottom = 1

# Miscellaneous
iconic_enabled = 1 # occasionally useful

# Programs
program[term] = xterm

# Quirks
quirk[Xsane:xsane] = FLOAT + ANYWHERE
quirk[Gimp:gimp] = FLOAT + ANYWHERE

2 thoughts on “My Spectrwm Configuration File (with comments)”

Leave a Reply

Your email address will not be published. Required fields are marked *