hyprland/wallpaper: sleep before killing old swaybg instance
Some checks are pending
flakehub / flakehub-publish (push) Waiting to run
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
nix-drybuild / fallarbor-drybuild (push) Waiting to run
nix-drybuild / lavaridge-drybuild (push) Waiting to run
nix-drybuild / mauville-drybuild (push) Waiting to run
nix-drybuild / petalburg-drybuild (push) Waiting to run
nix-drybuild / rustboro-drybuild (push) Waiting to run

This commit is contained in:
Aly Raffauf 2024-07-18 17:53:19 -04:00
parent 33e0233b03
commit 265756abaf

View file

@ -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