aboutsummaryrefslogtreecommitdiff
path: root/util/fluxbox-generate_menu.in
diff options
context:
space:
mode:
authorslakmagik <slakmagik@gmail.com>2011-03-29 03:21:15 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-03-29 06:44:51 (GMT)
commita8583b79ae3cc1e5bc52df5a46fd341c1bdab22f (patch)
treee48fbc2cca1252e96658df6842e581dc9a207c4c /util/fluxbox-generate_menu.in
parent0fbb2cb73cee7a28c9f9ac2ec52f221cc53febef (diff)
downloadfluxbox-a8583b79ae3cc1e5bc52df5a46fd341c1bdab22f.zip
fluxbox-a8583b79ae3cc1e5bc52df5a46fd341c1bdab22f.tar.bz2
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.
Diffstat (limited to 'util/fluxbox-generate_menu.in')
-rwxr-xr-xutil/fluxbox-generate_menu.in18
1 files changed, 15 insertions, 3 deletions
diff --git a/util/fluxbox-generate_menu.in b/util/fluxbox-generate_menu.in
index 6e5b7a8..58b9da5 100755
--- a/util/fluxbox-generate_menu.in
+++ b/util/fluxbox-generate_menu.in
@@ -1314,6 +1314,11 @@ EOF
1314fi 1314fi
1315 1315
1316BACKUPOPTIONS=$@ 1316BACKUPOPTIONS=$@
1317if [ -n "$BACKUPOPTIONS" ]; then
1318 FBGM_CMD="@pkgprefix@fluxbox-generate_menu@pkgsuffix@ $BACKUPOPTIONS"
1319else
1320 FBGM_CMD=@pkgprefix@fluxbox-generate_menu@pkgsuffix@
1321fi
1317# Get options. 1322# Get options.
1318while [ $# -gt 0 ]; do 1323while [ $# -gt 0 ]; do
1319 case "$1" in 1324 case "$1" in
@@ -1530,6 +1535,13 @@ DEFAULT_BROWSERNAME=`basename $DEFAULT_BROWSERNAME`
1530if [ -z "$LAUNCHER" ]; then 1535if [ -z "$LAUNCHER" ]; then
1531 LAUNCHER=@pkgprefix@fbrun@pkgsuffix@ 1536 LAUNCHER=@pkgprefix@fbrun@pkgsuffix@
1532fi 1537fi
1538if [ -n "$FBRUNOPTIONS" ]; then
1539 # with this, LAUNCHER should be renamed LAUNCHER_NAME, but then there's
1540 # backwards-compatibility...
1541 LAUNCHER_CMD="$LAUNCHER $FBRUNOPTIONS"
1542else
1543 LAUNCHER_CMD=$LAUNCHER
1544fi
1533 1545
1534# Start of menu 1546# Start of menu
1535cat << EOF > ${MENUFILENAME} 1547cat << EOF > ${MENUFILENAME}
@@ -1570,7 +1582,7 @@ case "$DEFAULT_BROWSERNAME" in
1570 *) append "[exec] ($DEFAULT_BROWSERNAME) {$DEFAULT_BROWSER}" ;; 1582 *) append "[exec] ($DEFAULT_BROWSERNAME) {$DEFAULT_BROWSER}" ;;
1571esac 1583esac
1572 1584
1573find_it "${LAUNCHER}" append "[exec] (${RUNCOMMAND}) {${LAUNCHER} $FBRUNOPTIONS}" 1585find_it "${LAUNCHER}" append "[exec] (${RUNCOMMAND}) {$LAUNCHER_CMD}"
1574 1586
1575 1587
1576append_submenu "${TERMINALMENU}" 1588append_submenu "${TERMINALMENU}"
@@ -1859,10 +1871,10 @@ append_submenu "${FBSETTINGSMENU}"
1859 "[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}" 1871 "[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
1860 find_it import append "[exec] (${SCREENSHOT} - JPG) {import screenshot.jpg && display -resize 50% screenshot.jpg}" 1872 find_it import append "[exec] (${SCREENSHOT} - JPG) {import screenshot.jpg && display -resize 50% screenshot.jpg}"
1861 find_it import append "[exec] (${SCREENSHOT} - PNG) {import screenshot.png && display -resize 50% screenshot.png}" 1873 find_it import append "[exec] (${SCREENSHOT} - PNG) {import screenshot.png && display -resize 50% screenshot.png}"
1862 find_it ${LAUNCHER} append "[exec] (${RUNCOMMAND}) {${LAUNCHER} $FBRUNOPTIONS}" 1874 find_it ${LAUNCHER} append "[exec] (${RUNCOMMAND}) {$LAUNCHER_CMD}"
1863 find_it switch append "[exec] (gtk-theme-switch) {switch}" 1875 find_it switch append "[exec] (gtk-theme-switch) {switch}"
1864 find_it switch2 append "[exec] (gtk2-theme-switch) {switch2}" 1876 find_it switch2 append "[exec] (gtk2-theme-switch) {switch2}"
1865 find_it @pkgprefix@fluxbox-generate_menu@pkgsuffix@ append "[exec] (${REGENERATEMENU}) {@pkgprefix@fluxbox-generate_menu@pkgsuffix@ ${BACKUPOPTIONS}}" 1877 find_it @pkgprefix@fluxbox-generate_menu@pkgsuffix@ append "[exec] (${REGENERATEMENU}) {$FBGM_CMD}"
1866 append_menu_end 1878 append_menu_end
1867 1879
1868 append_submenu "${WINDOWMANAGERS}" 1880 append_submenu "${WINDOWMANAGERS}"