From: Nick Bowler Date: Mon, 5 May 2008 15:02:22 +0000 (-0400) Subject: Fix scripts/bgmenu.sh to use both zsh and the aspect tool. X-Git-Url: https://git.draconx.ca/gitweb/fvwmconf.git/commitdiff_plain/0cabdc838df1c59dcf2784121797c5de11830009 Fix scripts/bgmenu.sh to use both zsh and the aspect tool. --- diff --git a/common/wallpaper b/common/wallpaper index e96f33e..8414eef 100644 --- a/common/wallpaper +++ b/common/wallpaper @@ -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 diff --git a/scripts/bgmenu.sh b/scripts/bgmenu.zsh similarity index 83% rename from scripts/bgmenu.sh rename to scripts/bgmenu.zsh index ec6ae8f..7c0b7d4 100755 --- a/scripts/bgmenu.sh +++ b/scripts/bgmenu.zsh @@ -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 [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