all repos — fluxbox @ 33a65073a955d850f2a9601ea1368862b36959ff

custom fork of the fluxbox windowmanager

update from Han
fluxgen fluxgen
commit

33a65073a955d850f2a9601ea1368862b36959ff

parent

409e3ca38fd706dde49bea1fb3efa32fee5a8056

1 files changed, 14 insertions(+), 8 deletions(-)

jump to
M util/fluxbox-generate_menuutil/fluxbox-generate_menu

@@ -22,7 +22,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # -# $Id: fluxbox-generate_menu,v 1.34 2003/05/22 10:05:37 fluxgen Exp $ +# $Id: fluxbox-generate_menu,v 1.35 2003/05/22 13:10:59 fluxgen Exp $ # # Portability notes:

@@ -850,12 +850,20 @@ append "[stylesdir] (~/.fluxbox/styles)"

append_menu_end # Backgroundmenu + addbackground() { + picturename=`basename "$1"` + append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }" + } if [ "$BACKGROUNDMENUITEM" = "yes" ]; then + [ -d ${HOME}/.fluxbox/backgrounds/ ] && \ + BACKGROUNDS="${HOME}/.fluxbox/backgrounds/*" + [ -d ${PKGDATADIR}/fluxbox/backgrounds/ ] && \ + BACKGROUNDS="${BACKGROUNDS} ${PKGDATADIR}/fluxbox/backgrounds/*" append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" - if [ `ls -1 ${HOME}/.fluxbox/backgrounds 2>/dev/null |wc -l` -gt 30 ]; then + if [ `ls -1 ${BACKGROUNDS} 2>/dev/null |wc -l` -gt 30 ]; then menucounter=1 ; counter=1 append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" - for i in ${HOME}/.fluxbox/backgrounds/* ${PKGDATADIR}/fluxbox/backgrounds/* ; do + for i in ${BACKGROUNDS} ; do counter=`expr $counter + 1` if [ $counter -eq 30 ]; then counter=1

@@ -863,14 +871,12 @@ menucounter=`expr $menucounter + 1`

append_menu_end append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" fi - picturename=`basename "$i"` - append "[exec] (${picturename%.???}) {fbsetbg -f \"$i\" }" + addbackground $i done append_menu_end else - for i in ${HOME}/.fluxbox/backgrounds/* ${PKGDATADIR}/fluxbox/backgrounds/* ; do - picturename=`basename "$i"` - append "[exec] (${picturename%.???}) {fbsetbg -f \"$i\" }" + for i in ${BACKGROUNDS} ; do + addbackground $i done fi append_menu_end