From 1d54aed0b8b905370fdc60ec7b545ec3c965b24d Mon Sep 17 00:00:00 2001 From: mx Date: Wed, 7 Oct 2026 23:16:33 +0200 Subject: [PATCH] Reserve bar space, draw wallpaper natively by default, decode WebP - The bar now reserves its margin and height as an exclusive zone, so windows tile below it instead of underneath. The overhang below the bar, where drawers attach, stays unreserved. - The "auto" wallpaper backend falls back to glassMxrph's native background when no external provider (serpantinum, awww) is running, instead of reporting none. The background surface follows the resolved backend. - The package adds Qt's extra image-format plugins (qtimageformats) to QT_PLUGIN_PATH, so WebP wallpapers (including WebP files with a .jpg name) decode. Co-Authored-By: Claude Opus 5.5 --- README.md | 4 ++-- packaging/nix/package.nix | 5 +++-- quickshell/bar/Bar.qml | 5 ++++- quickshell/helpers/desktop.py | 3 ++- quickshell/shell.qml | 3 ++- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2c2c195..3896c9a 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ In another terminal: ``` The runner is independent of the clone location and prevents duplicate instances -of this configuration. The preview uses no exclusive bar reservation, so it is a -preview and may overlap your current bar. Stop it with Ctrl+C in its launch terminal. +of this configuration. The bar reserves its own height, so alongside another bar +both reserve space. Stop it with Ctrl+C in its launch terminal. Do not add it to autostart until you are ready to replace your current shell. ## Reproducible Nix package (optional, including non-NixOS Linux) diff --git a/packaging/nix/package.nix b/packaging/nix/package.nix index d5d1bae..df29daf 100644 --- a/packaging/nix/package.nix +++ b/packaging/nix/package.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, makeWrapper, quickshell, nodejs, source }: +{ lib, stdenvNoCC, makeWrapper, quickshell, qt6, nodejs, source }: stdenvNoCC.mkDerivation { pname = "glassMxrph"; version = "0.2.0"; @@ -11,7 +11,8 @@ stdenvNoCC.mkDerivation { mkdir -p $out/share/glassMxrph $out/bin cp -r quickshell scripts tests docs dependencies.json README.md $out/share/glassMxrph/ makeWrapper $out/share/glassMxrph/scripts/glassmxrph $out/bin/glassmxrph \ - --prefix PATH : ${lib.makeBinPath [ quickshell ]} + --prefix PATH : ${lib.makeBinPath [ quickshell ]} \ + --prefix QT_PLUGIN_PATH : ${qt6.qtimageformats}/${qt6.qtbase.qtPluginPrefix} ''; meta = { description = "Modular glass desktop shell for Quickshell and Hyprland"; diff --git a/quickshell/bar/Bar.qml b/quickshell/bar/Bar.qml index 3ab8f05..dcb87f2 100644 --- a/quickshell/bar/Bar.qml +++ b/quickshell/bar/Bar.qml @@ -20,7 +20,10 @@ PanelWindow { implicitHeight: BarDrawers.bottom + BarDrawers.overhang mask: Region { item: panel } color: Theme.transparent - exclusionMode: ExclusionMode.Ignore + // Reserve the bar itself (margin + height), not the overhang below it, so + // windows tile beneath the bar instead of under it. + exclusionMode: ExclusionMode.Normal + exclusiveZone: BarDrawers.bottom WlrLayershell.namespace: "glassMxrph-bar" Component.onCompleted: TrayService.registerBar(root) Component.onDestruction: TrayService.unregisterBar(root) diff --git a/quickshell/helpers/desktop.py b/quickshell/helpers/desktop.py index e9512e2..2160dbb 100644 --- a/quickshell/helpers/desktop.py +++ b/quickshell/helpers/desktop.py @@ -57,7 +57,8 @@ def provider(req): if shutil.which(candidate): try:return {'backend':candidate,'current':current(candidate,monitor)} except (ValueError,subprocess.TimeoutExpired):pass - return {'backend':'none','current':'','notice':'No supported running wallpaper provider. Choose a custom command or start your existing wallpaper service.'} + # No external provider running: glassMxrph draws the wallpaper itself. + return {'backend':'native','current':req.get('current','')} if backend in ['serpantinum','awww']:return {'backend':backend,'current':current(backend,monitor)} if backend=='native':return {'backend':'native','current':req.get('current','')} if backend=='custom':return {'backend':'custom','current':req.get('current','')} diff --git a/quickshell/shell.qml b/quickshell/shell.qml index 585189f..4b28ec0 100644 --- a/quickshell/shell.qml +++ b/quickshell/shell.qml @@ -27,7 +27,8 @@ ShellRoot { Bar {} } Variants { - model: ConfigService.ready && ConfigService.data.wallpaper.backend === "native" ? Quickshell.screens.filter(s=>!!ConfigService.data.wallpaper.byMonitor[s.name]) : [] + // The resolved backend: "auto" falls back to native without an external provider. + model: ConfigService.ready && WallpaperService.backend === "native" ? Quickshell.screens.filter(s=>!!ConfigService.data.wallpaper.byMonitor[s.name]) : [] WallpaperBackground {} } DesktopWidgets {}