Skip to content

Window Manager Configuration

Nick McDonald edited this page Jul 1, 2021 · 1 revision

window manager configuration

This page will explain how to get splash to work correctly with your window manager of choice.

Different window managers have various degrees of compatibility. depending on how strictly the window manager conforms to the X11 extended window manager hints specification (EWMH). Particularly tiling window managers don't adhere entirely, making it more difficult to produce consistent splash behavior. There are work-arounds using the WM configs.

splash xprops

splash will spawn an X window with a number of additional properties that your WM / compositor / other programs can target to get expected visual behavior:

  SPLASH_SHADOW = [0,1]       set to 0 if --ns is set (1 by default)
  WM_CLASS = SPLASH           for every window spawned with splah
  WM_NAME = SPLASH

Note: You might want shadow on for a splash for e.g. an image overlay.

Compositor config

To enable shadow toggling, add the following rule (or similar) to your compositor config (e.g. ~/.config/compton.conf):

#Enable shadow toggling
shadow-exclude = [
  #...
  "SPLASH_SHADOW@:32c = 0",
  #...
];
#...__

If you don't add this the compositor will always shade splashes, and it can't be deactivated with --ns.

Other compositors (check where to set shadow exclude rule):

Picom

Note: Other compositors might support features such as kawase blur. Use the same flag above to target splash for exception.

wm specifics

bspwm

Add the following rules to your ~/.config/bspwm/bspwmrc:

# Splash Float
bspc rule -a SPLASH:SPLASH state=floating
bspc rule -a SPLASH:SPLASH border=off

This is necessary to make sure bspwm immediately floats splashes. Otherwise you get unintended behavior.

i3 and i3-gaps

Add this line to your i3 config to make splash semi-compatible:

# splash config       
for_window [class="SPLASH"] border none
for_window [class="SPLASH"] floating enable

A number of issues mentioned below will persist.

i3 / i3-gaps compatibility problems

Problem: These window managers do not support the EWMH specification for specifying a preferred order of floating windows (specifically _NET_WM_STATE_ABOVE and _NET_WM_STATE_BELOW). It ignores these hints and forces its own order.

Effect: The --bg and --fg options do not work as intended (splashes will be permanently on the floating window layer). Splashes will never "disappear" behind tiled windows. Splashes will conflict with other floating windows too, and not stay above or below other windows.

Problem: i3 does not seem to properly support the X shape extension.

Effect: Disabling user input / hover focus for the window is non-standard (read: difficult), so the --ni flag will not work. For some reason, i3 decides that a window with no input area has its entire area instead be it's border, so dragging on a splash after setting the --ni flag will instead resize it in a wonky way.

All other options work as intended. If you never use other floating windows and use splash just for overlays (with no click-through), the program works as intended.

Currently this issue is will not fix, because it seems that it will require a substantial rewrite for a WM that does not follow the X spec. Consider forking and proposing a solution!

Read the following discussion for possible fixes:

https://github.com/weigert/splash/issues/7

See also:

https://github.com/i3/i3/issues/3265