Compare commits
2 Commits
84ba87dcf8
...
95499d1130
Author | SHA1 | Date |
---|---|---|
John Mertz | 95499d1130 | |
John Mertz | 4a69e4e8d6 |
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PID=`cat /tmp/$USER-wallpaper.pid`
|
||||||
|
|
||||||
|
if [ $PID ]; then
|
||||||
|
kill -SIGUSR1 $PID
|
||||||
|
else
|
||||||
|
systemctl --user restart wallpapers.service
|
||||||
|
fi
|
|
@ -226,7 +226,7 @@ sub crop
|
||||||
my $oh = shift;
|
my $oh = shift;
|
||||||
|
|
||||||
my $cropped = $image;
|
my $cropped = $image;
|
||||||
$cropped =~ s#^.*/([^/]*)\.([^\.]+)$#$1-cropped.$2#;
|
$cropped =~ s#^.*/([^/]*)\.([^\.]+)$#$self->{'path'}$1-cropped.$2#;
|
||||||
|
|
||||||
#$image = "/tmp/Pharma-out.png.jpg";
|
#$image = "/tmp/Pharma-out.png.jpg";
|
||||||
use Image::Magick;
|
use Image::Magick;
|
||||||
|
@ -355,9 +355,9 @@ sub run
|
||||||
}
|
}
|
||||||
$self->set_background($target,$cropped);
|
$self->set_background($target,$cropped);
|
||||||
if ($self->{crop}) {
|
if ($self->{crop}) {
|
||||||
$self->do_log('LOG_DEBUG', "Deleting $cropped");
|
|
||||||
# Give swaybg a second, otherwise the file will be missing before it ends
|
# Give swaybg a second, otherwise the file will be missing before it ends
|
||||||
sleep(2);
|
sleep(1);
|
||||||
|
$self->do_log('LOG_DEBUG', "Deleting $cropped");
|
||||||
unlink($cropped) || $self->do_log("LOG_WARNING", "Failed to delete $cropped after setting: $!");
|
unlink($cropped) || $self->do_log("LOG_WARNING", "Failed to delete $cropped after setting: $!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue