]> git.draconx.ca Git - fvwmconf.git/blobdiff - common/wallpaper
Select a random wallpaper if none is set explicitly.
[fvwmconf.git] / common / wallpaper
index 8414eef846c0a884bf6db131363a8c416d76eeee..a80e320ebb4ff09888af4fd83abe5853e62d3b92 100644 (file)
@@ -15,7 +15,7 @@ DestroyFunc MakeMenuWallpaper
 AddToFunc   MakeMenuWallpaper
  + I DestroyMenu recreate MenuWallpaper
  + I AddToMenu MenuWallpaper Wallpaper Title
- + I PipeRead '. $[FVWM_USERDIR]/scripts/bgmenu.zsh $[BGROOT] MenuWallpaper'
+ + I PipeRead 'exec $[FVWM_USERDIR]/scripts/bgmenu.zsh $[BGROOT] MenuWallpaper'
 
 DestroyFunc SetWallpaper
 AddToFunc   SetWallpaper
@@ -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