The Music in Noise

Patches and Suckless - 2019-10-25

A while back I was searching for a new terminal and browser to use on Gentoo that wouldn't take ages to compile and didn't have a million dependencies. Along the way, I was recommended to take a look at Suckless. If you're not familiar with Suckless, it's a collection of software (or a development group, doesn't really matter) that aims to develop based on the traditional UNIX mentality, primarily the slogan "Keep It Simple Stupid" (or KISS). You may be asking, "Well, doesn't GNU already do this?". In certain regards, yes, but in others (especially simplicity), no. Although we definitely have all four freedoms with regards to a program like GNU IceCat or GNOME, in order to modify these programs to suit your needs you'd have to spend days (or maybe even weeks) sifting through source-code until you found the segment that pertains to exactly what you wanted to modify, and then you'd have to figure out how to change it to work how you want it to within their very complex codebase. In the end, most of us just give up and put up with what we've got (this has happened to me on various occasions). But putting up with mediocrity isn't the spirit of free software, the spirit is that it's my software and should work as I want it to. This is why, with Suckless software, their programs aim to be as minimal and tiny as possible, with easy build scripts (just a Makefile, really), and simple code. This is so to such an extent that for many of their programs configuration is done before compiling to avoid parsers (if you've ever programmed a parser, these things can be a lot of code and get complex very quickly), instead you use patches and modifications to a condig.def.h file. One may find this tedious at first, because recompiling a program to change configuration is objectively more tedious than a settings menu, but it's worth noting that you're not always changing your settings. Typically, you setup your environment once, maybe over the course of a week, and then never change it again, or at least not for a few years. So why have a program constantly read a configuration file from your computer that has been the same for the past 3 years? When it's hard coded, there's no need for that.

So, now that we know what Suckless is, let's get back to the story. Suckless has both, a web-browser, Surf, and a terminal, st (meaning simple terminal). So far, st has been extremely useful and I have been using it on a daily basis with no regret. Surf, on the other hand, is a piece of crap. To be fair, this isn't the fault of the guys at Suckless, and they are actually aware of the problem (scroll down to where it says "A sane backend for surf"). Essentially, Surf is an attempt at being a light-weight graphical browser with full support for JavaScript, HTML5, and CSS3. Problem is, in order to have this, they need a web-renderer back-end that will support these, but this task is either impossible or extremely difficult while being light-weight. So for now they're conforming with webkit2 (which takes longer to compile than the Linux kernel or Qt libraries). Therefore, currently what I'm using is w3m mostly, and whenever I'm forced to use some fancy web features (which is less often than I originally thought) I use Firefox from the firefox-bin package Gentoo has.

Of course, even though I was disillusioned with Surf (or rather, the pain of updating its largest dependency), I still found other software Suckless had to be extremely interesting, namely dwm and sent. I won't talk about sent, since I haven't had a chance to use it in any real-case scenario (I don't do many presentations, and normally I dislike slide presentations to begin with), so instead I'll be focusing on dwm. Up until now I have been using i3 as my window manager, and I still think it's a great window manager, not even bloated, but dwm has certain characteristics that caught my eye. Apart from being another Suckless project (which is always something I look forward to), unlike i3, it automatically reorganizes windows such that the master window (normally the one you're working on at the moment) is in a central place and has more space than the others. All this, in less than 1000 lines of code! Another thing I like is the status bar, which is edited via the WM_NAME attribute using xsetroot -name "status stuff". The overall UNIX mentality with this window manager is simply amazing, and its flexibility has been very fun.

Now, because Suckless software is configured and modified primarily through user-made patches, I've had to make a few of my own (especially for dwm). These are specific to my use cases (e.g. I have some that create shortcuts for the media keys to cmus), but they can be modified to suit your own needs, or will show you how to make your own patch. Therefore, I'll be creating a new page for patches soon, which will contain a collection of patches that I use for different programs.

Last updated: