Window Managers: How-to share settings, autostart etc.

If you are like me and prefer Window Managers (bspwm, dwm, openbox, hlwm, spectrwm, etc.) to Desktop Environments (gnome, KDE, xfce, budgie, etc.), you may find this little tutorial/ adventure of interest.

By way of providing a brief use-case description, here are the challenges I faced and wanted to address:

  1. I want to run a single PC setup which affords access to multiple window manager desktops from a single login screen (I prefer LightDM).
  2. Each of the window manager desktops should ‘autostart’ a common set of features and functions. Ideally, I want as close to 100% commonality as possible. ( By way of full-disclosure, I have not achieved 100% commonality, but I’m quite close.)
  3. Since I use a pretty standard set of applications, I want my window managers to share a common set of keybindings; but, I really only want to maintain one set of keybindings. To quote yoda, lazy I am.
  4. I do not want to degrade the unique power of any individual window manager but rather wish to highlight their unique and collective capabilities.
  5. Because I want to leverage my learning, I want any functions I know how to perform, and am familiar with, to be as portable across desktops as possible (Yes, that’s by my definition…).
  6. In a perfect world, the setup I create should be distro independent.

Having noted the above criteria here is the software environment in which I build, test & operate:

  • arch (specifically I used ArchLabs. which is a pretty vanilla arch distro).
  • I have performed limited, successful testing on debian (MXLinux).
  • ArchLabs is my implementation platform of choice (because it is light, fast, arch-based, and the ArchLabs Forum is full of geeky, helpful people).

Here’s how I went about meeting my objectives:

  1. I installed a clean version of AL (I removed all my cruff that way).
  2. NOTE: My data is not stored on the same device with my distro… :wink: I connect my distro & data files via symlinks.
    1. I find that keeping my data separate from my distro materials allows me to change up my environments quite rapidly.
    2. The separation, also, allows me to create rapid/ interactive/ automagic backups via Dropbox.
  3. Next, I added the following window managers to my new install:
    1. bspwm (via initial AL install)– Note: my #1 favorite
    2. openbox (via initial AL install)– Note: my #2 favorite
    3. dwm (via manual build in my home dir)– Without dwm, I’ll never be cool… :wink:
    4. spectrwm (installed via pacman as an after thought)
    5. herbstluftwm (installed via pacman because, why not?)
  4. In .xprofile I added all my autostart apps, including my
    1. sxhkd -c base.conf
    2. .xprofile.tar (a copy for your collection)
  5. I created 2 different/ unique sxhkdrc configuration files (confs):
    – base.conf for all my WMs to use; base.conf.tar
    – bspwm,conf for my unique bspwm needs: bspwm.conf.tar
  6. bspwm.conf is added in a normal manner from within bspwmrc. bspwm is the only window manager where I have needed to use a secondary set of keybindings (thus far). Here’s the command line: sxhkd -c ~/.config/sxhkd/bspwm.conf &

dwm-Arch-Labs-1 dwm-Arch-Labs-2 dwm-Arch-Labs-3

I should say I’m not quite done with this adventure, I am still tweaking dwm, hlwm & spectrwm. Just the same, I feel very confident this approach will allow me to achieve my use-case objectives. Now all my wms share the same basic configurations and setups for the weird & unique application environment I want.

Enjoy!

Remember, like with all of my work, I am able to provide the following assurance(s):
  • It is almost certainly going to work until it breaks; although I have to admit it may never work and that would be sad.
  • When/if it does break, you may keep all of the pieces.
  • If you find my materials helpful, both you & I will be happy, at least for a little while.
  • My advice is worth every penny you paid for it!