Why I love using bspwm for my Linux window manager | Opensource.com

Why I love using bspwm for my Linux window manager

Install, configure, and start using the bspwm window manager on Fedora Linux.

Tall building with windows
Image credits : 

Photo by Taras Chernus on Unsplash

x

Subscribe now

Get the highlights in your inbox every week.

Some folks like to rearrange furniture. Other folks like to try new shoes or redecorate their bedroom on the regular. Me? I try out Linux desktops.

After drooling over some of the incredible desktop environments I've seen online, I got curious about one window manager in particular: bspwm.

bspwm-desktop.png

bspwm desktop

(Stephen Adams, CC BY-SA 4.0)

I've been a fan of the i3 window manager for quite a while, and I enjoy the way everything is laid out and the ease of getting started. But something about bspwm called to me. There are a few reasons I decided to try it out:

  • It is only a window manager.
  • It is managed by a few easy-to-configure scripts.
  • It supports gaps between windows by default.

The first reason—that it is simply a window manager—is probably the top thing to point out. Like i3, there are no graphical bells and whistles applied by default. You can certainly customize it to your heart's content, but you will be putting in all the work to make it look like you want. That's part of its appeal to me.

Although it is available on many distributions, my examples use Fedora Linux.

Install bspwm

Bspwm is packaged in most common distributions, so you can install it with your system's package manager. This command also installs sxkhd, a daemon for the X Window System "that reacts to input events by executing commands," and dmenu, a generic X Window menu:

dnf install bspwm sxkhd dmenu

Since bspwm is just a window manager, there aren't any built-in shortcuts or keyboard commands. This is where it stands in contrast to something like i3. sxkhd makes it easier to get going. So, go ahead and configure sxkhd before you fire up the window manager for the first time:

systemctl start sxkhd
systemctl enable sxkhd

This enables sxkhd at login, but you also need a configuration with some basic functionality ready to go:

curl https://raw.githubusercontent.com/baskerville/bspwm/master/examples/sxhkdrc --output ~/.config/sxkhd/sxkhdrc

It's worth taking a look at this file before you get much further, as some commands that the scripts call may not exist on your system. A good example is the super + Return shortcut that calls urxvt. Change this to your preferred terminal, especially if you do not have urxvt installed:

#
# wm independent hotkeys
#
   
# terminal emulator
super + Return
        urxvt
   
# program launcher
super + @space
        dmenu_run

If you are using GDM, LightDM, or another display manager, just choose bspwm before logging in.

Configure bspwm

Once you are logged in, you'll see a whole lot of nothing on the screen. That's not a sense of emptiness you feel. It's possibility! You are now ready to start fiddling with all the parts of a desktop environment that you have taken for granted all these years. Building from scratch is not easy, but it's very rewarding once you get the hang of it.

The most difficult thing about any window manager is getting a handle on the shortcuts. You're going to be slow to start, but in a short time, you'll be flying around your system using your keyboard alone and looking like an ultimate hacker to your friends and family.

You can tailor the system as much as you want by editing ~/.config/bspwm/bspwmrc to add apps at launch, set up your desktops and monitors, and set rules for how your windows should behave. There are a few examples set by default to get you going. Keyboard shortcuts are all managed by the sxkhdrc file.

There are plenty more open source projects to install to really get things looking nice—like Feh for desktop backgrounds, Polybar for that all-important status bar, Rofi to really help your app launcher pop, and Compton to give you the shadows and transparency to get things nice and shiny.

Happy hacking!

clouds in windows

Get started with the keystroke-driven i3 tiling window manager for the Linux desktop.
and old computer and a new computer, representing migration to new software or hardware

This article is part of a special series of 24 days of Linux desktops. JWM's meager weight and simplicity makes it a great window manager for slow or old Linux computers.

Topics

About the author

Stephen Adams - Stephen is a software engineer at Red Hat working on the cloud.redhat.com platform. He has a passion for puzzle solving and figuring things out which leads to him trying out new tech and seeking out difficult problems when he can. When not working on some new fiddly thing, he's hanging out with his family, writing, or podcasting.