Explaining my BSPWM and Polybar configuration

Why BSPWM?

I used to be a great fan of the XMonad tiling window manager, however, there were a few problems I had faced. First of all, it was very difficult to incoroporate a different bar other than Xmobar. I find xmobar limited to a large extent since its difficult as well getting it to work with a system tray. Secondly, I wanted manual tiling, which Xmonad simply doesn't offer. Now, choosing a window manager had to have two very important features, namely, following the unix philosophy, and following the same multihead behaviour as Xmonad. This limited my options dramatically. Realistically, my only option was BSPWM and herbstluftwm. The reason i didn't choose herbstluftwm, was because it was ONLY a manual tiler. However, after a bit of research, I managed to mimic xmonad's multihead behaviour with bspwm and a bunch of scripts. Neat! BSPWM is a hybrid tiler that can do manual and automatic tiling which fit my use case. It as well follows most closely to the unix philosophy since it does not come with a bar or keyboard shortcut deamon. This makes BSPWM extremely flexible.

Why polybar?

I chose polybar due to its great community support and well written code. I use to use lemonbar with bspwm, however, I could not change modules based on click events, and it is extremely difficult getting a systray built in. Polybar posed some challenges when integrating it with bspwm. Firstly, the multihead behaviour had to be such, that each bar showed independent workspace information based on the monitor it was on. This was done by making a ws_start and ws_format script. Secondly, it was challgneing to get independent polybar bar's launched on each monitor. After some research, I made a script that launches polybar but changes the config script based on which monitor it will be placed on using the 'sed' command. This was done by making use of different fifo files with each monitors fifo renamed ot that monitor name. This means that I now have a monitor with a unique polybar, displaying the same module information, but different workspace information.

Benefits of my scripts?

My scripts were written such that it will adapt to how ever many monitors are connected to the system. This is very useful since I do not always have access to three monitors, and when I plug two or one monitor in my computer, it adapts appropriately.

Where can you find my scripts?

You can find my scripts on my github in the dotfiles repo. If you have any questions, feel free to drop me an email