bspwm: in the name of modularity

Last modification on

It's been a while since I last posted in this blog. I promised myself that I would be regularly updating this as I now have a proper script that does all the compiling and uploading for me. But alas, the past few days have been uneventful save from a few blips in the monotonous, daily stuff. Regardless, I am writing something now and I am glad to be able to have something to write about.

Ever since the pandemic started to ramp up in my country and daily life comprised of being stuck at home, I have allowed myself to experiment with workflow in my linux machines. As I have mentioned in a prior post, I was able to create such a modular environment. But before that I do think that I need to be able to describe my prior workflow.

Since I fully jumped ship to linux a few years ago, I have been an i3 user. This meant that I have customized and moulded i3 to my specific needs relying on its own keybinding system and prompts which allowed me to perform quite complex tasks through the i3 prompt menu. It was all well for those few years and I did not really bother to change things as everything works nicely, with my configuration deeply rooted to the intricacies of i3.

However, I started to bump against the other, unpleasant idiosyncacies of i3. The most annoying of which was the abhorrent manual tiling layout of it, which makes working with three or more windows a nightmare. It even came to the point that I have started to download some python scripts that automatically deal with the "poly-window" situation and allow me to be able to work, with more than three windows without fanageling with the manual tiling. This, along with other minor annoyances, became the pivotal point where I started to look at other window managers for a cure.

The first that got my attention was dwm, I really admired its ability to just automatically stack windows on top of each other and to be able to quickly switch between other windows in the stack with a simple keybinding. As such, I have started reading up on this window manager and it was at this point where I quickly realized how deeply entrenched i3 is to my current workflow. Most of the all the basic system functions that I use such as: shutting down the computer and changing displays for a multi-monitor setup all relied on i3. It was gut-wrenching, I felt that I was locked in its ecosystem and breaking out would require copious amount of effort.

Being that stubbornhead that I am, I ported every single script and function that I was using in i3 as well as Ranger, my file manager, into its own independent scripts and being a, at best, novice hobbyist programmer it became a massive learning hill that I was suddenly obliged to climb. Perhaps, some might call it learning opportunity. With all of my basic scripts done, I was ready to move over to dwm. I cloned the repository, made some minor modifications, compiled a binary and voila! I am now in a different window manager and using it was a blast. I was able to easily manage windows and learn more about shell scripting at the same time.

But you might ask: "Isn't this blog post supposed to be about bspwm? Why are you sperging about dwm, shouldn't you be talking about bspwm?" and I'd say: Yeah, this is about bspwm. Because it was at this point that I shifted towards bspwm.

Bspwm is quite an oddball for me, I have heard of it before and have seen some screenshots of it in the unixporn subreddit. But I have never really understood it and as such, I mostly left it alone. That was, until a few days ago. I was teaching my little sibling on the basics of shell and linux when she started to show interest in building her own "operating system" from scratch. Naturally, I just let her do her thing while giving her the tools to do what she wanted to do. And as I wanted to see her tackle problems on her own, I wanted her to try bspwm and see whether she'd be able to construct a proper desktop environment with it (as well as to see whether bspwm might be something that's worth looking at for me).

What I saw surprised me, a robust, highly minimal window manager that doesn't require to be compiled whenever I wanted to change something and can be configured through normal shell scripting. It was utterly mindblowing and I found myself going back at my sibling's room just to see what she's done and snatching some time off her to experiment on my own. I even saw a function within the bspc program that would allow me to configure the behavior of 'nodes' in a highly granular way, not that I'd want to be granular about it, and it sweetened the pot even further for me to move over to it. It was as if I was a bee that is being drawn towards an irresistable flower and as such, I made haste to shift towards this window manager.

Unlike my shift towards dwm from i3, my shift from dwm to bspwm was painless. This was mainly due to the fact that I have placed every single action that I wanted to do with the computer in its own respective script. Changing window managers was much more like changing dresses, not changing guts.

With bspwm now installed in my machine, I guess I can now experiment with how crazy I can get this window manager to perform.

Creative Commons License