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
This commit is contained in:
parent
0bbcb7866d
commit
d2c0128e01
4 changed files with 28 additions and 21 deletions
|
|
@ -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;})
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue