From fa2c7501c1c11853168bce85a6fb9b96c3f47c1f Mon Sep 17 00:00:00 2001 From: Sean Kovacs Date: Mon, 19 Jan 2026 14:34:26 -0500 Subject: [PATCH] wallpaper: use wpaperd --- home/tiling/niri.nix | 7 +++-- home/tiling/noctalia.nix | 10 +++---- home/tiling/wallpaper.nix | 57 ++++++++++++++++++++++++++++++++++----- 3 files changed, 57 insertions(+), 17 deletions(-) diff --git a/home/tiling/niri.nix b/home/tiling/niri.nix index 2335ff7..1d1d07f 100644 --- a/home/tiling/niri.nix +++ b/home/tiling/niri.nix @@ -88,14 +88,13 @@ theme = config.userOptions.cursor.name; }; layout = { - gaps = 4; + gaps = 2; background-color = pkgs.catppuccin.${config.catppuccin.flavor}.mantle; default-column-width = { proportion = 0.5; }; preset-column-widths = [ {proportion = 1.0 / 3.0;} - {proportion = 1.0 / 2.0;} {proportion = 2.0 / 3.0;} ]; border = { @@ -131,8 +130,8 @@ ]; open-floating = true; default-floating-position = { - x = 32; - y = 32; + x = 16; + y = 16; relative-to = "bottom-left"; }; } diff --git a/home/tiling/noctalia.nix b/home/tiling/noctalia.nix index 6606dca..e24257c 100644 --- a/home/tiling/noctalia.nix +++ b/home/tiling/noctalia.nix @@ -121,8 +121,8 @@ general = { avatarImage = "/home/${config.userOptions.username}/.face"; dimmerOpacity = 0.6; - showScreenCorners = true; - forceBlackScreenCorners = true; + showScreenCorners = false; + forceBlackScreenCorners = false; scaleRatio = 1; radiusRatio = 1; iRadiusRatio = 1; @@ -356,13 +356,9 @@ criticalUrgencyDuration = 15; enableKeyboardLayoutToast = true; sounds = { - enabled = false; + enabled = true; volume = 0.5; separateSounds = false; - criticalSoundFile = ""; - normalSoundFile = ""; - lowSoundFile = ""; - excludedApps = ""; }; }; osd = { diff --git a/home/tiling/wallpaper.nix b/home/tiling/wallpaper.nix index 830c6ec..c65d6a2 100644 --- a/home/tiling/wallpaper.nix +++ b/home/tiling/wallpaper.nix @@ -3,7 +3,7 @@ config, ... }: let - bingWallpaperScript = pkgs.writeShellScript "bing-wallpaper" '' + script = pkgs.writeShellScript "bing-wallpaper" '' set -euo pipefail # Configuration @@ -63,27 +63,72 @@ echo "Wallpaper downloaded and applied successfully." ''; in { + home.packages = with pkgs; [ + wpaperd + ]; + + home.file.".config/wpaperd/config.toml" = { + text = '' + [default] + mode = "center" + + [any] + path = "/home/${config.userOptions.username}/.local/share/wallpaper/daily.jpg" + ''; + force = true; + }; + + systemd.user.services.wpaperd = { + Unit = { + Description = "Modern wallpaper daemon for Wayland"; + PartOf = ["niri.service"]; + Requires = ["niri.service"]; + After = ["niri.service"]; + }; + Service = { + ExecStart = "${pkgs.wpaperd}/bin/wpaperd"; + }; + Install = { + WantedBy = [ + "niri.service" + ]; + }; + }; + systemd.user.services.bing-wallpaper = { Unit = { Description = "Download and set Bing wallpaper of the day"; After = [ "network-online.target" - "niri.service" - "noctalia.service" ]; Wants = [ "network-online.target" - "noctalia.service" ]; }; Service = { Type = "oneshot"; - ExecStart = "${bingWallpaperScript}"; + ExecStart = "${script}"; + ExecStartPost = "${pkgs.systemd}/bin/systemctl --user restart wpaperd.service"; }; Install = { - WantedBy = ["niri.service"]; + WantedBy = [ + "niri.service" + ]; + }; + }; + + systemd.user.timers.bing-wallpaper = { + Unit = { + Description = "Run bing wallpaper retrieval daily"; + }; + Timer = { + OnCalendar = "*-*-* 10:00:00 GMT"; + Persistent = true; + }; + Install = { + WantedBy = ["timers.target"]; }; }; }