From 978ebba43e57b7dd5c47fceea811d6c3f404f338 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 26 May 2024 15:58:01 -0400 Subject: [PATCH] swya/hyprland: check for OLD_PIDS before pausing --- homeManagerModules/desktop/hyprland/randomWallpaper.nix | 4 +++- homeManagerModules/desktop/sway/randomWallpaper.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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