I am a big fan of this nifty Electron application called Pennywise. From the README, it is described as:

Pennywise opens any website or media in a small floating window that remains on top of all other applications. Pennywise windows stays up all the time. No need to keep struggling with alt + tab, use Pennywise for easy multitasking.

Pennywise is great for multi-tasking when you want to open a separate, floating browser window, say to watch a coding tutorial, but at the same time, you don’t want it to take the whole space of your desktop. It can stay on top in a little window, but you can resize it however you like.

Since moving my primary development platform from Windows to Arch Linux, I’ve been adapting some of the applications that I used in Windows. In the case of Electron-based applications, it’s quite easy since most of them are usually built with the cross platform in mind. Pennywise is fortunately available in AUR as pennywise-bin so installation is easy, all I need to do is to run:

1
yay -S pennywise-bin

I switch workspaces a lot in bspwm, but by default, the Pennywise window will stay on the current workspace it’s on even though I switch to another workspace. It’s not ideal, but nothing that can’t be fixed with a little tweak to the bspwmrc config. You’ll first need to find out the WM_CLASS value of Pennywise when it’s running. To do so, run xprop in your terminal, then click on the Pennywise window.

You should get an output similar to this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
_NET_WM_DESKTOP(CARDINAL) = 1
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_WM_USER_TIME(CARDINAL) = 464717459
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 930, 420
WM_NAME(UTF8_STRING) = "Pennywise – it will float"
_NET_WM_NAME(UTF8_STRING) = "Pennywise – it will float"
XdndAware(ATOM) = BITMAP
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 2
_GTK_THEME_VARIANT(UTF8_STRING) = "dark"
WM_WINDOW_ROLE(STRING) = "browser-window"
WM_CLASS(STRING) = "pennywise", "Pennywise"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 2715001
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "fsylum"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING

You’ll need the second string on the WM_CLASS line, in this case, it is Pennywise. Then it’s just a matter of adding another rule in the bspwm config to make it persistent.

In your bspwmrc, add this line

bspc rule -a Pennywise state=floating sticky

I also add state=floating so that it’s run as a floating window by default. Reload your bspwm, and it should be persistent when you’re switching to other workspaces. That’s it!