diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-24 23:15:05 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-24 23:15:05 -0400 |
| commit | 7fd440f24409013c9f71f9ccb2b9f1e6a189160f (patch) | |
| tree | 4928d87c87cdeb211eadbdf00e3303906fbda0f5 | |
| parent | 4d906b08970ef0b536bf0dd1a23a3b75a636f16d (diff) | |
| download | dotemacs-7fd440f24409013c9f71f9ccb2b9f1e6a189160f.tar.gz dotemacs-7fd440f24409013c9f71f9ccb2b9f1e6a189160f.zip | |
fix(dirvish): point the bg wallpaper command at set-wallpaper on Wayland
The Wayland branch of cj/--wallpaper-program-for returned swww, but this system's wallpaper daemon is awww, so dirvish "bg" silently no-opped. Point it at the set-wallpaper script (on PATH via dotfiles), which wraps awww img and persists the choice to waypaper's config. X11 still uses feh. Updated the wallpaper-program test to match.
| -rw-r--r-- | modules/dirvish-config.el | 9 | ||||
| -rw-r--r-- | tests/test-dirvish-config-wallpaper-program.el | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/modules/dirvish-config.el b/modules/dirvish-config.el index f33e8cf74..c4c5f1aae 100644 --- a/modules/dirvish-config.el +++ b/modules/dirvish-config.el @@ -400,18 +400,19 @@ regardless of what file or subdirectory the point is on." "Return the (PROGRAM PRE-FILE-ARG...) list for setting wallpaper under ENV. ENV is a display-server symbol: `x11' picks feh with --bg-fill, `wayland' -picks swww with the img subcommand. Any other value returns nil so the -caller can surface an \"unknown display server\" error. +picks the `set-wallpaper' script (on PATH from dotfiles; it wraps the awww +backend and persists the choice to waypaper's config). Any other value +returns nil so the caller can surface an \"unknown display server\" error. Pure helper used by `cj/set-wallpaper'." (pcase env ('x11 '("feh" "--bg-fill")) - ('wayland '("swww" "img")) + ('wayland '("set-wallpaper")) (_ nil))) (defun cj/set-wallpaper () "Set the image at point as the desktop wallpaper. -Uses feh on X11, swww on Wayland." +Uses feh on X11, the `set-wallpaper' script on Wayland." (interactive) (let* ((raw (dired-file-name-at-point)) (file (and raw (expand-file-name raw))) diff --git a/tests/test-dirvish-config-wallpaper-program.el b/tests/test-dirvish-config-wallpaper-program.el index 556c13100..41d2ad8b2 100644 --- a/tests/test-dirvish-config-wallpaper-program.el +++ b/tests/test-dirvish-config-wallpaper-program.el @@ -28,9 +28,9 @@ '("feh" "--bg-fill")))) (ert-deftest test-cj--wallpaper-program-for-wayland () - "Normal: wayland dispatches to swww with the img subcommand." + "Normal: wayland dispatches to the set-wallpaper script (awww backend + waypaper persist)." (should (equal (cj/--wallpaper-program-for 'wayland) - '("swww" "img")))) + '("set-wallpaper")))) (ert-deftest test-cj--wallpaper-program-for-unknown-returns-nil () "Boundary: an unknown environment returns nil so the wrapper can fall back." |
