Skip to content

My spectrwm configuration file (with comments)

# PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE
# http://opensource.conformal.com/cgi-bin/man-cgi?spectrwm
# NOTE: all rgb color values in this file are in hex! see XQueryColor for examples

workspace_limit = 5 # I don't need more than this
focus_mode = manual # I don't want to follow cursor automatically
# focus_close = previous
# focus_close_wrap = 1
# focus_default = last
# spawn_positio = next

# Window Decoration
border_width = 1
color_focus = red
# color_unfocus = rgb:88/88/88
color_unfocus = blue
tile_gap = 1


# Remove window border when bar is disabled and there is only one window in workspace
disable_border = 0

# Bar Settings
bar_enabled = 1
# bar_border_width = 1
# bar_border[1] = rgb:00/80/80
# bar_border_unfocus[1] = rgb:00/40/40
# bar_color[1] = black
# bar_font_color[1] = rgb:a0/a0/a0
bar_font_color[1] = white
# bar_font = -*-terminus-medium-*--*--*--*--*--
bar_font = -*-courier-*-r-*--*-120-*--*--*-
# bar_action = ~/bin/baraction.sh
bar_justify = left
bar_format = %a %b %d %R %Z +I +S +F +V
#bar_format = +N +I +S <+D>+4<%a %b %d %R %Z %Y+8<+A+4<+V
bar_at_bottom = 1
# stack_enabled = 1
#clock_enabled = 1
# clock_format = %a %b %c %d %R %Z %Y
# region_padding = 0
window_name_enabled = 0
# verbose_layout = 1
# urgent_enabled = 1

# Spawn Applications
# spawn_position = last

# Dialog box size ratio when using TRANSSZ quirk; 0.3 < dialog_ratio <= 1.0
# dialog_ratio = 0.6

# Split a non-RandR dual head setup into one region per monitor
# (non-standard driver-based multihead is not seen by spectrwm)
# region = screen[1]:1280x1024+0+0
# region = screen[1]:1280x1024+1280+0

# Launch applications in a workspace of choice
autorun = ws[1]:xterm -e mutt # xterm only starts on ws 1 (bug?)
autorun = ws[4]:keepassx
autorun = ws[5]:firefox


# Customize workspace layout at start
# layout = ws[1]:4:0:0:0:vertical
# layout = ws[2]:0:0:0:0:fullscreen
# layout = ws[3]:0:0:0:0:fullscreen
# layout = ws[4]:4:0:0:0:vertical_flip
# layout = ws[5]:0:0:0:0:fullscreen_flip

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


# Also turn off iconify and uniconify (I don't use them)
#bind[] = Mod+w
#bind[] = Mod+S+w
iconic_enabled = 0

# This restricts toggling bar to one workspace
bind[bar_toggle_ws] = Mod+b

# The standard key bindings for screenshots are easy to hit accidentally so replace these with Mod+F12 etc.
bind[] = Mod+s
bind[] = Mod+Shift+s
bind[screenshot_all] = Mod+F12
bind[screenshot_wind] = Mod+Shift+F12

# Swap between workspaces back and forth (very useful)
# Can use various alternatives
bind[ws_prior] = Mod+Shift+Up
bind[ws_prior] = Mod+Shift+Down
bind[ws_prior] = Mod+Shift+Left
bind[ws_prior] = Mod+Shift+Right

# This allows you to include pre-defined key bindings for your keyboard layout.
# keyboard_mapping = ~/.spectrwm_us.conf

# PROGRAMS

# Validated default programs:
program[lock] = xterm # I dpn't use lock so tell it to do xterm instead
program[term] = xterm -fn -adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1

# program[menu] = dmenu_run -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_border -sf $bar_color

# EXAMPLE: Define 'firefox' action and bind to key.
# program[firefox] = firefox http://spectrwm.org/
# bind[firefox] = MOD+Shift
# The next two lines allow Mod+v to run my editor (vim)
program[editor] = vim # (or gvim)
bind[editor] = MOD+v




# QUIRKS
# Default quirks, remove with: quirk[class:name] = NONE
# quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
# quirk[OpenOffice.org 2.4:VCLSalFrame] = FLOAT
# quirk[OpenOffice.org 3.0:VCLSalFrame] = FLOAT
# quirk[OpenOffice.org 3.1:VCLSalFrame] = FLOAT
# quirk[xine:Xine Window] = FLOAT + ANYWHERE
# quirk[Xitk:Xitk Combo] = FLOAT + ANYWHERE
# quirk[xine:xine Panel] = FLOAT + ANYWHERE
# quirk[Xitk:Xine Window] = FLOAT + ANYWHERE
# quirk[xine:xine Video Fullscreen Window] = FULLSCREEN + FLOAT
# quirk[pcb:pcb] = FLOAT
quirk[Xsane:xsane] = FLOAT + ANYWHERE
quirk[XaoS:xaos] =FLOAT
quirk[Firefox-bin:firefox-bin] = TRANSSZ
quirk[Firefox:Dialog] = FLOAT
quirk[Gimp:gimp] = FLOAT + ANYWHERE
quirk[XTerm:xterm] = XTERM_FONTADJ



Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

Mike on :

Thank you for sharing this! I've begun reading "Totality Beliefs and the Religious Imagination" which naturally led me to your web site. Happy to see you're a fan of Unix/Linux as well! I've dabbled with some tiling window managers but this is the the first time I've tried Spectrwm. So far so good! I do appreciate the simple configuration file and sane defaults. Here's what I have so far: https://scrot.moe/image/6GQPW. I'll continue to tweak it over time but I'm quite pleased already.

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
How many legs do snakes have?
Form options