Skip to main content

Module linux

Module linux 

Source
Expand description

The live wallpaper on Linux, where a surface of our own can sit under everything without hiding the desktop’s icons:

  • Wayland compositors with the wlr layer shell (Sway, Hyprland, river, Wayfire, labwc…): a background-layer surface per output, drawn in shared memory (clairlune_platform::wlr::Surfaces).
  • X11 window managers without a desktop of their own (i3, Openbox, bspwm…): a window per monitor at the bottom of the stack, ignoring the mouse, drawn with PutImage.

Desktops that draw their own desktop and icons (GNOME, KDE Plasma, XFCE, Cinnamon, MATE, LXQt) would be covered by such a surface, so there the still frame stays the wallpaper.

Linux composes one scene for the whole desktop, at the largest output’s size; each output shows the largest centred part of it with its shape. Only the rectangles that changed are copied. Untried: written and compile-checked without a Linux desktop.

Structs§

LinuxDesktop
Live wallpapers on every screen, on Wayland or X11.

Functions§

available
Whether live wallpapers can play in this session, with the reason if not.
centred_view
The largest centred part of a scene-sized frame with an output’s shape, cut at whole pixels: what a screen of that size shows without scaling (X11), and where in the screen it goes when the scene is smaller.
own_desktop
A desktop from XDG_CURRENT_DESKTOP that draws its own desktop, if any.