aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-08-18 10:03:02 (GMT)
committerfluxgen <fluxgen>2002-08-18 10:03:02 (GMT)
commit08bbf9377ceb41138e73bb14ec19f66d1788de26 (patch)
tree4d1da871f5bffb5f5ad511960614928b601ade9f
parent9ad48cd5acf4c1035c865fc4b9bf669c393b736a (diff)
downloadfluxbox-08bbf9377ceb41138e73bb14ec19f66d1788de26.zip
fluxbox-08bbf9377ceb41138e73bb14ec19f66d1788de26.tar.bz2
applied patch from Han
-rwxr-xr-xdata/fluxbox-generate_menu62
1 files changed, 13 insertions, 49 deletions
diff --git a/data/fluxbox-generate_menu b/data/fluxbox-generate_menu
index f035ee6..5235a89 100755
--- a/data/fluxbox-generate_menu
+++ b/data/fluxbox-generate_menu
@@ -57,15 +57,7 @@ display_authors () {
57} 57}
58 58
59find_it() { 59find_it() {
60 _it="`which \"$1\" 2>/dev/null | grep \"^/.*$1\"`" 60 which $1 > /dev/null 2> /dev/null && shift && $*
61 if [ ! -z "$_it" ]; then
62 if [ -x "$_it" ]; then
63 shift
64 $*
65 else
66 echo "$1 exists but it is not executable! Check permissions."
67 fi
68 fi
69} 61}
70 62
71append() { 63append() {
@@ -105,45 +97,16 @@ menu_entry_dir() {
105 97
106# Get options. 98# Get options.
107while getopts ":khagp:o:m:" COMMAND_LINE_ARGUMENT ; do 99while getopts ":khagp:o:m:" COMMAND_LINE_ARGUMENT ; do
108 100 case "${COMMAND_LINE_ARGUMENT}" in
109 case "${COMMAND_LINE_ARGUMENT}" in 101 k) KDEMENU=yes ;;
110 102 g) GNOMEMENU=yes ;;
111 k) 103 o) FILENAME=${OPTARG} ;;
112 KDEMENU=yes 104 p) PKGDATADIR=${OPTARG} ;;
113 ;; 105 m) MENUTITLE=${OPTARG} ;;
114 106 h) display_usage ; exit 0 ;;
115 g) 107 a) display_authors ; exit 0 ;;
116 GNOMEMENU=yes 108 *) display_help ; exit 1 ;;
117 ;; 109 esac
118
119 o)
120 FILENAME=${OPTARG}
121 ;;
122
123 p)
124 PKGDATADIR=${OPTARG}
125 ;;
126
127 m)
128 MENUTITLE=${OPTARG}
129 ;;
130
131 h)
132 display_usage
133 exit 0
134 ;;
135
136 a)
137 display_authors
138 exit 0
139 ;;
140
141 *)
142 display_help
143 exit 1
144 ;;
145
146 esac
147done 110done
148 111
149 112
@@ -359,6 +322,7 @@ append_submenu ${NETMENU}
359 find_it mutt append "[exec] (mutt) {xterm -title mutt -fg white -bg black -e mutt}" 322 find_it mutt append "[exec] (mutt) {xterm -title mutt -fg white -bg black -e mutt}"
360 323
361 find_it gftp append "[exec] (gftp) {gftp}" 324 find_it gftp append "[exec] (gftp) {gftp}"
325 find_it pan append "[exec] (pan) {pan}"
362 find_it xchat append "[exec] (xchat) {xchat}" 326 find_it xchat append "[exec] (xchat) {xchat}"
363 find_it irssi append "[exec] (irssi) {xterm -title irssi -e irssi}" 327 find_it irssi append "[exec] (irssi) {xterm -title irssi -e irssi}"
364 find_it BitchX append "[exec] (BitchX) {xterm -title BitchX -fg white -bg black -e BitchX -N}" 328 find_it BitchX append "[exec] (BitchX) {xterm -title BitchX -fg white -bg black -e BitchX -N}"
@@ -471,7 +435,7 @@ append_submenu ${FBSETTINGSMENU}
471 435
472 append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}" 436 append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}"
473 append "[stylesdir] (${PKGDATADIR}/fluxbox/styles)" 437 append "[stylesdir] (${PKGDATADIR}/fluxbox/styles)"
474 append "[stylesdir] (${HOME}/.fluxbox/styles)" 438 append "[stylesdir] (~/.fluxbox/styles)"
475 append_menu_end 439 append_menu_end
476 440
477 append "[config] (${CONFIGUREMENU})" 441 append "[config] (${CONFIGUREMENU})"