From 37a5fd500813517240cfb2dbd910abff3b4ccb6e Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Sat, 20 Jan 2024 21:36:56 -0600 Subject: [PATCH] Fix timeout, and source the user set wallpaperDir --- config/scripts/wallsetter.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/scripts/wallsetter.nix b/config/scripts/wallsetter.nix index 8559765..ec278fc 100644 --- a/config/scripts/wallsetter.nix +++ b/config/scripts/wallsetter.nix @@ -1,13 +1,13 @@ { pkgs, username, wallpaperDir, wallpaperGit, ... }: pkgs.writeShellScriptBin "wallsetter" '' - TIMEOUT=5 + TIMEOUT=720 TRANSITION1="--transition-type wave --transition-angle 120 --transition-step 30" TRANSITION2="--transition-type wipe --transition-angle 30 --transition-step 30" TRANSITION3="--transition-type center --transition-step 30" TRANSITION4="--transition-type outer --transition-pos 0.3,0.8 --transition-step 30" TRANSITION5="--transition-type wipe --transition-angle 270 --transition-step 30" - WALLPAPER=$(find $HOME/Pictures/Wallpapers/ -name '*' | awk '!/.git/' | tail -n +2 | sed 's/ /\\ /g' | shuf -n 1) + WALLPAPER=$(find ${wallpaperDir} -name '*' | awk '!/.git/' | tail -n +2 | sed 's/ /\\ /g' | shuf -n 1) PREVIOUS=$WALLPAPER if [ -d ${wallpaperDir} ]; then cd ${wallpaperDir} @@ -20,7 +20,7 @@ pkgs.writeShellScriptBin "wallsetter" '' do if [ "$WALLPAPER" == "$PREVIOUS" ] then - WALLPAPER=$(find $HOME/Pictures/Wallpapers/ -name '*' | awk '!/.git/' | tail -n +2 | sed 's/ /\\ /g' | shuf -n 1) + WALLPAPER=$(find ${wallpaperDir} -name '*' | awk '!/.git/' | tail -n +2 | sed 's/ /\\ /g' | shuf -n 1) else PREVIOUS=$WALLPAPER NUM=$(shuf -i 1-5 -n 1)