diff --git a/homeManagerModules/desktop/hyprland/randomWallpaper.nix b/homeManagerModules/desktop/hyprland/randomWallpaper.nix index b04fb27a..b5fbd5ab 100644 --- a/homeManagerModules/desktop/hyprland/randomWallpaper.nix +++ b/homeManagerModules/desktop/hyprland/randomWallpaper.nix @@ -20,7 +20,9 @@ NEW_PIDS+=($!) done - sleep 5 + if [ ''${OLD_PIDS[@]} -gt 0 ]; then + sleep 5 + fi for pid in ''${OLD_PIDS[@]}; do kill $pid diff --git a/homeManagerModules/desktop/sway/randomWallpaper.nix b/homeManagerModules/desktop/sway/randomWallpaper.nix index bb024a70..fec6f674 100644 --- a/homeManagerModules/desktop/sway/randomWallpaper.nix +++ b/homeManagerModules/desktop/sway/randomWallpaper.nix @@ -21,7 +21,9 @@ NEW_PIDS+=($!) done - sleep 5 + if [ ''${OLD_PIDS[@]} -gt 0 ]; then + sleep 5 + fi for pid in ''${OLD_PIDS[@]}; do kill $pid