From d2c0128e01d9aace82a076b46c5de3109e53745b Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sat, 4 Apr 2026 05:16:16 -0400 Subject: [PATCH] had to change form pkgs.awww to awwwPkg variable Moving to a flake input I updated the awww references On branch main Your branch is up to date with 'origin/main'. Changes to be committed: modified: modules/home/scripts/default.nix modified: modules/home/scripts/qs-wallpapers-apply.nix modified: modules/home/scripts/qs-wallpapers-restore.nix modified: modules/home/scripts/wallsetter.nix --- modules/home/scripts/default.nix | 7 ++++--- modules/home/scripts/qs-wallpapers-apply.nix | 18 ++++++++++-------- modules/home/scripts/qs-wallpapers-restore.nix | 18 ++++++++++-------- modules/home/scripts/wallsetter.nix | 6 ++++-- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index 6e99baa..4874006 100644 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -1,6 +1,7 @@ { config, pkgs, + inputs, username, profile, ... @@ -19,7 +20,7 @@ (import ./task-waybar.nix {inherit pkgs;}) (import ./DropTerminal.nix {inherit pkgs;}) (import ./wallsetter.nix { - inherit pkgs; + inherit pkgs inputs; inherit username; }) (import ./web-search.nix {inherit pkgs;}) @@ -32,8 +33,8 @@ (import ./qs-vid-wallpapers-apply.nix {inherit pkgs;}) (import ./qs-vid-wallpapers-watchdog.nix {inherit pkgs;}) (import ./qs-wallpapers.nix {inherit pkgs;}) - (import ./qs-wallpapers-apply.nix {inherit pkgs;}) - (import ./qs-wallpapers-restore.nix {inherit pkgs;}) + (import ./qs-wallpapers-apply.nix {inherit pkgs inputs;}) + (import ./qs-wallpapers-restore.nix {inherit pkgs inputs;}) (import ./qs-wlogout.nix {inherit pkgs;}) (import ./qs-docs.nix {inherit pkgs;}) (import ./docs-parser.nix {inherit pkgs;}) diff --git a/modules/home/scripts/qs-wallpapers-apply.nix b/modules/home/scripts/qs-wallpapers-apply.nix index d256418..2bc1818 100644 --- a/modules/home/scripts/qs-wallpapers-apply.nix +++ b/modules/home/scripts/qs-wallpapers-apply.nix @@ -1,4 +1,6 @@ -{pkgs}: +{pkgs, inputs}: let + awwwPkg = inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww; +in pkgs.writeShellScriptBin "qs-wallpapers-apply" '' #!/usr/bin/env bash set -euo pipefail @@ -123,12 +125,12 @@ pkgs.writeShellScriptBin "qs-wallpapers-apply" '' awww) ${pkgs.procps}/bin/pkill -x mpvpaper >/dev/null 2>&1 || true # Start awww-daemon if needed (newer awww has no 'init' subcommand) - if ! ${pkgs.awww}/bin/awww query >/dev/null 2>&1; then + if ! ${awwwPkg}/bin/awww query >/dev/null 2>&1; then log "Starting awww-daemon" - ${pkgs.awww}/bin/awww-daemon >/dev/null 2>&1 & disown || true + ${awwwPkg}/bin/awww-daemon >/dev/null 2>&1 & disown || true # wait briefly for the daemon to be ready for i in $(${pkgs.coreutils}/bin/seq 1 50); do - if ${pkgs.awww}/bin/awww query >/dev/null 2>&1; then + if ${awwwPkg}/bin/awww query >/dev/null 2>&1; then log "awww-daemon ready" break fi @@ -142,13 +144,13 @@ pkgs.writeShellScriptBin "qs-wallpapers-apply" '' run_awww_img() { if [ -n "''${WALLPAPER_RESIZE:-}" ]; then log "awww img --resize ''${WALLPAPER_RESIZE} $sel" - ${pkgs.awww}/bin/awww img --resize "''${WALLPAPER_RESIZE}" "$sel" + ${awwwPkg}/bin/awww img --resize "''${WALLPAPER_RESIZE}" "$sel" return $? fi log "Trying awww resize modes: fill -> fit -> crop" - ${pkgs.awww}/bin/awww img --resize fill "$sel" || \ - ${pkgs.awww}/bin/awww img --resize fit "$sel" || \ - ${pkgs.awww}/bin/awww img --resize crop "$sel" + ${awwwPkg}/bin/awww img --resize fill "$sel" || \ + ${awwwPkg}/bin/awww img --resize fit "$sel" || \ + ${awwwPkg}/bin/awww img --resize crop "$sel" } # Niri: generic apply has proven to work more reliably than per-output here diff --git a/modules/home/scripts/qs-wallpapers-restore.nix b/modules/home/scripts/qs-wallpapers-restore.nix index 9a4b10f..81a3554 100644 --- a/modules/home/scripts/qs-wallpapers-restore.nix +++ b/modules/home/scripts/qs-wallpapers-restore.nix @@ -1,4 +1,6 @@ -{pkgs}: +{pkgs, inputs}: let + awwwPkg = inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww; +in pkgs.writeShellScriptBin "qs-wallpapers-restore" '' #!/usr/bin/env bash set -euo pipefail @@ -56,23 +58,23 @@ pkgs.writeShellScriptBin "qs-wallpapers-restore" '' ${pkgs.procps}/bin/pkill -x mpvpaper >/dev/null 2>&1 || true ${pkgs.procps}/bin/pkill -x hyprpaper >/dev/null 2>&1 || true - if ! ${pkgs.awww}/bin/awww query >/dev/null 2>&1; then + if ! ${awwwPkg}/bin/awww query >/dev/null 2>&1; then log "Starting awww-daemon" - ${pkgs.awww}/bin/awww-daemon >/dev/null 2>&1 & disown || true + ${awwwPkg}/bin/awww-daemon >/dev/null 2>&1 & disown || true for i in $(${pkgs.coreutils}/bin/seq 1 50); do - if ${pkgs.awww}/bin/awww query >/dev/null 2>&1; then break; fi + if ${awwwPkg}/bin/awww query >/dev/null 2>&1; then break; fi ${pkgs.coreutils}/bin/sleep 0.1 done fi # Robust resize: use explicit WALLPAPER_RESIZE if provided; otherwise try fill -> fit -> crop if [ -n "''${WALLPAPER_RESIZE:-}" ]; then log "awww img --resize ''${WALLPAPER_RESIZE} $PATH_J" - ${pkgs.awww}/bin/awww img --resize "''${WALLPAPER_RESIZE}" "$PATH_J" + ${awwwPkg}/bin/awww img --resize "''${WALLPAPER_RESIZE}" "$PATH_J" else log "Trying awww resize modes: fill -> fit -> crop" - ${pkgs.awww}/bin/awww img --resize fill "$PATH_J" || \ - ${pkgs.awww}/bin/awww img --resize fit "$PATH_J" || \ - ${pkgs.awww}/bin/awww img --resize crop "$PATH_J" + ${awwwPkg}/bin/awww img --resize fill "$PATH_J" || \ + ${awwwPkg}/bin/awww img --resize fit "$PATH_J" || \ + ${awwwPkg}/bin/awww img --resize crop "$PATH_J" fi } diff --git a/modules/home/scripts/wallsetter.nix b/modules/home/scripts/wallsetter.nix index c2371fe..59c5226 100644 --- a/modules/home/scripts/wallsetter.nix +++ b/modules/home/scripts/wallsetter.nix @@ -1,4 +1,6 @@ -{pkgs, ...}: +{pkgs, inputs, ...}: let + awwwPkg = inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww; +in pkgs.writeShellScriptBin "wallsetter" '' TIMEOUT=720 @@ -17,7 +19,7 @@ pkgs.writeShellScriptBin "wallsetter" '' PREVIOUS=$WALLPAPER - ${pkgs.awww}/bin/awww img "$WALLPAPER" --transition-type random --transition-step 1 --transition-fps 60 + ${awwwPkg}/bin/awww img "$WALLPAPER" --transition-type random --transition-step 1 --transition-fps 60 sleep $TIMEOUT done ''