diff options
author | mathias <mathias> | 2007-10-07 16:51:52 (GMT) |
---|---|---|
committer | mathias <mathias> | 2007-10-07 16:51:52 (GMT) |
commit | d8455124e80e01214280a0b3fa0e83176f41a2f4 (patch) | |
tree | 0c4576af4dd2521fe7c9106d6527c38d06d357ad | |
parent | e28ed27bd884fdfdda7337443dba8092ae815161 (diff) | |
download | fluxbox_pavel-d8455124e80e01214280a0b3fa0e83176f41a2f4.zip fluxbox_pavel-d8455124e80e01214280a0b3fa0e83176f41a2f4.tar.bz2 |
minor addons to fbgm (patch from Patrik Wenger <paddor at gmail dot com>)
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | util/fluxbox-generate_menu.in | 47 |
2 files changed, 34 insertions, 16 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0.0: | 2 | Changes for 1.0.0: |
3 | *07/10/07: | ||
4 | * minor addons to fbgm (Thanks Patrik Wenger <paddor at gmail dot com>) | ||
5 | util/fluxbox-generate_menu.in | ||
3 | *07/09/30: | 6 | *07/09/30: |
4 | * Removed some old styles ( Henrik ) | 7 | * Removed some old styles ( Henrik ) |
5 | Clean, Cthulhain, Spiff, Carbondioxide, Rampage, Minimal | 8 | Clean, Cthulhain, Spiff, Carbondioxide, Rampage, Minimal |
diff --git a/util/fluxbox-generate_menu.in b/util/fluxbox-generate_menu.in index 732da39..54938be 100755 --- a/util/fluxbox-generate_menu.in +++ b/util/fluxbox-generate_menu.in | |||
@@ -63,7 +63,7 @@ display_usage() { | |||
63 | cat << EOF | 63 | cat << EOF |
64 | Usage: @pkgprefix@fluxbox-generate_menu@pkgsuffix@ [-kgrBh] [-t terminal] [-w url] [-b browser] | 64 | Usage: @pkgprefix@fluxbox-generate_menu@pkgsuffix@ [-kgrBh] [-t terminal] [-w url] [-b browser] |
65 | [-m menu-title] [-o /path] [-u /path] [-p /path] [-n /path] [-q /path] | 65 | [-m menu-title] [-o /path] [-u /path] [-p /path] [-n /path] [-q /path] |
66 | [-d /path ] [-ds] [-i /path] [-is] | 66 | [-d /path ] [-ds] [-i /path] [-is] [-su] |
67 | EOF | 67 | EOF |
68 | } | 68 | } |
69 | 69 | ||
@@ -76,6 +76,7 @@ Options: | |||
76 | -k Insert a kde menu | 76 | -k Insert a kde menu |
77 | -g Add a gnome menu | 77 | -g Add a gnome menu |
78 | -B enable backgrounds menu | 78 | -B enable backgrounds menu |
79 | -su enable sudo commands | ||
79 | -r Don't remove empty menu-entries; for templates | 80 | -r Don't remove empty menu-entries; for templates |
80 | 81 | ||
81 | -d other path(s) to recursively search for *.desktop files | 82 | -d other path(s) to recursively search for *.desktop files |
@@ -531,6 +532,14 @@ cli_find() { | |||
531 | done | 532 | done |
532 | } | 533 | } |
533 | 534 | ||
535 | sudo_find() { | ||
536 | [ "${DOSUDO}" = yes ] || return | ||
537 | while [ "$1" ]; do | ||
538 | find_it $1 append "[exec] ($1 (as root)) {${DEFAULT_TERM} -e sudo $1}" | ||
539 | shift | ||
540 | done | ||
541 | } | ||
542 | |||
534 | clean_up() { | 543 | clean_up() { |
535 | [ -f "$ICONMAPPING" ] && rm -f "$ICONMAPPING" | 544 | [ -f "$ICONMAPPING" ] && rm -f "$ICONMAPPING" |
536 | 545 | ||
@@ -606,7 +615,7 @@ case ${LC_ALL} in | |||
606 | # Ah my Russian hero. Please help me update the translation | 615 | # Ah my Russian hero. Please help me update the translation |
607 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig | 616 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig |
608 | # $ $EDITOR fluxbox-generate-menu.in | 617 | # $ $EDITOR fluxbox-generate-menu.in |
609 | # $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff | 618 | # $ diff -u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff |
610 | # email fbgm.diff to han@mijncomputer.nl | 619 | # email fbgm.diff to han@mijncomputer.nl |
611 | 620 | ||
612 | MENU_ENCODING=KOI8-R | 621 | MENU_ENCODING=KOI8-R |
@@ -733,7 +742,7 @@ case ${LC_ALL} in | |||
733 | # Ah my Swedish hero. Please help me update the translation | 742 | # Ah my Swedish hero. Please help me update the translation |
734 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig | 743 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig |
735 | # $ $EDITOR fluxbox-generate-menu.in | 744 | # $ $EDITOR fluxbox-generate-menu.in |
736 | # $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff | 745 | # $ diff -u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff |
737 | # email fbgm.diff to han@mijncomputer.nl | 746 | # email fbgm.diff to han@mijncomputer.nl |
738 | 747 | ||
739 | MENU_ENCODING=ISO-8859-1 | 748 | MENU_ENCODING=ISO-8859-1 |
@@ -856,7 +865,7 @@ case ${LC_ALL} in | |||
856 | # Ah my Japanese hero. Please help me update the translation | 865 | # Ah my Japanese hero. Please help me update the translation |
857 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig | 866 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig |
858 | # $ $EDITOR fluxbox-generate-menu.in | 867 | # $ $EDITOR fluxbox-generate-menu.in |
859 | # $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff | 868 | # $ diff -u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff |
860 | # email fbgm.diff to han@mijncomputer.nl | 869 | # email fbgm.diff to han@mijncomputer.nl |
861 | 870 | ||
862 | MENU_ENCODING=eucJP | 871 | MENU_ENCODING=eucJP |
@@ -899,7 +908,7 @@ case ${LC_ALL} in | |||
899 | # Ah my french hero. Please help me update the translation | 908 | # Ah my french hero. Please help me update the translation |
900 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig | 909 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig |
901 | # $ $EDITOR fluxbox-generate-menu.in | 910 | # $ $EDITOR fluxbox-generate-menu.in |
902 | # $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff | 911 | # $ diff -u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff |
903 | # email fbgm.diff to han@mijncomputer.nl | 912 | # email fbgm.diff to han@mijncomputer.nl |
904 | 913 | ||
905 | MENU_ENCODING=ISO-8859-15 | 914 | MENU_ENCODING=ISO-8859-15 |
@@ -980,7 +989,7 @@ case ${LC_ALL} in | |||
980 | # Ah my Romanian hero. Please help me update the translation | 989 | # Ah my Romanian hero. Please help me update the translation |
981 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig | 990 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig |
982 | # $ $EDITOR fluxbox-generate-menu.in | 991 | # $ $EDITOR fluxbox-generate-menu.in |
983 | # $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff | 992 | # $ diff -u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff |
984 | # email fbgm.diff to han@mijncomputer.nl | 993 | # email fbgm.diff to han@mijncomputer.nl |
985 | 994 | ||
986 | MENU_ENCODING=ISO-8859-15 | 995 | MENU_ENCODING=ISO-8859-15 |
@@ -1068,7 +1077,7 @@ case ${LC_ALL} in | |||
1068 | # Ah my Russian hero. Please help me update the translation | 1077 | # Ah my Russian hero. Please help me update the translation |
1069 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig | 1078 | # $ cp fluxbox-generate-menu.in fluxbox-generate-menu.in.orig |
1070 | # $ $EDITOR fluxbox-generate-menu.in | 1079 | # $ $EDITOR fluxbox-generate-menu.in |
1071 | # $ diff u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff | 1080 | # $ diff -u fluxbox-generate-menu.in.orig fluxbox-generate-menu.in > fbgm.diff |
1072 | # email fbgm.diff to han@mijncomputer.nl | 1081 | # email fbgm.diff to han@mijncomputer.nl |
1073 | 1082 | ||
1074 | MENU_ENCODING=ISO-8859-2 | 1083 | MENU_ENCODING=ISO-8859-2 |
@@ -1207,6 +1216,7 @@ MENUTITLE="${MENUTITLE:=Fluxbox}" | |||
1207 | HOMEPAGE="${HOMEPAGE:=fluxbox.org}" | 1216 | HOMEPAGE="${HOMEPAGE:=fluxbox.org}" |
1208 | USERMENU="${USERMENU:=${USERFLUXDIR}/usermenu}" | 1217 | USERMENU="${USERMENU:=${USERFLUXDIR}/usermenu}" |
1209 | MENUCONFIG="${MENUCONFIG:=${USERFLUXDIR}/menuconfig}" | 1218 | MENUCONFIG="${MENUCONFIG:=${USERFLUXDIR}/menuconfig}" |
1219 | DOSUDO="no" | ||
1210 | 1220 | ||
1211 | # Read the menuconfig file if it exists or else create it. | 1221 | # Read the menuconfig file if it exists or else create it. |
1212 | # But not during install time, use envvar for sun | 1222 | # But not during install time, use envvar for sun |
@@ -1276,6 +1286,9 @@ if [ ! "${INSTALL}" = Yes ]; then | |||
1276 | # Include gnome-menus | 1286 | # Include gnome-menus |
1277 | # GNOMEMENU=yes | 1287 | # GNOMEMENU=yes |
1278 | 1288 | ||
1289 | # enable sudo commands | ||
1290 | # DOSUDO=yes | ||
1291 | |||
1279 | # Don't cleanup the menu | 1292 | # Don't cleanup the menu |
1280 | # REMOVE=no | 1293 | # REMOVE=no |
1281 | 1294 | ||
@@ -1376,6 +1389,7 @@ while [ $# -gt 0 ]; do | |||
1376 | -m) MENUTITLE=${2}; testoption sk $1 $2; shift 2;; | 1389 | -m) MENUTITLE=${2}; testoption sk $1 $2; shift 2;; |
1377 | -w) HOMEPAGE=${2}; testoption sk $1 $2; shift 2;; | 1390 | -w) HOMEPAGE=${2}; testoption sk $1 $2; shift 2;; |
1378 | -u) USERMENU=${2}; testoption fl $1 $2; shift 2;; | 1391 | -u) USERMENU=${2}; testoption fl $1 $2; shift 2;; |
1392 | -su) DOSUDO=yes; shift;; | ||
1379 | -r) REMOVE=no; shift;; | 1393 | -r) REMOVE=no; shift;; |
1380 | -h) display_help ; exit 0 ;; | 1394 | -h) display_help ; exit 0 ;; |
1381 | -a) display_authors ; exit 0 ;; | 1395 | -a) display_authors ; exit 0 ;; |
@@ -1631,13 +1645,14 @@ append_submenu "${NETMENU}" | |||
1631 | cli_find ncftp pftp ftp lftp yafc | 1645 | cli_find ncftp pftp ftp lftp yafc |
1632 | append_menu_end | 1646 | append_menu_end |
1633 | 1647 | ||
1634 | append_submenu SMB | 1648 | append_submenu SMB |
1635 | normal_find LinNeighborhood jags SambaSentinel | 1649 | normal_find LinNeighborhood jags SambaSentinel |
1636 | append_menu_end | 1650 | append_menu_end |
1637 | 1651 | ||
1638 | append_submenu Portscan | 1652 | append_submenu Analyzer |
1639 | normal_find xnmap nmapfe | 1653 | normal_find xnmap nmapfe wireshark ettercap |
1640 | append_menu_end | 1654 | sudo_find xnmap nmapfe wireshark ettercap |
1655 | append_menu_end | ||
1641 | 1656 | ||
1642 | normal_find x3270 wpa_gui | 1657 | normal_find x3270 wpa_gui |
1643 | 1658 | ||
@@ -1680,7 +1695,7 @@ append_submenu "${MULTIMEDIAMENU}" | |||
1680 | append_submenu "${MUSICMENU}" | 1695 | append_submenu "${MUSICMENU}" |
1681 | normal_find xmms noatun alsaplayer gqmpeg aumix xmixer gnome-alsamixer gmix kmix kscd \ | 1696 | normal_find xmms noatun alsaplayer gqmpeg aumix xmixer gnome-alsamixer gmix kmix kscd \ |
1682 | grecord kmidi xplaycd soundtracker grip easytag audacity \ | 1697 | grecord kmidi xplaycd soundtracker grip easytag audacity \ |
1683 | zinf rhythmbox kaboodle beep-media-player amarok | 1698 | zinf rhythmbox kaboodle beep-media-player amarok tagtool |
1684 | cli_find cdcd cplay alsamixer orpheus mp3blaster | 1699 | cli_find cdcd cplay alsamixer orpheus mp3blaster |
1685 | append_menu_end | 1700 | append_menu_end |
1686 | 1701 | ||
@@ -1750,8 +1765,8 @@ append_submenu "${GAMESMENU}" | |||
1750 | wesnoth canfeild ace_canfeild golf merlin chickens \ | 1765 | wesnoth canfeild ace_canfeild golf merlin chickens \ |
1751 | supertux tuxdash neverball cube_client blackjack \ | 1766 | supertux tuxdash neverball cube_client blackjack \ |
1752 | doom doom3 quake4 blackshades gltron kpoker concentration \ | 1767 | doom doom3 quake4 blackshades gltron kpoker concentration \ |
1753 | torrent scramble kiki xmoto | 1768 | torrent scramble kiki xmoto warsow wormux |
1754 | cli_find gnugo | 1769 | cli_find gnugo xgame |
1755 | 1770 | ||
1756 | find_it et append "[exec] (Enemy Territory) {et}" | 1771 | find_it et append "[exec] (Enemy Territory) {et}" |
1757 | find_it ut append "[exec] (Unreal Tournament) {ut}" | 1772 | find_it ut append "[exec] (Unreal Tournament) {ut}" |