X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fsetbg;h=39ce45bf53eb5506c22ed33ebf1984a433595485;hb=fb369fc18c24c43e0ff44b19912fd339a5e52f95;hp=e3f5a46bb4d3d346e8e2e9b9ee74c2b4e4bdef58;hpb=06eb4512523d26b05b60bb089248076e9d60c517;p=clearscm.git diff --git a/bin/setbg b/bin/setbg index e3f5a46..39ce45b 100755 --- a/bin/setbg +++ b/bin/setbg @@ -98,7 +98,7 @@ foreach (@imgDir) { } # foreach # Using gsettings -my $setbg = "gsettings"; +my $setbg = "gsettings"; my $setbgOpts = "set org.gnome.desktop.background picture-uri \"file://"; my @images; @@ -133,8 +133,14 @@ while () { my $cmd = "$setbg $setbgOpts$image\" 2> /dev/null"; - `$cmd`; + my @output = `$cmd`; + if ($? != 0) { + display "ERROR Trying to set background - command used \"$cmd\"", $log; + display "Output:"; + display join "\n", @output, $log; + } # if + close $log; sleep $sleep;