skel/hypr: GSK_RENDERER=cairo + wire up shell layer rules #7

Merged
Breadway merged 1 commit from fix/gsk-renderer-black-surfaces into main 2026-08-31 20:28:03 +08:00
Owner

Fixes the black-shell / no-blur you hit in the VM.

1. GSK_RENDERER=cairo — GTK4 4.14+ default renderer (ngl/vulkan) paints transparent layer-shell surfaces as opaque black on wlroots; guaranteed black under a VM virtio-gpu with no real GL/Vulkan context. cairo (software) always composites transparency right, no visible cost for a flat shell, ~40% less idle memory (no Mesa driver resident). GSK_RENDERER=gl in-session overrides.

2. scripts/ui/rules.lua (new) + pcall(dofile) in hyprland.lua + bread-theme layerrules in the bootstrap. The shell-theme work shipped layer-rule generation (bread-theme writes ~/.config/hypr/layerrules.json from the theme [compositor] table) but BOS never had the read side — so no blur / ignore-alpha / per-namespace motion was applied to breadbar / breadbox / breadclip. rules.lua reads the JSON and emits hl.layer_rule, with the pre-theme hardcoded set as a pcall-guarded fallback (mirrors the live reference config). Layer rules only.

Both are skel changes — no pacstrap impact. luac -p clean. Rebuild the ISO and re-test in the VM: the launcher/popups should show the wallpaper through with blur instead of black.

Fixes the black-shell / no-blur you hit in the VM. **1. `GSK_RENDERER=cairo`** — GTK4 4.14+ default renderer (ngl/vulkan) paints transparent layer-shell surfaces as opaque black on wlroots; guaranteed black under a VM virtio-gpu with no real GL/Vulkan context. cairo (software) always composites transparency right, no visible cost for a flat shell, ~40% less idle memory (no Mesa driver resident). `GSK_RENDERER=gl` in-session overrides. **2. `scripts/ui/rules.lua`** (new) + `pcall(dofile)` in hyprland.lua + `bread-theme layerrules` in the bootstrap. The shell-theme work shipped layer-rule *generation* (bread-theme writes `~/.config/hypr/layerrules.json` from the theme `[compositor]` table) but BOS never had the read side — so no blur / ignore-alpha / per-namespace motion was applied to breadbar / breadbox / breadclip. rules.lua reads the JSON and emits `hl.layer_rule`, with the pre-theme hardcoded set as a pcall-guarded fallback (mirrors the live reference config). Layer rules only. Both are skel changes — no pacstrap impact. `luac -p` clean. Rebuild the ISO and re-test in the VM: the launcher/popups should show the wallpaper through with blur instead of black.
Breadway added 1 commit 2026-08-31 20:27:59 +08:00
Two fixes for the black-shell / no-blur symptoms (seen first in a VM,
but the renderer one bites real hardware too):

1. `GSK_RENDERER=cairo` in the session env. GTK4's default renderer
   (ngl/vulkan on 4.14+) draws transparent layer-shell surfaces as
   opaque black on wlroots — the whole bread shell (breadbox launcher,
   breadclip popup, breadbar, breadhelp, bos-settings) goes black-on-
   black, and it's guaranteed under a VM's virtio-gpu where there's no
   real GL/Vulkan context. cairo (software) always composites
   transparency correctly; the shell is flat colour/text/icons so
   there's no visible cost, and idle memory drops (~40%, no Mesa
   driver resident). Override with GSK_RENDERER=gl in the session for a
   GPU-heavy GTK4 app.

2. `scripts/ui/rules.lua` (new) + a `pcall(dofile ...)` for it in
   hyprland.lua + `bread-theme layerrules` in the bootstrap. The
   shell-theme work added layer-rule *generation* (bread-theme writes
   ~/.config/hypr/layerrules.json from the theme's [compositor] table)
   but BOS never shipped the read side, so no blur / ignore-alpha /
   per-namespace motion was ever applied to breadbar / breadbox /
   breadclip. rules.lua reads the JSON and emits `hl.layer_rule`,
   with the pre-theme hardcoded rule set as a pcall-guarded fallback
   (matches the live reference config). Layer rules only — window /
   workspace / focus rules stay in hyprland.lua.
Breadway merged commit 2b8eb2f1b6 into main 2026-08-31 20:28:03 +08:00
Breadway deleted branch fix/gsk-renderer-black-surfaces 2026-08-31 20:28:03 +08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Breadway/bos#7
No description provided.