diff --git a/sway/displays.pl b/sway/displays.pl index 0317338..1896a14 100755 --- a/sway/displays.pl +++ b/sway/displays.pl @@ -393,7 +393,7 @@ my $t = Proc::ProcessTable->new(); foreach my $p ( @{ $t->table } ) { my $cmndline = $p->{'cmndline'}; $cmndline =~ s/\s*$//g; - if ($cmndline =~ /^(waybar|wallpaper\.pl).*/) { + if ($cmndline =~ /^waybar.*/) { # Never kill this process if ($p->{'pid'} == $$) { next; @@ -546,13 +546,5 @@ unless ($pid) { `WAYLAND_DISPLAY=$waydisplay nohup $waybar_bin -b waybar0 --config=$waybar_config >> $ENV{'HOME'}/.waybar.log`; } -# Start wallpapers script as fork -if ($w) { - $pid = fork; - unless ($pid) { - open STDIN, '/dev/null'; - open STDOUT, '>>/dev/null'; - open STDERR, '>>/dev/null'; - `/usr/bin/perl $ENV{'HOME'}/scripts/sway/wallpaper.pl -d $w`; - } -} +# Restart wallpaper daemon +`systemctl --user restart wallpapers.service`;