aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-10 12:14:35 (GMT)
committerfluxgen <fluxgen>2003-06-10 12:14:35 (GMT)
commit70f4c49f297f2133ac6f1d17b017eca4ad399ee9 (patch)
tree882f9d083d1fef7df0bd294d6c6d9b6ce8ba0412
parent8d3bd5be1d33744f39c22d847a33ebedf0e4094e (diff)
downloadfluxbox-70f4c49f297f2133ac6f1d17b017eca4ad399ee9.zip
fluxbox-70f4c49f297f2133ac6f1d17b017eca4ad399ee9.tar.bz2
update from Han
-rwxr-xr-xutil/fluxbox-generate_menu107
1 files changed, 79 insertions, 28 deletions
diff --git a/util/fluxbox-generate_menu b/util/fluxbox-generate_menu
index c9177cf..0de3881 100755
--- a/util/fluxbox-generate_menu
+++ b/util/fluxbox-generate_menu
@@ -22,7 +22,7 @@
22# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23# DEALINGS IN THE SOFTWARE. 23# DEALINGS IN THE SOFTWARE.
24# 24#
25# $Id: fluxbox-generate_menu,v 1.36 2003/06/06 02:18:34 rathnor Exp $ 25# $Id: fluxbox-generate_menu,v 1.37 2003/06/10 12:14:35 fluxgen Exp $
26 26
27# 27#
28# Portability notes: 28# Portability notes:
@@ -100,18 +100,27 @@ EOF
100} 100}
101 101
102# ugly code for solaris compat. 102# ugly code for solaris compat.
103find_it() { 103case $(uname) in
104 file=`which $1 2> /dev/null` 104 Linux|*BSD)
105 if [ -x "$file" ]; then 105 find_it() {
106 if [ $# -gt 1 ]; then 106 which $1 > /dev/null 2>&1 && shift && $*
107 shift 107 }
108 $* 108 ;;
109 fi 109 *)
110 return 0 110 find_it() {
111 else 111 file=`which $1 2> /dev/null`
112 return 1 112 if [ -x "$file" ]; then
113 fi 113 if [ $# -gt 1 ]; then
114} 114 shift
115 $*
116 fi
117 return 0
118 else
119 return 1
120 fi
121 }
122 ;;
123esac
115 124
116append() { 125append() {
117 echo " $*" >> ${FILENAME} 126 echo " $*" >> ${FILENAME}
@@ -189,6 +198,7 @@ SYSTEMSTYLES='System Styles'
189TERMINALMENU='Terminals' 198TERMINALMENU='Terminals'
190USERSTYLES='User Styles' 199USERSTYLES='User Styles'
191VIDEOMENU='Video' 200VIDEOMENU='Video'
201WINDOWMANAGERS='Window Managers'
192WORKSPACEMENU='Workspace List' 202WORKSPACEMENU='Workspace List'
193XUTILSMENU='X-utils' 203XUTILSMENU='X-utils'
194 204
@@ -201,6 +211,7 @@ case ${LC_ALL} in
201 #OFFICEMENU='Office' 211 #OFFICEMENU='Office'
202 #SYSTEMSTYLES='óÔÉÌÉ' 212 #SYSTEMSTYLES='óÔÉÌÉ'
203 #USERSTYLES='óÔÉÌÉ' 213 #USERSTYLES='óÔÉÌÉ'
214 #WINDOWMANAGERS='WindowManagers'
204 BROWSERMENU='âÒÁÕÚÅÒÙ' 215 BROWSERMENU='âÒÁÕÚÅÒÙ'
205 CONFIGUREMENU='îÁÓÔÒÏÊËÁ' 216 CONFIGUREMENU='îÁÓÔÒÏÊËÁ'
206 EDITORMENU='òÅÄÁËÔÏÒÙ' 217 EDITORMENU='òÅÄÁËÔÏÒÙ'
@@ -220,6 +231,7 @@ case ${LC_ALL} in
220 XUTILSMENU='X-ÕÔÉÌÉÔÙ' 231 XUTILSMENU='X-ÕÔÉÌÉÔÙ'
221 ;; 232 ;;
222 de_DE*) # german locales 233 de_DE*) # german locales
234 #WINDOWMANAGERS='Window Managers'
223 BACKGROUNDMENU='Hintergrundbilder' 235 BACKGROUNDMENU='Hintergrundbilder'
224 BACKGROUNDMENUTITLE='Hintergrundbild setzen' 236 BACKGROUNDMENUTITLE='Hintergrundbild setzen'
225 BROWSERMENU='Internet-Browser' 237 BROWSERMENU='Internet-Browser'
@@ -251,6 +263,7 @@ case ${LC_ALL} in
251 #OFFICEMENU='Office' 263 #OFFICEMENU='Office'
252 #SYSTEMSTYLES='Stiler' 264 #SYSTEMSTYLES='Stiler'
253 #USERSTYLES='Stiler' 265 #USERSTYLES='Stiler'
266 #WINDOWMANAGERS='Window Managers'
254 BROWSERMENU='Browsers' 267 BROWSERMENU='Browsers'
255 CONFIGUREMENU='Konfiguration' 268 CONFIGUREMENU='Konfiguration'
256 EDITORMENU='Editorer' 269 EDITORMENU='Editorer'
@@ -291,6 +304,7 @@ case ${LC_ALL} in
291 SYSTEMSTYLES='Systeem Stylen' 304 SYSTEMSTYLES='Systeem Stylen'
292 TERMINALMENU='Terminals' 305 TERMINALMENU='Terminals'
293 USERSTYLES='Gebruikers Stylen' 306 USERSTYLES='Gebruikers Stylen'
307 WINDOWMANAGERS='Window Managers'
294 WORKSPACEMENU='Werkveld Lijst' 308 WORKSPACEMENU='Werkveld Lijst'
295 XUTILSMENU='X-utils' 309 XUTILSMENU='X-utils'
296 ;; 310 ;;
@@ -301,6 +315,7 @@ case ${LC_ALL} in
301 #OFFICEMENU='Office' 315 #OFFICEMENU='Office'
302 #SYSTEMSTYLES='Tyylit' 316 #SYSTEMSTYLES='Tyylit'
303 #USERSTYLES='Tyylit' 317 #USERSTYLES='Tyylit'
318 #WINDOWMANAGERS='Window Managers'
304 BROWSERMENU='Selaimet' 319 BROWSERMENU='Selaimet'
305 CONFIGUREMENU='Konfigurointi' 320 CONFIGUREMENU='Konfigurointi'
306 EDITORMENU='Editorit' 321 EDITORMENU='Editorit'
@@ -326,6 +341,7 @@ case ${LC_ALL} in
326 #OFFICEMENU='Office' 341 #OFFICEMENU='Office'
327 #SYSTEMSTYLES='¥¹¥¿¥¤¥ë' 342 #SYSTEMSTYLES='¥¹¥¿¥¤¥ë'
328 #USERSTYLES='¥¹¥¿¥¤¥ë' 343 #USERSTYLES='¥¹¥¿¥¤¥ë'
344 #WINDOWMANAGERS='Window Managers'
329 BROWSERMENU='¥Ö¥é¥¦¥¶' 345 BROWSERMENU='¥Ö¥é¥¦¥¶'
330 CONFIGUREMENU='ÀßÄê' 346 CONFIGUREMENU='ÀßÄê'
331 EDITORMENU='¥¨¥Ç¥£¥¿' 347 EDITORMENU='¥¨¥Ç¥£¥¿'
@@ -350,7 +366,8 @@ case ${LC_ALL} in
350 #FILEUTILSMENU='File utils' 366 #FILEUTILSMENU='File utils'
351 #OFFICEMENU='Office' 367 #OFFICEMENU='Office'
352 #SYSTEMSTYLES='Styles de la Systeme' 368 #SYSTEMSTYLES='Styles de la Systeme'
353 #USERSTYLES='Styles de la ' 369 #USERSTYLES='Styles de la'
370 #WINDOWMANAGERS='Window Managers'
354 BROWSERMENU='Navigateurs' 371 BROWSERMENU='Navigateurs'
355 CONFIGUREMENU='Configurer' 372 CONFIGUREMENU='Configurer'
356 EDITORMENU='Editeurs' 373 EDITORMENU='Editeurs'
@@ -376,6 +393,7 @@ case ${LC_ALL} in
376 #OFFICEMENU='Office' 393 #OFFICEMENU='Office'
377 #SYSTEMSTYLES='Stile' 394 #SYSTEMSTYLES='Stile'
378 #USERSTYLES='Stile' 395 #USERSTYLES='Stile'
396 #WINDOWMANAGERS='Window Managers'
379 BROWSERMENU='Browsers' 397 BROWSERMENU='Browsers'
380 CONFIGUREMENU='Configurazione' 398 CONFIGUREMENU='Configurazione'
381 EDITORMENU='Editori' 399 EDITORMENU='Editori'
@@ -399,6 +417,7 @@ case ${LC_ALL} in
399 #FILEUTILSMENU='File utils' 417 #FILEUTILSMENU='File utils'
400 #OFFICEMENU='Office' 418 #OFFICEMENU='Office'
401 #RESTARTITEM='Restart' 419 #RESTARTITEM='Restart'
420 #WINDOWMANAGERS='WindowManagers'
402 BACKGROUNDMENU='Fundaluri' 421 BACKGROUNDMENU='Fundaluri'
403 BACKGROUNDMENUTITLE='Alege fundalul' 422 BACKGROUNDMENUTITLE='Alege fundalul'
404 BROWSERMENU='Navigatoare' 423 BROWSERMENU='Navigatoare'
@@ -424,6 +443,7 @@ case ${LC_ALL} in
424 ;; 443 ;;
425 es_ES*) # spanish locales 444 es_ES*) # spanish locales
426 #FILEUTILSMENU='File utils' 445 #FILEUTILSMENU='File utils'
446 #WINDOWMANAGERS='WindowManagers'
427 BACKGROUNDMENU='Fondos' 447 BACKGROUNDMENU='Fondos'
428 BACKGROUNDMENUTITLE='Seleccionar Fondo' 448 BACKGROUNDMENUTITLE='Seleccionar Fondo'
429 BROWSERMENU='Navegadores' 449 BROWSERMENU='Navegadores'
@@ -451,6 +471,7 @@ case ${LC_ALL} in
451 ;; 471 ;;
452 pl_PL*) # Polish locales 472 pl_PL*) # Polish locales
453 #FILEUTILSMENU='File utils' 473 #FILEUTILSMENU='File utils'
474 #WINDOWMANAGERS='WindowManagers'
454 BACKGROUNDMENU='Tapety' 475 BACKGROUNDMENU='Tapety'
455 BACKGROUNDMENUTITLE='Ustaw tapet?' 476 BACKGROUNDMENUTITLE='Ustaw tapet?'
456 BROWSERMENU='Przegl?darki' 477 BROWSERMENU='Przegl?darki'
@@ -508,6 +529,19 @@ if [ ! "${INSTALL}" = "Yes" ];then
508# Name of the outputfile 529# Name of the outputfile
509# FILENAME=${HOME}/.fluxbox/menu 530# FILENAME=${HOME}/.fluxbox/menu
510 531
532# MENUTITLE=\`fluxbox -version|cut -d " " -f-2\`
533
534# standard url for console-browsers
535# HOMEPAGE=fluxbox.org
536
537# location with your own menu-entries
538# USERMENU=~/.fluxbox/usermenu
539
540# --- Datadirs
541# These are datadirs; So if fluxbox data is installed in
542# /usr/share/fluxbox
543# your datadir is: /usr/share
544
511# Data-dir 545# Data-dir
512# PKGDATADIR=/usr/share 546# PKGDATADIR=/usr/share
513 547
@@ -518,21 +552,12 @@ if [ ! "${INSTALL}" = "Yes" ];then
518# Kde data-dir 552# Kde data-dir
519# KPKGDATADIR=/opt/kde/share 553# KPKGDATADIR=/opt/kde/share
520 554
521# MENUTITLE=\`fluxbox -version|cut -d " " -f-2\`
522
523# standard url for console-browsers
524# HOMEPAGE=fluxbox.org
525
526# location with your own menu-entries
527# USERMENU=~/.fluxbox/usermenu
528
529# Sepparate the list of background-dirs with semicolumns ':' 555# Sepparate the list of background-dirs with semicolumns ':'
530# BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:/usr/local/share/fluxbox/backgrounds/:/usr/share/wallpapers" 556# BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:/usr/local/share/fluxbox/backgrounds/:/usr/share/wallpapers"
531 557
532
533# --- Boolean variables. 558# --- Boolean variables.
534# Setting a variable to no won't help. Comment them out if you don't want them. 559# Setting a variable to ``no'' won't help. Comment them out if you don't
535# Setting are overruled by the command-line options. 560# want them. Setting are overruled by the command-line options.
536 561
537# Include all backgrounds in your backgrounds-directory 562# Include all backgrounds in your backgrounds-directory
538# BACKGROUNDMENUITEM=yes 563# BACKGROUNDMENUITEM=yes
@@ -763,7 +788,7 @@ append_submenu "${MULTIMEDIAMENU}"
763 788
764 append_submenu "${MUSICMENU}" 789 append_submenu "${MUSICMENU}"
765 normal_find xmms noatun alsaplayer gqmpeg aumix xmixer gmix kmix grecord \ 790 normal_find xmms noatun alsaplayer gqmpeg aumix xmixer gmix kmix grecord \
766 kmidi xplaycd soundtracker grip easytag audacity zinf 791 kmidi xplaycd soundtracker grip easytag audacity zinf rhythmbox
767 find_it cdcd append "[exec] (cdcd) {${DEFAULT_TERM} -e cdcd}" 792 find_it cdcd append "[exec] (cdcd) {${DEFAULT_TERM} -e cdcd}"
768 find_it cplay append "[exec] (cplay) {${DEFAULT_TERM} -e cplay}" 793 find_it cplay append "[exec] (cplay) {${DEFAULT_TERM} -e cplay}"
769 find_it alsamixer append "[exec] (AlsaMixer) {${DEFAULT_TERM} -e alsamixer}" 794 find_it alsamixer append "[exec] (AlsaMixer) {${DEFAULT_TERM} -e alsamixer}"
@@ -890,7 +915,7 @@ append_submenu "${FBSETTINGSMENU}"
890 append_menu_end 915 append_menu_end
891 else 916 else
892 echo "Warning: You wanted a background-menu but I couldn't find any backgrounds in: 917 echo "Warning: You wanted a background-menu but I couldn't find any backgrounds in:
893 $BACKGROUND_DIRS" 918 $BACKGROUND_DIRS" >&2
894 fi 919 fi
895 fi 920 fi
896 921
@@ -905,7 +930,33 @@ append_submenu "${FBSETTINGSMENU}"
905 "[exec] (Windowname) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}" 930 "[exec] (Windowname) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
906 find_it import append "[exec] (screenshot) {import screenshot.png && qiv -W 50 screenshot.png}" 931 find_it import append "[exec] (screenshot) {import screenshot.png && qiv -W 50 screenshot.png}"
907 find_it fbrun append "[exec] (Run) {fbrun}" 932 find_it fbrun append "[exec] (Run) {fbrun}"
908 find_it fluxbox-generate_menu append "[exec] (Regen menu) {fluxbox-generate_menu}" 933 find_it fluxbox-generate_menu append "[exec] (regenerate menu) {fluxbox-generate_menu}"
934 append_menu_end
935
936 append_submenu ${WINDOWMANAGERS}
937 find_it starticewm append "[restart] (icewm) {starticewm}" ||\
938 find_it icewm append "[restart] (icewm) {icewm}"
939 find_it ion append "[restart] (ion) {ion}"
940 find_it startkde append "[restart] (kde) {startkde}"
941 find_it startsawfish append "[restart] (sawfish) {startsawfish}" ||\
942 find_it sawfish append "[restart] (sawfish) {sawfish}"
943 find_it startgnome append "[restart] (gnome) {startgnome}" ||\
944 find_it gnome-session append "[restart] (gnome) {gnome-session}"
945 find_it startwindowmaker append "[restart] (windowmaker) {startwindowmaker}" ||\
946 find_it wmaker append "[restart] (windowmaker) {wmaker}"
947 find_it startenlightenment append "[restart] (enlightenment) {startenlightenment}" ||\
948 find_it enlightenment append "[restart] (enlightenment) {enlightenment}"
949 find_it startafterstep append "[restart] (afterstep) {startafterstep}" ||\
950 find_it afterstep append "[restart] (afterstep) {afterstep}"
951 find_it startopenbox append "[restart] (openbox) {startopenbox}" ||\
952 find_it openbox append "[restart] (openbox) {openbox}"
953 find_it startevilwm append "[restart] (evilwm) {startevilwm}" ||\
954 find_it evilwm append "[restart] (evilwm) {evilwm}"
955 find_it startwaimea append "[restart] (waimea) {startwaimea}" ||\
956 find_it waimea append "[restart] (waimea) {waimea}"
957 find_it startxfce append "[restart] (xfce) {startxfce}"
958 find_it startpekwm append "[restart] (pekwm) {startpekwm}" ||\
959 find_it pekwm append "[restart] (pekwm) {pekwm}"
909 append_menu_end 960 append_menu_end
910 961
911 append "[reconfig] (${RELOADITEM})" 962 append "[reconfig] (${RELOADITEM})"