diff options
author | fluxgen <fluxgen> | 2002-12-14 23:58:13 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-14 23:58:13 (GMT) |
commit | 6d4454c38628cd63731dfb9ec85dfdb9762aabd7 (patch) | |
tree | 3cc2cd31f3733a4f2fdd5777216a404507708734 | |
parent | 8b72901ee650813bbf5200f368d5efe7816048ed (diff) | |
download | fluxbox_paul-6d4454c38628cd63731dfb9ec85dfdb9762aabd7.zip fluxbox_paul-6d4454c38628cd63731dfb9ec85dfdb9762aabd7.tar.bz2 |
background option - Han
-rwxr-xr-x | util/fluxbox-generate_menu | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/util/fluxbox-generate_menu b/util/fluxbox-generate_menu index a3c6860..a3a8991 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.16 2002/12/14 08:27:54 fluxgen Exp $ | 25 | # $Id: fluxbox-generate_menu,v 1.17 2002/12/14 23:58:13 fluxgen Exp $ |
26 | 26 | ||
27 | WHOAMI=`whoami` | 27 | WHOAMI=`whoami` |
28 | [ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin | 28 | [ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin |
@@ -37,6 +37,8 @@ Options: | |||
37 | 37 | ||
38 | -k Insert a kde menu | 38 | -k Insert a kde menu |
39 | -g Add a gnome menu | 39 | -g Add a gnome menu |
40 | -B enable backgroundmenu | ||
41 | |||
40 | -m Menu-title; default is "Fluxbox" | 42 | -m Menu-title; default is "Fluxbox" |
41 | -r Don't remove empty menu-entries; Better for templates. | 43 | -r Don't remove empty menu-entries; Better for templates. |
42 | -o Outputfile; default is ~/.fluxbox/menu | 44 | -o Outputfile; default is ~/.fluxbox/menu |
@@ -44,6 +46,7 @@ Options: | |||
44 | -b Favourite browser | 46 | -b Favourite browser |
45 | -w Homepage for console-browsers. Default is fluxbox.org. | 47 | -w Homepage for console-browsers. Default is fluxbox.org. |
46 | 48 | ||
49 | |||
47 | -h Display this help | 50 | -h Display this help |
48 | -a Display the authors of this script | 51 | -a Display the authors of this script |
49 | 52 | ||
@@ -94,7 +97,7 @@ find_it() { | |||
94 | } | 97 | } |
95 | 98 | ||
96 | append() { | 99 | append() { |
97 | echo " $*" >> ${FILENAME} | 100 | echo " $*" >> ${FILENAME} |
98 | } | 101 | } |
99 | 102 | ||
100 | append_menu() { | 103 | append_menu() { |
@@ -150,8 +153,9 @@ mv -f ${FILENAME}.tmp ${FILENAME} | |||
150 | options="$@" | 153 | options="$@" |
151 | 154 | ||
152 | # Get options. | 155 | # Get options. |
153 | while getopts ":khragb:t:p:w:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do | 156 | while getopts ":Bkhragb:t:p:w:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do |
154 | case "${COMMAND_LINE_ARGUMENT}" in | 157 | case "${COMMAND_LINE_ARGUMENT}" in |
158 | B) BACKGROUNDMENUITEM=yes ;; | ||
155 | k) KDEMENU=yes ;; | 159 | k) KDEMENU=yes ;; |
156 | g) GNOMEMENU=yes ;; | 160 | g) GNOMEMENU=yes ;; |
157 | t) MY_TERM=${OPTARG};; | 161 | t) MY_TERM=${OPTARG};; |
@@ -261,6 +265,8 @@ fi | |||
261 | 265 | ||
262 | 266 | ||
263 | # menu defaults (if translation forget to set one of them) | 267 | # menu defaults (if translation forget to set one of them) |
268 | BACKGROUNDMENU="Backgrounds" | ||
269 | BACKGROUNDMENUTITLE="Set the Background" | ||
264 | BROWSERMENU="Browsers" | 270 | BROWSERMENU="Browsers" |
265 | CONFIGUREMENU="Configure" | 271 | CONFIGUREMENU="Configure" |
266 | EDITORMENU="Editors" | 272 | EDITORMENU="Editors" |
@@ -287,6 +293,8 @@ XUTILSMENU="X-utils" | |||
287 | case ${LC_ALL} in | 293 | case ${LC_ALL} in |
288 | ru_RU*) #Russian locales | 294 | ru_RU*) #Russian locales |
289 | #OFFICEMENU="Office" | 295 | #OFFICEMENU="Office" |
296 | #BACKGROUNDMENU="Backgrounds" | ||
297 | #BACKGROUNDMENUTITLE="Set the Background" | ||
290 | BROWSERMENU="âÒÁÕÚÅÒÙ" | 298 | BROWSERMENU="âÒÁÕÚÅÒÙ" |
291 | CONFIGUREMENU="îÁÓÔÒÏÊËÁ" | 299 | CONFIGUREMENU="îÁÓÔÒÏÊËÁ" |
292 | EDITORMENU="òÅÄÁËÔÏÒÙ" | 300 | EDITORMENU="òÅÄÁËÔÏÒÙ" |
@@ -308,6 +316,8 @@ case ${LC_ALL} in | |||
308 | ;; | 316 | ;; |
309 | sv_SE*) #Swedish locales | 317 | sv_SE*) #Swedish locales |
310 | #OFFICEMENU="Office" | 318 | #OFFICEMENU="Office" |
319 | #BACKGROUNDMENU="Backgrounds" | ||
320 | #BACKGROUNDMENUTITLE="Set the Background" | ||
311 | BROWSERMENU="Browsers" | 321 | BROWSERMENU="Browsers" |
312 | CONFIGUREMENU="Konfiguration" | 322 | CONFIGUREMENU="Konfiguration" |
313 | EDITORMENU="Editorer" | 323 | EDITORMENU="Editorer" |
@@ -329,6 +339,8 @@ case ${LC_ALL} in | |||
329 | ;; | 339 | ;; |
330 | nl_NL*) #Nederlandse locales | 340 | nl_NL*) #Nederlandse locales |
331 | #OFFICEMENU="Office" | 341 | #OFFICEMENU="Office" |
342 | #BACKGROUNDMENU="Achtergrond" | ||
343 | #BACKGROUNDMENUTITLE="Kies een achtergrond" | ||
332 | BROWSERMENU="Browsers" | 344 | BROWSERMENU="Browsers" |
333 | CONFIGUREMENU="Instellingen" | 345 | CONFIGUREMENU="Instellingen" |
334 | EDITORMENU="Editors" | 346 | EDITORMENU="Editors" |
@@ -340,16 +352,18 @@ case ${LC_ALL} in | |||
340 | MISCMENU="Onregelmatig" | 352 | MISCMENU="Onregelmatig" |
341 | MUSICMENU="Muziek" | 353 | MUSICMENU="Muziek" |
342 | NETMENU="Net" | 354 | NETMENU="Net" |
343 | RELOADITEM="Vernieuwen" | 355 | RELOADITEM="Vernieuw instellingen" |
344 | RESTARTITEM="Restart" | 356 | RESTARTITEM="Restart" |
345 | STYLEMENU="Stylen" | 357 | STYLEMENU="Stylen" |
346 | STYLEMENUTITLE="Kies een styl..." | 358 | STYLEMENUTITLE="Kies een styl" |
347 | TERMINALMENU="Terminals" | 359 | TERMINALMENU="Terminals" |
348 | WORKSPACEMENU="Werkveld Lijst" | 360 | WORKSPACEMENU="Werkveld Lijst" |
349 | XUTILSMENU="X-utils" | 361 | XUTILSMENU="X-utils" |
350 | ;; | 362 | ;; |
351 | fi_FI*) #Finnish locales | 363 | fi_FI*) #Finnish locales |
352 | #OFFICEMENU="Office" | 364 | #OFFICEMENU="Office" |
365 | #BACKGROUNDMENU="Backgrounds" | ||
366 | #BACKGROUNDMENUTITLE="Set the Background" | ||
353 | BROWSERMENU="Selaimet" | 367 | BROWSERMENU="Selaimet" |
354 | CONFIGUREMENU="Konfigurointi" | 368 | CONFIGUREMENU="Konfigurointi" |
355 | EDITORMENU="Editorit" | 369 | EDITORMENU="Editorit" |
@@ -371,6 +385,8 @@ case ${LC_ALL} in | |||
371 | ;; | 385 | ;; |
372 | ja_JP*) #Japanese locales | 386 | ja_JP*) #Japanese locales |
373 | #OFFICEMENU="Office" | 387 | #OFFICEMENU="Office" |
388 | #BACKGROUNDMENU="Backgrounds" | ||
389 | #BACKGROUNDMENUTITLE="Set the Background" | ||
374 | BROWSERMENU="¥Ö¥é¥¦¥¶" | 390 | BROWSERMENU="¥Ö¥é¥¦¥¶" |
375 | CONFIGUREMENU="ÀßÄê" | 391 | CONFIGUREMENU="ÀßÄê" |
376 | EDITORMENU="¥¨¥Ç¥£¥¿" | 392 | EDITORMENU="¥¨¥Ç¥£¥¿" |
@@ -392,6 +408,8 @@ case ${LC_ALL} in | |||
392 | ;; | 408 | ;; |
393 | fr_FR*) # french locales | 409 | fr_FR*) # french locales |
394 | #OFFICEMENU="Office" | 410 | #OFFICEMENU="Office" |
411 | #BACKGROUNDMENU="Backgrounds" | ||
412 | #BACKGROUNDMENUTITLE="Set the Background" | ||
395 | BROWSERMENU="Navigateurs" | 413 | BROWSERMENU="Navigateurs" |
396 | CONFIGUREMENU="Configurer" | 414 | CONFIGUREMENU="Configurer" |
397 | EDITORMENU="Editeurs" | 415 | EDITORMENU="Editeurs" |
@@ -413,6 +431,8 @@ case ${LC_ALL} in | |||
413 | ;; | 431 | ;; |
414 | it_IT*) # italian locales | 432 | it_IT*) # italian locales |
415 | #OFFICEMENU="Office" | 433 | #OFFICEMENU="Office" |
434 | #BACKGROUNDMENU="Backgrounds" | ||
435 | #BACKGROUNDMENUTITLE="Set the Background" | ||
416 | BROWSERMENU="Browsers" | 436 | BROWSERMENU="Browsers" |
417 | CONFIGUREMENU="Configurazione" | 437 | CONFIGUREMENU="Configurazione" |
418 | EDITORMENU="Editori" | 438 | EDITORMENU="Editori" |
@@ -584,9 +604,16 @@ fi | |||
584 | append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}" | 604 | append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}" |
585 | append "[stylesdir] (${PKGDATADIR}/fluxbox/styles)" | 605 | append "[stylesdir] (${PKGDATADIR}/fluxbox/styles)" |
586 | append "[stylesdir] (~/.fluxbox/styles)" | 606 | append "[stylesdir] (~/.fluxbox/styles)" |
587 | |||
588 | append_menu_end | 607 | append_menu_end |
589 | 608 | ||
609 | if [ $BACKGROUNDMENUITEM="yes" ];then | ||
610 | append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" | ||
611 | for i in ~/.fluxbox/backgrounds/* ; do | ||
612 | append "[exec] (`basename "$i"`) {bsetbg -f $i }" | ||
613 | done | ||
614 | append_menu_end | ||
615 | fi | ||
616 | |||
590 | append "[workspaces] (${WORKSPACEMENU})" | 617 | append "[workspaces] (${WORKSPACEMENU})" |
591 | 618 | ||
592 | append_submenu Tools | 619 | append_submenu Tools |
@@ -600,7 +627,7 @@ fi | |||
600 | find_it xmessage append \ | 627 | find_it xmessage append \ |
601 | "[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}" | 628 | "[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}" |
602 | find_it fbrun append "[exec] (Run) {fbrun}" | 629 | find_it fbrun append "[exec] (Run) {fbrun}" |
603 | find_it fluxbox-generate_menu append "[exec] (Regen menu) {fluxbox-generate_menu $options}" | 630 | find_it fluxbox-generate_menu append "[exec] (Regen menu) {fluxbox-generate_menu $options}" |
604 | append_menu_end | 631 | append_menu_end |
605 | 632 | ||
606 | append "[reconfig] (${RELOADITEM})" | 633 | append "[reconfig] (${RELOADITEM})" |