]> git.draconx.ca Git - fvwmconf.git/blobdiff - common/wallpaper
Adjust wallpaper menu formatting.
[fvwmconf.git] / common / wallpaper
index acd270f073984f85bc12bc40e77bd79bd57640c0..07e40cd1617f6b6d7819f26109328422e0a5ba35 100644 (file)
@@ -4,7 +4,7 @@ SetEnv BGFILE  "$[FVWM_USERDIR]/.state/wallpaper$[screen].png"
 SetEnv BGROOT  "$[HOME]/wallpaper"
 
 CopyMenuStyle * MenuWallpaper
-MenuStyle MenuWallpaper ItemFormat "%.2|%5.5c%2.3>%1|"
+MenuStyle MenuWallpaper ItemFormat "%.2|%5.5c%-16.3>%1|"
 
 DestroyMenu MenuWallpaper
 AddToMenu   MenuWallpaper
@@ -22,5 +22,13 @@ AddToFunc   SetWallpaper
  + I Exec exec ln -sf "$0" "$[BGFILE]"
  + I Exec exec $[SETROOT] "$[BGFILE]"
 
-AddToFunc InitFunction
- + I Exec exec $[SETROOT] "$[BGFILE]"
+DestroyFunc SetInitialWallpaper
+AddToFunc   SetInitialWallpaper
+ + I Exec if [ -f "$[BGFILE]" ]; then \
+              $[SETROOT] "$[BGFILE]"; \
+          else \
+             $[SETROOT] "$($[FVWM_USERDIR]/scripts/randombg.pl $[BGROOT])"; \
+         fi
+
+AddToFunc InitFunction I SetInitialWallpaper
+AddToFunc SessionInitFunction I SetInitialWallpaper