积鱼成水 Gathering Fish Into Water BSPWM Picture in Picture Video Player Setup | 积鱼成水 Gathering Fish Into Water

BSPWM Picture in Picture Video Player Setup

Sometimes the limitations of a window manager becomes apparent, lacking many features that a desktop environment would have. One feature that I find useful in other desktop environments is an always on screen video player, so that the content we are watching is always visible.

This video player need to have the following features:

Luckily for us, most modern video players have a “Picture in Picture” mode, where the content being played is moved to a smaller stand alone window. In most desktop environments, this would solve our needs. However, this only allows BSPWM to spawn in a tiled window that looks rather ugly.

We can achieve the features we need by using BSPWM and picom rules.

The simple line

bspc rule -a '*:*:Picture-in-Picture' follow=false state=floating sticky=on

can take care of most of our needs, the window now spawns as a floating window and always follow us to other workspaces. However, if your picom config creates a transparency effect for windows that are not in focus, this could cause the player to lose its color saturation.

We can remedy this with

opacity-rule = [
	"100: name = 'Picture-in-Picture'",
	...
];

Now our player will remain at full opacity even if it is not in focus!