]> git.draconx.ca Git - fvwmconf.git/blobdiff - common/wallpaper
Select a random wallpaper if none is set explicitly.
[fvwmconf.git] / 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