]> git.draconx.ca Git - fvwmconf.git/commitdiff
Select a random wallpaper if none is set explicitly.
authorNick Bowler <draconx@gmail.com>
Sun, 1 Jun 2008 01:09:56 +0000 (21:09 -0400)
committerNick Bowler <draconx@gmail.com>
Sun, 1 Jun 2008 01:09:56 +0000 (21:09 -0400)
common/wallpaper

index acd270f073984f85bc12bc40e77bd79bd57640c0..a80e320ebb4ff09888af4fd83abe5853e62d3b92 100644 (file)
@@ -23,4 +23,8 @@ AddToFunc   SetWallpaper
  + I Exec exec $[SETROOT] "$[BGFILE]"
 
 AddToFunc InitFunction
- + I Exec exec $[SETROOT] "$[BGFILE]"
+ + I Exec if [ -f "$[BGFILE]" ]; then \
+              $[SETROOT] "$[BGFILE]"; \
+          else \
+             $[SETROOT] "$($[FVWM_USERDIR]/scripts/randombg.pl $[BGROOT])"; \
+         fi