X-Git-Url: https://git.draconx.ca/gitweb/fvwmconf.git/blobdiff_plain/55b6d9c6d3425ae9bb03a6864ea8f78735dba642..a17a73614ce98066362b0714953cdf585ec7fae9:/common/wallpaper diff --git a/common/wallpaper b/common/wallpaper index 5855f74..07e40cd 100644 --- a/common/wallpaper +++ b/common/wallpaper @@ -1,10 +1,10 @@ # Stuff to handle pretty pictures on the background. SetEnv SETROOT "fvwm-root -r" -SetEnv BGFILE "$[FVWM_USERDIR]/wallpaper$[screen].png" +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,12 +15,20 @@ DestroyFunc MakeMenuWallpaper AddToFunc MakeMenuWallpaper + I DestroyMenu recreate MenuWallpaper + I AddToMenu MenuWallpaper Wallpaper Title - + I PipeRead '. $[FVWM_USERDIR]/bgmenu.sh $[BGROOT] MenuWallpaper' + + I PipeRead 'exec $[FVWM_USERDIR]/scripts/bgmenu.zsh $[BGROOT] MenuWallpaper' DestroyFunc SetWallpaper 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