summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-08-11 08:35:31 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-08-11 08:35:31 -0700
commitba04b6ddbde531d73f2fb1bc904ed96120a71d8c (patch)
tree6d8cf5d134587efb021a80f57e0082bb073e886f
parentbfd8ff605ae4a0303c0cc6c45db7ce5528a8b145 (diff)
downloaddotfiles-ba04b6ddbde531d73f2fb1bc904ed96120a71d8c.tar.gz
copy don't symlink
More flexible and the files aren't going to change.
-rw-r--r--perl5/Local/Desktop.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl5/Local/Desktop.pm b/perl5/Local/Desktop.pm
index 1b2fcc3e..46a62bbf 100644
--- a/perl5/Local/Desktop.pm
+++ b/perl5/Local/Desktop.pm
@@ -26,6 +26,7 @@ use File::Find;
use File::LibMagic;
use File::Spec::Functions "rel2abs";
use Exporter "import";
+use File::Copy;
our @EXPORT = qw(
select_wallpaper_files
@@ -40,7 +41,7 @@ my $output_re = qr/ ([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+) /;
Select the first entry of @files as the wallpaper for the first output, the
second entry of @files as the wallpaper for the second output, etc.
-This function works by creating symlinks to those wallpapers in ~/local.
+This function works by creating copies of those wallpapers in ~/local.
=cut
@@ -49,7 +50,7 @@ sub select_wallpaper_files {
unlink <"$ENV{HOME}/local/wallpaper??.*">;
for (@_) {
-r or croak "$_ could not be read!";
- symlink rel2abs($_),
+ copy $_,
sprintf "$ENV{HOME}/local/wallpaper%02d." . (/\.([^.]+)\z/)[0], $i++;
}
}