projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated images for the last two assignments.
[clearscm.git]
/
bin
/
setbg
diff --git
a/bin/setbg
b/bin/setbg
index
c7a9b24
..
ac0038d
100755
(executable)
--- a/
bin/setbg
+++ b/
bin/setbg
@@
-57,6
+57,7
@@
use warnings;
use FindBin;
use Getopt::Long;
use Proc::ProcessTable;
use FindBin;
use Getopt::Long;
use Proc::ProcessTable;
+use File::Spec;
use CGI qw/:standard/;
use lib "$FindBin::Bin/../lib";
use CGI qw/:standard/;
use lib "$FindBin::Bin/../lib";
@@
-107,8
+108,10
@@
GetOptions (
'bgdir=s' => \@imgDirs,
) || Usage;
'bgdir=s' => \@imgDirs,
) || Usage;
-foreach (@imgDirs) {
- error "$_ is not a directory", 1 unless -d $_;
+for (my $i = 0; $i < scalar @imgDirs; $i++) {
+ error "$imgDirs[$i] is not a directory", 1 unless -d $imgDirs[$i];
+
+ $imgDirs[$i] = File::Spec->rel2abs ($imgDirs[$i]);
} # foreach
# Using gsettings
} # foreach
# Using gsettings
@@
-117,7
+120,7
@@
my $setbgOpts = "set org.gnome.desktop.background picture-uri \"file://";
my @images = fillPictures;
my @images = fillPictures;
-Usage "No images to display. Must specify -
imgD
ir" unless @images;
+Usage "No images to display. Must specify -
bgd
ir" unless @images;
sub SwitchWallPaper {
# We don't need to do anything here, just handle the interrupt and
sub SwitchWallPaper {
# We don't need to do anything here, just handle the interrupt and