X-Git-Url: http://git.draconx.ca/gitweb/fvwmconf.git/blobdiff_plain/55b6d9c6d3425ae9bb03a6864ea8f78735dba642..29f5d0f30a46ef28ab911a385dedc3e838386714:/common/wallpaper diff --git a/common/wallpaper b/common/wallpaper index 5855f74..b858eb4 100644 --- a/common/wallpaper +++ b/common/wallpaper @@ -1,6 +1,6 @@ # 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 @@ -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