Fixed bug in setbg
[clearscm.git] / bin / setbg
index b64024c..ffcefda 100755 (executable)
--- a/bin/setbg
+++ b/bin/setbg
@@ -63,10 +63,10 @@ contents of the bgdirs incase it has changed and display a new image". This is
 useful for script to be able to alert setbg that something has changed. For
 example, a script named rmbg might look at ~/.setbg to get the name of the
 current background image file and remove it then signal setbg with SIGUSR1 to
 useful for script to be able to alert setbg that something has changed. For
 example, a script named rmbg might look at ~/.setbg to get the name of the
 current background image file and remove it then signal setbg with SIGUSR1 to
-have it re-evaluate the state of bgdirs. 
+have it re-evaluate the state of bgdirs.
 
 Finally setbg will perform the this re-evaluation at midnight everyday. This is
 
 Finally setbg will perform the this re-evaluation at midnight everyday. This is
-useful because we point setbg to look at -bgdirs from Dropbox where Camera 
+useful because we point setbg to look at -bgdirs from Dropbox where Camera
 Uploads is included and new pictures can arrive everyday.
 
 =cut
 Uploads is included and new pictures can arrive everyday.
 
 =cut
@@ -105,7 +105,7 @@ my %opts = (
 
 my %totals;
 
 
 my %totals;
 
-sub displayStats () {
+sub displayStats() {
   my $statsFile = Logger->new(
     name      => ".$FindBin::Script.stats",
     path      => $ENV{HOME},
   my $statsFile = Logger->new(
     name      => ".$FindBin::Script.stats",
     path      => $ENV{HOME},
@@ -125,7 +125,7 @@ sub displayStats () {
   return;
 } # displayStats
 
   return;
 } # displayStats
 
-sub fillPictures () {
+sub fillPictures($signame = undef) {
   my @images;
 
   $totals{bgdirs} = 0;
   my @images;
 
   $totals{bgdirs} = 0;
@@ -162,7 +162,7 @@ sub writeHistory($msg) {
   close $hist;
 } # writeHistory
 
   close $hist;
 } # writeHistory
 
-sub writeSetBG ($filename, $image) {
+sub writeSetBG($filename, $image) {
   open my $file, '>', $filename
     or error "Unable to open $filename for writing - $!", 1;
 
   open my $file, '>', $filename
     or error "Unable to open $filename for writing - $!", 1;
 
@@ -183,7 +183,7 @@ sub updateSetBG($bgimage, $lockimage) {
   return;
 } # updateSetBG
 
   return;
 } # updateSetBG
 
-sub SwitchWallPaper {
+sub SwitchWallPaper($saigname) {
   # We don't need to do anything here, just handle the interrupt and
   # let the while loop continue.
   debug 'SwitchWallPaper: Interrupt received';
   # We don't need to do anything here, just handle the interrupt and
   # let the while loop continue.
   debug 'SwitchWallPaper: Interrupt received';