aboutsummaryrefslogtreecommitdiff
path: root/data/fluxbox-generate_menu
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-05-24 13:19:45 (GMT)
committerfluxgen <fluxgen>2002-05-24 13:19:45 (GMT)
commite4b63778369c461980720bf345e95eb8e13579c2 (patch)
treeff7a5b61ad70399928f65b97369ab373f6d66f7e /data/fluxbox-generate_menu
parent0b1e5a15dc42cb66fdcc3c381f4b3de4e14f68e5 (diff)
downloadfluxbox_paul-e4b63778369c461980720bf345e95eb8e13579c2.zip
fluxbox_paul-e4b63778369c461980720bf345e95eb8e13579c2.tar.bz2
fixed so it runs on SunOS
Diffstat (limited to 'data/fluxbox-generate_menu')
-rwxr-xr-xdata/fluxbox-generate_menu31
1 files changed, 21 insertions, 10 deletions
diff --git a/data/fluxbox-generate_menu b/data/fluxbox-generate_menu
index 8b0fc30..6f40320 100755
--- a/data/fluxbox-generate_menu
+++ b/data/fluxbox-generate_menu
@@ -69,21 +69,21 @@ find_it() {
69} 69}
70 70
71append() { 71append() {
72 echo " $*" >> $FILENAME 72 echo " $*" >> ${FILENAME}
73} 73}
74 74
75append_menu() { 75append_menu() {
76 echo "$*" >> $FILENAME 76 echo "$*" >> ${FILENAME}
77} 77}
78 78
79append_submenu() { 79append_submenu() {
80 echo >> $FILENAME 80 echo >> ${FILENAME}
81 append_menu "[submenu] ($1)" 81 append_menu "[submenu] ($1)"
82} 82}
83 83
84append_menu_end() { 84append_menu_end() {
85 append_menu "[end]" 85 append_menu "[end]"
86 echo >> $FILENAME 86 echo >> ${FILENAME}
87} 87}
88 88
89menu_entry() { 89menu_entry() {
@@ -150,19 +150,30 @@ done
150# Set Defaults 150# Set Defaults
151 151
152# menufile name and make a backup 152# menufile name and make a backup
153[ ! $FILENAME ] && FILENAME=~/.fluxbox/menu 153if [ -z ${FILENAME} ]; then
154[ -e $FILENAME ] && cp -f $FILENAME ${FILENAME}.bak 154 FILENAME=~/.fluxbox/menu
155fi
156
157if [ ! -z ${FILENAME} ]; then
158 if [ -w ${FILENAME} ]; then
159 cp -f ${FILENAME} ${FILENAME}.bak
160 fi
161fi
155 162
156#packagedatadir 163#packagedatadir
157[ ! $PKGDATADIR ] && PKGDATADIR=/usr/share 164if [ -z "${PKGDATADIR}" ]; then
165 PKGDATADIR=/usr/share
166fi
158 167
159# menutitle 168# menutitle
160[ ! $MENUTITLE ] && MENUTITLE="Fluxbox" 169if [ -z "${MENUTITLE}" ]; then
170 MENUTITLE="Fluxbox"
171fi
161 172
162 173
163# Start of menu 174# Start of menu
164 175
165echo "[begin] ($MENUTITLE)" > $FILENAME 176echo "[begin] ($MENUTITLE)" > ${FILENAME}
166 177
167find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}" 178find_it xterm append "[exec] (xterm) {xterm -fg white -bg black}"
168find_it nedit append "[exec] (nedit) {nedit}" 179find_it nedit append "[exec] (nedit) {nedit}"
@@ -298,7 +309,7 @@ if [ -d $PKGDATADIR/applnk/ ] && [ $KDEMENU ]; then
298fi 309fi
299 310
300 311
301append_submenu Settings 312append_submenu FB-Settings
302 append "[workspaces] (Workspace List)" 313 append "[workspaces] (Workspace List)"
303 314
304 append_menu "[submenu] (Styles) {Choose a style...}" 315 append_menu "[submenu] (Styles) {Choose a style...}"