Suckless dwm, dmenu and st
I've been a fan of minimalist software for quite a while now and I'm alwasy looking for more simple and reliable technology. Suckless is a community of programmers who have made some great pieces of minimalist software that I recently started using. In this post I want to showcase my setup and some thoughts.
dwm - a dynamic window manager
dwm, like all of suckless software, has no configuration files or options. Everything is hard-coded into the source code. To customize dwm, you need to modify the source code and compile it yourself. There are no binary releases at all.
This process of modifying the source code might be intimidating but due to the community around suckless software there are countless of patches available for different needs. Here is a list of patches I'm currently using for dwm:
- actualfullscreen, allows toggling a window as fullscreen.
- alwayscenter, all floating windows are centered on spawn.
- attachbottom, new windows are attached to the bottom of the stack instead of top.
- autostart, run a custom bash script on dwm startup.
- colorbar, ability to change the colors of the bar for every element.
- hide vacant tags, hides all the tags not in use from the bar.
- pertag, allows each tag to have a different layout.
- stacker, move windows up/down the stack.
- staticstatus, statusbar only on one monitor.
- statuscmd, ability to have clickable statusbar items.
- vanitygaps, adds gaps between windows.
- xrdb, reads colors from
~/.Xresourcesat run time.
As you can see, I have quite a list of extra patches applied to dwm, increasing the lines of code from around 2000 to 2700. I see many of these patches as almost necessary, such as the fullscreen patch or the stacker patch.
dwmblocks - status bar for dwm
dwmblocks is a modular status bar for dwm. It is not made by suckless but it follows the same spirit of suckless software by being source based and only 200 lines of code.
"Blocks" are shell scripts that output some information. You can then define how often or what signal is needed to run the script. For example I have this script for my clock that runs every 30 seconds outputting the date and time. Clicking the clock opens a terminal with
#!/bin/sh case $BUTTON in 1) setsid -f $TERMINAL -e calcurse ;; esac date "+ %Y %b %d (%a), %-I:%M%p"
dmenu - dynamic menu
dmenu is a dynamic menu which allows you to create different prompts. By default dmenu has a basic run prompt to launch applications.
I have also made a few scripts utilizing dmenu such as dman, which allows you to mount/unmount devices, and killprocess, which allows you to easily kill unresponsive programs.
Another useful dmenu script I found is passmenu. Passmenu allows you to get your passwords from Pass (The Standard UNIX Password Manager). I have made a seperate blog post about Pass here.
I also have applied a couple of dmenu patches:
- xresources-alt, reads colors from
- password, allows dmenu to hide keyboard input as dots with the option
st - simple terminal
You'd think finding a good terminal emulator that is fast and simple would be easy. I have tried xterm, urxvt, alacritty, kitty and so on, but they either lack basic features or are too slow and complicated for no reason. However st is a simple terminal emulator for X that works great with a few extra patches.
The patches I have applied are:
- bold is not bright, renders bold font with same color as regular font.
- scrollback, allows scrolling back and forth on the terminal.
- xresources, reads colors and other options from
At first I was hesitant to use suckless software because it is source based which made it seem intimidating. But the initial learning curve was worth it. Now I have my own custom builds of these programs and everything works great. I will keep this post updated if I face any problems or I make further changes. So far I'm more than pleased.