Please see the disclaimer.
Epistemic Status: Confident about the principle, confident that Wayland is the future, not confident in how long that will actually take.
I prefer minimal distraction in my OS. So I run Gentoo with it set up exactly the way I want.
And then get distracted watching compiles. It’s…mesmerizing…😵💫
One of my most notable departures from everyday Linux is that I run a tiling window manager.
I do this for several reasons:
- I can use the keyboard more, which is important for saving my overworked hands.
- I spend less time handling windows. (Yes, I do; with a full desktop environment, I was dragging windows a lot.)
- I spend less CPU and memory.
I know the last item seems…dumb, but I found DE’s like KDE and GNOME constantly spending the equivalent of more than one core at idle.
When fuzzing, which I do a lot of, that’s the equivalent of slowing the fuzzer down by at least 12.5%, at least on my machine. Over a three-week fuzz run (the length of my last one), that’s like losing 2 days 15 hours of fuzzing.
With a TWM, I spend about a third of core, while running
btop, a music
player, and Firefox. Over the course of three weeks, that loses me about 21
Anyway, I run a TWM, and based on my dotfiles repo, I added my first TWM config on 06 Oct 2020, just under three years ago.
That TWM was the Awesome Window Manager.
Yes, that is its name.
I love Awesome; it lives up to its name for me. It was so flexible and hackable that I was able to hack it to work well for me. I even managed to learn a smidge of Lua from it.
It’s the sole reason Lua is on my list of programming languages that I have written code in.
But there is one thing about Awesome that worries me: there is no plan to port it to Wayland.
Why am I worried? Because X11 will die.
Whether I like it or not (and I do not), Wayland is here, and it’s going to be the future.
Of course, that wouldn’t matter if X11 would never die, but unfortunately, X11 will die. It is inevitable.
People get old and retire from programming. The X11 programmers will get old and retire eventually.
If they even still exist!
Not sure I blame them, based on things I’ve heard about the ICCCM.
Yes, just a feeling. This was entirely unscientific.
So I decided that three years in one Window manager was enough, and it was time for a change.
At least, if I could find a TWM that supported X11 and Wayland because I don’t want to switch to Wayland just yet.
Recognition mattered to me because that was a good baseline for the possibility that the TWM would exist and be well-supported.
Now, there are two kinds of TWM’s: manual tilers and dynamic tilers. Sway is the former, and Qtile is the latter. I prefer dynamic, so Qtile was ahead at the start.
Some TWM’s are configured with a an actual programming language, allowing extensibility and hackability. Some use a homegrown config language that does not allow hacking as well.
Qtile is written and configured in Python, one of the most hackable programming languages. Sway, while written in C (which would be more efficient), is configured with a custom config language (the i3 config language) that is not as hackable.
But before I made my decision, I went back to the YouTube channel that convinced me to try a TWM in the first place: DistroTube. I wanted to see what his opinion of Qtile vs Sway was.
I actually checked his opinion of Qtile vs i3 since Sway is just an i3 clone for Wayland.
This is good, in more ways than one!
DistroTube is known for pushing TWM’s, and he pushes a lot of traffic to them. If he has a favorite, chances are that people will remain interested in it, making its long-term prospects even better.
So Qtile is a good and obvious choice.
And even better: when I got on the IRC channel, the devs seemed active, both on X11 fixes and Wayland support.
So I spent two days porting my Awesome config. It took a while, and I ran into some bugs (in my config, not in Qtile), but I got it done. My Qtile config runs well, and it does basically exactly what my Awesome config did.
What were the bugs, Gavin?
Qtile and Awesome are slightly different in how they handle switching between what Awesome calls “workspaces” and Qtile calls “groups.”
Awesome allows you to directly pin workspaces to certain monitors, which I need because I have two monitors, one a quarter of the size of the other.
When you try to switch to a group in Qtile, it moves that group to the current monitor, even if I wanted that group pinned to the other monitor.
But Qtile is so hackable that there is a way to make it behave as though groups are pinned to each monitor.
The kicker is that doing so requires executing several things in order. Forget one, and you get weird behavior.
Those were the bugs I ran into: I forgot something important to maintain that illusion.
In fact, Qtile is so hackable that I was able to write keybindings based on mouse position.
This experience taught me an important lesson: if you don’t prepare your software for the future, it won’t have a future.
And as a bonus: hackability is a great feature if done right.