]> git.draconx.ca Git - fvwmconf.git/commitdiff
Fix scripts/bgmenu.sh to use both zsh and the aspect tool.
authorNick Bowler <nbowler@ellipticsemi.com>
Mon, 5 May 2008 15:02:22 +0000 (11:02 -0400)
committerNick Bowler <nbowler@ellipticsemi.com>
Mon, 5 May 2008 15:13:56 +0000 (11:13 -0400)
common/wallpaper
scripts/bgmenu.zsh [moved from scripts/bgmenu.sh with 83% similarity]

index e96f33e8665a20c396801928a7cbf9d628acc0b7..8414eef846c0a884bf6db131363a8c416d76eeee 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.sh $[BGROOT] MenuWallpaper'
+ + I PipeRead '. $[FVWM_USERDIR]/scripts/bgmenu.zsh $[BGROOT] MenuWallpaper'
 
 DestroyFunc SetWallpaper
 AddToFunc   SetWallpaper
similarity index 83%
rename from scripts/bgmenu.sh
rename to scripts/bgmenu.zsh
index ec6ae8f050dbc21f57551b2404be80041a5f8921..7c0b7d4586cb8590850c9adb083409a58b965d22 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/zsh
 # Generates an FVWM menu for selecting the PNG images found in a given
 # directory.  Thumbnails for the images are generated on the fly using convert
 # from ImageMagick, and stored in the .thumbs subdirectory.  The menu items
@@ -6,7 +6,7 @@
 
 menu="MenuWallpaper"
 func="SetWallpaper"
-thumber="$HOME/.fvwm/scripts/thumbnail.sh"
+thumber="$FVWM_USERDIR/scripts/thumbnail.sh"
 
 if [ ! -d "$1" ]; then
        echo "usage: $0 <directory> [menuname]" 1>&2
@@ -14,7 +14,7 @@ if [ ! -d "$1" ]; then
 fi
 [ -n "$2" ] && menu="$2"
 
-for i in "$1"/*.png; do
+for i in "$1"/*$($FVWM_USERDIR/scripts/C/xaspect).png; do
        thumb="`$thumber --size x160 "$i"`"
        echo "AddToMenu $menu \"`basename "${i%.png}"`*$thumb*\" $func \"$i\""
 done