]> git.draconx.ca Git - fvwmconf.git/blobdiff - common/wallpaper
Improve wallpaper menu generation.
[fvwmconf.git] / common / wallpaper
index a80e320ebb4ff09888af4fd83abe5853e62d3b92..1bc5002726eb65cc1e3b1c90e6010ce76c747efa 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
@@ -15,16 +15,20 @@ DestroyFunc MakeMenuWallpaper
 AddToFunc   MakeMenuWallpaper
  + I DestroyMenu recreate MenuWallpaper
  + I AddToMenu MenuWallpaper Wallpaper Title
- + I PipeRead 'exec $[FVWM_USERDIR]/scripts/bgmenu.zsh $[BGROOT] MenuWallpaper'
+ + I PipeRead 'exec $[FVWM_USERDIR]/scripts/bgmenu.sh --menu=MenuWallpaper $[BGROOT]'
 
 DestroyFunc SetWallpaper
 AddToFunc   SetWallpaper
  + I Exec exec ln -sf "$0" "$[BGFILE]"
  + I Exec exec $[SETROOT] "$[BGFILE]"
 
-AddToFunc InitFunction
+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