hyprpaper: remove unnecessary wallpaper workarounds

The mkForce wallpaper override (explicit monitor names) and the IPC
startup script (sleep 2 + hyprctl) were stacked workarounds for a
misdiagnosed hyprpaper 0.8.4 bug.  Stylix's hyprpaper target (still
auto-enabled) correctly sets preload and wallpaper with the standard
wildcard syntax.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-18 10:35:26 +01:00
parent 542d5b1ee6
commit d89706736c

View file

@ -106,17 +106,11 @@ in
# into settings.config below. # into settings.config below.
stylix.targets.hyprland.enable = false; stylix.targets.hyprland.enable = false;
# Hyprpaper was previously started by stylix's Hyprland target; keep it. # The disabled Hyprland target would normally enable this; do it
# manually. Stylix's hyprpaper target (auto-enabled) still handles
# preload/wallpaper settings.
services.hyprpaper.enable = true; services.hyprpaper.enable = true;
# hyprpaper 0.8.4 doesn't honour the Stylix-generated "wallpaper=,<path>"
# (empty monitor = all) wildcard — the monitor stays unmapped. Override
# with explicit monitor names using config.stylix.image to avoid the
# circular dependency that arises from referencing services.hyprpaper.settings.preload.
services.hyprpaper.settings.wallpaper = lib.mkForce [
"${if isGaming then "DP-2" else "eDP-1"},${config.stylix.image}"
];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
configType = "lua"; configType = "lua";
@ -206,13 +200,6 @@ in
extraConfig = extraConfig =
let let
# hyprpaper 0.8.4 bug: wallpaper= in config is silently ignored.
# preload= works; set the wallpaper via IPC after startup.
setWallpaper = pkgs.writeShellScript "set-hyprpaper-wallpaper" ''
sleep 2
wallpaper=$(grep '^preload=' "$HOME/.config/hypr/hyprpaper.conf" | head -1 | cut -d= -f2-)
${hyprland-pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper "${if isGaming then "DP-2" else "eDP-1"},$wallpaper"
'';
powerMenu = pkgs.writeShellScript "power-menu" '' powerMenu = pkgs.writeShellScript "power-menu" ''
choice=$(printf '%s\n' \ choice=$(printf '%s\n' \
$'\uf023 Lock' \ $'\uf023 Lock' \
@ -275,7 +262,6 @@ in
hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24") hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24")
hl.exec_cmd("swayosd-server") hl.exec_cmd("swayosd-server")
${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''} ${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''}
hl.exec_cmd("${setWallpaper}")
end) end)
-- Animation curve and definitions -- Animation curve and definitions