diff --git a/homeManagerModules/desktop/hyprland/default.nix b/homeManagerModules/desktop/hyprland/default.nix index 65b73568..3e99f69a 100644 --- a/homeManagerModules/desktop/hyprland/default.nix +++ b/homeManagerModules/desktop/hyprland/default.nix @@ -83,6 +83,7 @@ in { if Time.now - last_update_time[monitor] >= update_interval random_background = Dir.glob(File.join(directory, '*.{png,jpg}')).sample pid = spawn("${lib.getExe pkgs.swaybg}", '-o', monitor, '-i', random_background, '-m', 'fill') + sleep 1 Process.kill('TERM', current_pids[monitor]) if current_pids[monitor] current_pids[monitor] = pid last_update_time[monitor] = Time.now