all repos — fluxbox @ bc9afac2de6bcb047f4d3d0908022f8890b207a0

custom fork of the fluxbox windowmanager

update from Han
fluxgen fluxgen
commit

bc9afac2de6bcb047f4d3d0908022f8890b207a0

parent

6fd4093d4c1ffb4f67899344094a08b59519fab5

1 files changed, 27 insertions(+), 15 deletions(-)

jump to
M util/fluxbox-generate_menuutil/fluxbox-generate_menu

@@ -22,7 +22,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # -# $Id: fluxbox-generate_menu,v 1.19 2002/12/16 11:34:06 fluxgen Exp $ +# $Id: fluxbox-generate_menu,v 1.20 2002/12/17 16:42:20 fluxgen Exp $ WHOAMI=`whoami` [ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin

@@ -30,9 +30,15 @@

# Functions display_usage() { cat <<EOF +Usage: fluxbox-generate_menu [-kgrB] [-t terminal] [-w url] [-b browser] + [-m menu-title] [-p /path] [-n /path] [-q /path] [-o /path] +EOF +} -Usage: fluxbox-generate_menu [-kgr] [-t terminal] [-w browser] - [-m menu-title] [-p /path] [-n /path] [-q /path] [-o /path] +display_help() { + display_usage + cat <<EOF + Options: -k Insert a kde menu

@@ -40,7 +46,7 @@ -g Add a gnome menu

-B enable backgroundmenu -m Menu-title; default is "Fluxbox" - -r Don't remove empty menu-entries; Better for templates. + -r Don't remove empty menu-entries; for templates. -o Outputfile; default is ~/.fluxbox/menu -t Favourite terminal -b Favourite browser

@@ -57,14 +63,6 @@ -p Package-datadir; default is /usr/share

-n Gnome-datadir; default is Package-datadir -q KDE-datadir; default is Package-datadir -EOF -} - -display_help() { - cat <<EOF - -This program generates a menu-file for fluxbox. -Use fluxbox-generate_menu -h for brief usage instructions. EOF }

@@ -167,9 +165,9 @@ q) KPKGDATADIR=${OPTARG} ;;

m) MENUTITLE=${OPTARG} ;; w) HOMEPAGE=${OPTARG} ;; r) REMOVE=no ;; - h) display_usage ; exit 0 ;; + h) display_help ; exit 0 ;; a) display_authors ; exit 0 ;; - *) display_help ; exit 1 ;; + *) display_usage ; exit 1 ;; esac done

@@ -488,8 +486,22 @@ ;;

esac # Start of menu +cat << EOF > ${FILENAME} +# Generated by fluxbox-genereate_menu +# +# If you read this it means you want to edit this file manualy, +# so here are some usefull tips: +# +# - The -r option prevents removing of empty menu entries and makes +# thing much more readable. +# +# - To prevent any other app from overwriting your menu +# you can change the menu name in .fluxbox/init to: +# session.menuFile: /home/you/.fluxbox/my-menu -echo "[begin] (${MENUTITLE})" > ${FILENAME} +EOF + +echo "[begin] (${MENUTITLE})" >> ${FILENAME} append "[exec] (${DEFAULT_TERM}) {${DEFAULT_TERM}}"