mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 03:33:55 -05:00
hyprland/wallpaper: spawn new swyabg process before killing old one
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
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:
parent
d2e51f8a32
commit
33e0233b03
|
@ -81,9 +81,9 @@ in {
|
||||||
# Update wallpapers after the set interval
|
# Update wallpapers after the set interval
|
||||||
active_monitors.each do |monitor|
|
active_monitors.each do |monitor|
|
||||||
if Time.now - last_update_time[monitor] >= update_interval
|
if Time.now - last_update_time[monitor] >= update_interval
|
||||||
Process.kill('TERM', current_pids[monitor]) if current_pids[monitor]
|
|
||||||
random_background = Dir.glob(File.join(directory, '*.{png,jpg}')).sample
|
random_background = Dir.glob(File.join(directory, '*.{png,jpg}')).sample
|
||||||
pid = spawn("${lib.getExe pkgs.swaybg}", '-o', monitor, '-i', random_background, '-m', 'fill')
|
pid = spawn("${lib.getExe pkgs.swaybg}", '-o', monitor, '-i', random_background, '-m', 'fill')
|
||||||
|
Process.kill('TERM', current_pids[monitor]) if current_pids[monitor]
|
||||||
current_pids[monitor] = pid
|
current_pids[monitor] = pid
|
||||||
last_update_time[monitor] = Time.now
|
last_update_time[monitor] = Time.now
|
||||||
known_monitors[monitor] = random_background
|
known_monitors[monitor] = random_background
|
||||||
|
|
Loading…
Reference in a new issue