spectrwm- Review & Tutorial

Revision Dates:

11 Feb 2024


This posting is intended to function not only as a tutorial but, also, as a review and commentary on my ‘long-term’ use of spectrwm as my primary window manager (long-term, meaning at least one month of daily use).

Included in this post will be my lessons-learned, dotfiles, etc.

Note:
The materials contained in this article will be updated on a semi-irreglar basis.

To quote from the spectrwm github site:

“spectrwm is a small, dynamic tiling and reparenting window manager for X11 [no Wayland here]. 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 it does not require one to learn a language to do any configuration. [Note: true enough, but in certain areas, mind reading skills seem to be required in order to figure things out and make them work correctly.]

spectrwm is written by hackers for hackers, and it strives to be small, compact, and fast.

spectrwm was largely inspired by xmonad and dwm.

…in classic 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.”

GitHub

Given you are reading this on the eirenicon.org website, I am guessing that you might appreciate my opinion on the above. I generally agree.

spectrwm is a useful, unique, fast tiler. Much like dwm, i3wm (SwayWM) and hlwm, I find it enjoyable. After a lot of hacking around, I have cobbled together a spectrwm ‘setup’ that seems to meet my ‘fancy’. I will provide all my edited spectrwm related dotfiles (my cobbling) in this article. Given I am planning on using my arrangement as my primary desktop, for at least a month, I will continue to capture and share what I learn, to save my ‘little grey cells’ and help others on their journey.

What follows is an image (proof-of-life) screenshot. Briefly, the image highlights two menus (dmenu & j4-dmenu-desktop); xfce4-terminal screen running pfetch; polybar panel with systray; a yad pop-up displaying keybinding short-cuts; Debian sid/trixie use; 10 available/used workspaces; and, an unsplash wallpaper.

FWIW: the color-scheme in use is ‘everforest‘ with Papirus-Dark icons (colored bluegrey).

To begin with, I will share how I built my ‘setup’. As always, everything I have constructed is here for the taking. My dotfiles, scripts, etc. are , also, probably worth what you will pay for them… See my guarantee at the bottom of the page.

Installation

Installing spectrwm is quite straightforward. Getting the version I use, may be a bit more challenging I am not certain that version 3.5 has been migrated through to Debian stable. It had not been there the last time I looked. If you are running on Debian Sid or perhaps even Debian test, you may be able to use the following command to install spectrwm, remember to use either sudo or doas (depending on your setup).

sudo apt-get install spectrwm

Beyond that you will likely need the following items, if you don’t already have them installed. Again. this is a simple listing of a few tiny scripts that you can cut & paste into your terminal:

Helpful if you plan to use Trixie/ Sid:
sudo apt install libavcodec60 libavcodec60 libavformat60 nala mousepad

Other useful apps (you may need others):
sudo apt update && sudo apt install catfish debhelper diodon dnsmasq fakeroot ffmpegthumbnailer file-roller feh fonts-hack fzf gcc geany geany-plugins git glances htop i3lock-fancy j4-dmenu-desktop jgmenu libx11-dev libxft-dev libxinerama-dev lm-sensors lxappearance make mate-power-manager mousepad nala neofetch nitrogen nmon nsxiv pamixer pasystray pnmixer polybar powertop rofi ranger rxvt-unicode sxhkd slick-greeter stacer synaptic thermald thunar tlp udiskie wavemon wmctrl xautolock xcompmgr xdo xdotool xfce4-screenshooter xorg wget yad

What follows are essential items that you will need. You may implement these as I will as I suggest or find a more comfortable way that appeals more to your style/ preferences.

First & foremost, spectrwm requires a config file. I will include the one I use. This files needs to be named .spectrwm.conf It will be stored as a hidden file (when correctly named as .spectrwm.conf) and is best when it is located in your $Home directory.

Here is a copy of the file I use (at this writing)

Because I tend to share much of my x11 configuration among multiple window managers, I tend to store those shared functions via .xessionrc (if I am running on arch, I place the identical content in .xprofile). The extracted file (from below) needs to also be placed in $Home.

A copy of my .xsessionrc (.xprofile) file is available via this link.

The next build requirements are for a panel bar (top bar). I use polybar for mine, but you have the option to use spectrwm’s own panel or conky (conkybar). Rather than pointing to my polybar (config), I will provide links to where you can access further information on the various easy (?) to use options. Should you really want my polybar config, use the contact page to request a copy. :

Overall comments

General observations about living with and using spectrwm include:

  • I have never actually tested speed, but spectrwm seems very spritely (fast). It seems every bit as fast as dwm, hlwm, i3wm, bspwm… If you look below to review my config, you will note that my hardware is not ‘exactly’ a good platform for discriminating marginal ‘lower’ level performance.
  • Memory use is, also, in roughly the same arena as the other tilers I use.
  • The spectrwm workflow is unique. It took me awhile to become acquainted with the standard flow and gain comfort in using spectrwm (see ‘Downside(s)’ below). I did have to bend, fold, and spindle the environment a bit (but then they claim to be for hackers. Well I hacked. I now class myself as a genuine spectrwm ‘fan’.

Downside(s):
(Work arounds/ hacks for Conky, panel, and color issues are included in the dotfiles available in this posting)

  • Conky: I find that I miss being able to use all of conky’s desktop features. Because I am unable to use conky for the Desktop display of my keybindings, I have had to provide new/ different Keybinding memory aid (via yad). Being able to run conkybar is nice, but it is just not the same as running everything conky is capable of…
  • Transient Errors: There seem to be some peculiar transient video and keyboard related errors that appear in spectrwm running Firefox. I ‘sometimes’ lose keyboard access and/or get flickering pop-ups (right-click menus flickering in & out). I can not determine the actual cause of these ‘glitches’ nor determine if the cause is either with spectrwm or Debian sid. Such is life on the bleeding edge of Debian.
  • Native spectrwm panel: Honestly, I find the native panel too troublesome and limited to use. The friendly (not!) scripting for the native panel is in places (like formatting & colors) all but incomprehensible. Having stumbled upon ways to use either polybar or conkybar have made spectrwm much more friendly and usable to me. Such is my opinion.
  • Color specification in the configuration file. Why in the world does the color scheme have to be so unique and uncommon? I finally have it working, but getting the colors tweaked has be an absolutely unnecessary chore (come on guys, use hex colors.) I know this is a personal problem. I’m over it now and you can see the results in the provided .spectrwm.conf dotfile available here.

The future:

I do not have any insight into where spectrwm is headed. It seems that spectrwm’s future in the Wayland world is a mystery. I have hunted for information on future plans, to no avail. Perhaps, you have something to share that you have discovered?!?!


inxi -F (system specs under test)

System:
Host: debian Kernel: 6.6.13-amd64 arch: x86_64 bits: 64
Desktop: spectrwm v: 3.5.1 Distro: Debian GNU/Linux trixie/sid
Machine:
Type: Laptop System: Dell product: Inspiron 16 5620 v: N/A
serial: <superuser required>
Mobo: Dell model: 0R665T v: A00 serial: <superuser required> UEFI: Dell
v: 1.17.0 date: 09/19/2023
Battery:
ID-1: BAT0 charge: 55.8 Wh (100.0%) condition: 55.8/54.0 Wh (103.2%)
CPU:
Info: 10-core (2-mt/8-st) model: 12th Gen Intel Core i5-1235U bits: 64
type: MST AMCP cache: L2: 6.5 MiB
Speed (MHz): avg: 445 min/max: 400/4400:3300 cores: 1: 400 2: 583 3: 557
4: 611 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400 12: 400
Graphics:
Device-1: Intel Alder Lake-UP3 GT2 [Iris Xe Graphics] driver: i915 v: kernel
Device-2: Microdia Integrated_Webcam_FHD driver: uvcvideo type: USB
Display: x11 server: X.Org v: 21.1.11 driver: X: loaded: modesetting
unloaded: fbdev,vesa dri: iris gpu: i915 resolution: 1920x1200~60Hz
API: EGL v: 1.5 drivers: iris,swrast platforms: gbm,x11,surfaceless,device
API: OpenGL v: 4.6 vendor: intel mesa v: 23.3.5-1 renderer: Mesa Intel
Graphics (ADL GT2)
Audio:
Device-1: Intel Alder Lake PCH-P High Definition Audio
driver: sof-audio-pci-intel-tgl
API: ALSA v: k6.6.13-amd64 status: kernel-api
Server-1: PulseAudio v: 16.1 status: active
Network:
Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi
IF: wlp0s20f3 state: up mac: a0:59:50:14:86:06
Bluetooth:
Device-1: Intel AX211 Bluetooth driver: btusb type: USB
Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: not found
rfk-block: hardware: no software: no address: see --recommends
RAID:
Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
Drives:
Local Storage: total: 931.51 GiB used: 647.24 GiB (69.5%)
ID-1: /dev/nvme0n1 vendor: Kingston model: SNVS1000G size: 931.51 GiB
Partition:
ID-1: / size: 915.53 GiB used: 647.21 GiB (70.7%) fs: ext4
dev: /dev/nvme0n1p3
ID-2: /boot/efi size: 299.4 MiB used: 27.6 MiB (9.2%) fs: vfat
dev: /dev/nvme0n1p1
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: 44.0 C mobo: 43.0 C sodimm: SODIMM C
Fan Speeds (rpm): cpu: 2908
Info:
Memory: total: 24 GiB note: est. available: 23.17 GiB used: 4.35 GiB (18.8%)
Processes: 287 Uptime: 1h 41m Shell: Zsh inxi: 3.3.33

Remember, like with all of my work, I am able to provide the following assurance(s):
  • It is almost certainly going to work until it breaks; although I have to admit it may never work and that would be sad.
  • When/if it does break, you may keep all of the pieces.
  • If you find my materials helpful, both you & I will be happy, at least for a little while.
  • My advice is worth every penny you paid for it!

If you have insights on your spectrwm journey(s) to share with our readers, please use the contact page on this site to let me know.