all repos — fluxbox @ a8583b79ae3cc1e5bc52df5a46fd341c1bdab22f

custom fork of the fluxbox windowmanager

avoid trailing spaces between app and closing }

Add a few lines of code to prevent a few spaces in some menu output.
'{$app $options}' would expand to '{app }' if no options were set.

Also, while scattered throughout, in this particular spot the
unnecessary braces around some of the variables (and not around some
others) and inside flux's braces could be very visually confusing and
lead to editing errors, so removed those.
slakmagik slakmagik@gmail.com
commit

a8583b79ae3cc1e5bc52df5a46fd341c1bdab22f

parent

0fbb2cb73cee7a28c9f9ac2ec52f221cc53febef

1 files changed, 15 insertions(+), 3 deletions(-)

jump to
M util/fluxbox-generate_menu.inutil/fluxbox-generate_menu.in

@@ -1314,6 +1314,11 @@ fi

fi BACKUPOPTIONS=$@ +if [ -n "$BACKUPOPTIONS" ]; then + FBGM_CMD="@pkgprefix@fluxbox-generate_menu@pkgsuffix@ $BACKUPOPTIONS" +else + FBGM_CMD=@pkgprefix@fluxbox-generate_menu@pkgsuffix@ +fi # Get options. while [ $# -gt 0 ]; do case "$1" in

@@ -1530,6 +1535,13 @@

if [ -z "$LAUNCHER" ]; then LAUNCHER=@pkgprefix@fbrun@pkgsuffix@ fi +if [ -n "$FBRUNOPTIONS" ]; then + # with this, LAUNCHER should be renamed LAUNCHER_NAME, but then there's + # backwards-compatibility... + LAUNCHER_CMD="$LAUNCHER $FBRUNOPTIONS" +else + LAUNCHER_CMD=$LAUNCHER +fi # Start of menu cat << EOF > ${MENUFILENAME}

@@ -1570,7 +1582,7 @@ MozillaFirefox) append "[exec] (firefox) {MozillaFirefox}" ;;

*) append "[exec] ($DEFAULT_BROWSERNAME) {$DEFAULT_BROWSER}" ;; esac -find_it "${LAUNCHER}" append "[exec] (${RUNCOMMAND}) {${LAUNCHER} $FBRUNOPTIONS}" +find_it "${LAUNCHER}" append "[exec] (${RUNCOMMAND}) {$LAUNCHER_CMD}" append_submenu "${TERMINALMENU}"

@@ -1859,10 +1871,10 @@ find_it xmessage append \

"[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}" find_it import append "[exec] (${SCREENSHOT} - JPG) {import screenshot.jpg && display -resize 50% screenshot.jpg}" find_it import append "[exec] (${SCREENSHOT} - PNG) {import screenshot.png && display -resize 50% screenshot.png}" - find_it ${LAUNCHER} append "[exec] (${RUNCOMMAND}) {${LAUNCHER} $FBRUNOPTIONS}" + find_it ${LAUNCHER} append "[exec] (${RUNCOMMAND}) {$LAUNCHER_CMD}" find_it switch append "[exec] (gtk-theme-switch) {switch}" find_it switch2 append "[exec] (gtk2-theme-switch) {switch2}" - find_it @pkgprefix@fluxbox-generate_menu@pkgsuffix@ append "[exec] (${REGENERATEMENU}) {@pkgprefix@fluxbox-generate_menu@pkgsuffix@ ${BACKUPOPTIONS}}" + find_it @pkgprefix@fluxbox-generate_menu@pkgsuffix@ append "[exec] (${REGENERATEMENU}) {$FBGM_CMD}" append_menu_end append_submenu "${WINDOWMANAGERS}"