Trying Out dwm
I’ve been using the Simple Terminal (st) by suckless for two^W three^W four months now (damn, it’s already June) and I’ve been enjoying it thoroughly. By “enjoying it thoroughly” I mean it gets out of my way and hasn’t caused any problems. I haven’t had to recompile it either after I first set it up since I created the configuration and keybindings that I like and I’ve stuck with them since.
dwm has been on my radar for a while from content that I’ve seen on the Internet (mostly from the popular Linux YouTubers: DistroTube, Luke Smith, and Mental Outlaw). I like the minimalism of suckless software and I enjoy the paradigm where one compiles software to suit their needs and desired features, but the window manager that I currently use (bspwm) is really comfortable.
However, I came across this video by Luke Smith (invidious link) which sold me on trying out dwm. Window swallowing (the topic of the video), is something that I instantly knew I wanted when I saw it. According to the patch page, it’s a feature taken from Plan9’s windowing system; yet another thing they got right.
Since I’ve been planning to re-install the OS on my laptop, I figured I’d take the opportunity to destroy my existing environment and set up dwm so I’d have it all ready for the new OS. Setting up dwm is as easy as setting up other suckless tools: clone the git repo, choose which patches I want, apply the patches, configure my settings, and compile. All-in-all a fairly straightforward process. Since I don’t use many patches, I didn’t have to spend a lot of time manually patching; just a few lines here and there.
The default statusbar that ships with dwm is quite spartan. It’s configured by using
xsetroot -name <string> where
<string> is the content of the bar (CPU usage, RAM usage, etc). It’s possible to do all this yourself with a bash script that you call from your
xinitrc or through your crontab, but I chose to use slstatus since it comes with a bunch of modules ready to go and does the whole
xsetroot thing itself. If there are any custom thing I want to add to the bar, I can use slstatus to call a script for me.
One thing I made sure to do for this new environment was to compile all of dmenu, dwm, and st with their corresponding Xresources patches so that I can define colours, fonts, and more in my Xresources file. This allows me to update the colourscheme and whatnot without needing to recompile. I also noticed that vanilla dwm, straight out of the box, is actually completely usable. It comes with sane keybindings and settings and looks great (in my opinion, of course). The only thing I had to get used to was the master and stack layout that dwm uses compared to bspwm’s fibonacci layout. With dwm, there is no moving left and right between windows, just up and down the stack. It makes sense given the way dwm’s layout works and I found it easy to work with once I got used to it.
Anyways, here’s a picture of my desktop:
I’ve implemented things like taking screenshots, changing brightness, new update notifications, and battery charge status notifications through scripts which are called either by using shortcuts in dwm or by cron. I’ve also decided that I’m going to change from using the status bar to using my notification daemon dunst for brightness and audio level indicators with the help of this Arch wiki article.
Now, I know this doesn’t really matter given the size of sotrage devices nowadays, but the size of my dwm setup is also way lower compared to my bspwm setup. bspwm, plus its necessary tools bspc and sxhkd, weigh in at 324,200 bytes or 316.60 KiB whereas dwm is only 77,936 bytes or 76.11 KiB.
If I tally up the entire environment I was using when I first started (bspwm+components, urxvt, nitrogen, rofi, polybar) compared to what I’m using now (dwm, st, feh, dmenu, slstatus), that’s 138,276,704 bytes (131.87 MiB) versus only 463,432 bytes (452.57 KiB); a huge savings which no doubt also increased how much RAM my system has available for doing other things. Also, letting my system idle with nothing but a terminal window open, I let my system load average settle and measured it once every 5 seconds with a while loop. After a 15 minute interval passed, it was reading 0.00/0.00/0.00 consistently.
My final verdict is that dwm is great. It’s starting to feel as comfy as bspwm with the added benefit of the software feeling like it’s custom built and tailored for my needs (which it is). It’s also really fun to use because of how much I love scripting.
You can view the scripts I use as well as other configuration information in my dotfiles repo. My custom builds for each of the suckless tools I use are contained in the
custom branch of each tool’s repository: dwm, st, slstatus, and dmenu. The patches I chose to apply are in the
patches folder in each repository. Please note that the dotfiles repo is going to be retired to
dotfiles-legacy as I switch over to using dwm full time on all of my machines. I am keeping the
dotfiles-legacy repository around so others can view and use my configuration for things like
This is my forty-first post for the #100DaysToOffload challenge. You can learn more about this challenge over at https://100daystooffload.com.