Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
9MENU(1)		    General Commands Manual		      9MENU(1)

NAME
       9menu - create a	menu to	run commands

SYNOPSIS
       9menu  [	-bg background-color ] [ -display displayname ]	[ -file	name ]
       [ -fg foreground-color ]	[ -font	fname ]	[ -geometry geom ] [ -iconic ]
       [ -label	name ] [ -path ] [ -popdown ] [	-popup ] [  -shell  prog  ]  [
       -teleport ] [ -version ]	[ -warp	] menuitem[:command] ...

DESCRIPTION
       9menu  is a simple program that accepts a list of menu item and command
       pairs on	the command line.  It creates a	window that consists of	 noth-
       ing  but	a menu.	 When a	particular item	is selected, the corresponding
       command is executed.

       Either Button1 or Button3 may be	used  to  select  an  item.   Alterna-
       tively,	the  UP-ARROW  and DOWN-ARROW cursor keys may be used to high-
       light different items, with ENTER used to select	the highlighted	item.

       Menu items and commands are separated by	a colon.  The colon  and  com-
       mand  are  optional. If they are	missing, then the menu item is assumed
       to be a command that can	be executed directly.

       A menu item consisting of the word exit causes 9menu to exit when it is
       selected.  Otherwise, to	stop 9menu , delete it using the  window  man-
       ager.  The exit menu item can be	anywhere in the	list, although by con-
       vention it is last.  If a command is supplied along with	the exit item,
       that command is executed	before 9menu exits.

       If  a menu item's command starts	with the word exec, 9menu ceases oper-
       ating after launching it.

       9menu accepts the following command  line  options,  listed  alphabeti-
       cally:

       -bg background-color
	      Set  the	background color to background-color.  By default, the
	      background color is white.

       -display	displayname
	      Use the X	display	displayname, instead of	the default display.

       -file filename
	      Read items to display from filename, in addition	to  any	 other
	      command  line  arguments.	  This is intended for use with	#!  in
	      scripts.	A filename of -	causes 9menu to	read items from	 stan-
	      dard input.

       -fg foreground-color
	      Set  the	foreground color to foreground-color.  By default, the
	      foreground color is black.

       -font fname
	      Use the font fname, instead of one of the	 default  fonts	 built
	      into 9wm.

       -geometry geom
	      Use  geom	 (a  geometry in standard X format) as the geometry of
	      the menu.	 This is most useful for specifying the	initial	 loca-
	      tion  of	the  menu.  Note that 9menu overrides the size part of
	      the geometry specification. The  window  is  always  just	 large
	      enough to	hold the menu.

       -iconic
	      Start up in the iconified	state.

       -label name
	      Change  both  the	 window	and icon labels	of the window to name.
	      The default label	is the last component of the path used to  run
	      9menu, typically,	9menu.

       -path  Append the current directory to the command search path.

       -popdown
	      Once  an	item is	selected, the menu window automatically	iconi-
	      fies itself.

       -popup Act like a pop-up	menu. Once a menu item is selected, 9menu  ex-
	      its.  This option	overrides -popdown.

       -shell prog
	      Use  prog	 as  the shell to run commands,	instead	of /bin/sh.  A
	      popular alternative shell	is rc(1).  If the shell	cannot be exe-
	      cuted, 9menu then	silently falls back to using /bin/sh.

       -teleport
	      Move the menu to where the mouse is when the  menu  is  uniconi-
	      fied.   This  option  is	particularly useful when combined with
	      -popdown.

       -version
	      This option prints the version of	9menu on the standard  output,
	      and then exits with an exit value	of zero.

       -warp  Warp  the	mouse to the menu when the menu	is uniconified.	 After
	      the selection is made, restore the mouse to where	it was.	  This
	      option is	particularly useful when combined with -popdown.

EXAMPLES
       9menu -label Remotes xterm 'acme:ssh acme xterm'	'herman:ssh herman 9term' &

       9menu -label 'X progs' gv xdvi xeyes xneko exit &

SEE ALSO
       sam(1), 9term(1), 9wm(1), rc(1).

       The Plan	9 Programmer's Manual.

VERSION
       This man	page documents 9menu version 1.10.

       Source		 code		 is	      available		  from
       ftp://ftp.freefriends.org/arnold/Source/9menu.shar.gz.

       The  code  with	full  history  is  also	  available   via   Git	  from
       http://github.com/arnoldrobbins/9menu.

BUGS
       This program has	grown to have too many options.

AUTHORS
       The  initial  idea for this program was by Arnold Robbins, after	having
       worked with John	Mackin's GWM Blit emulation.   Matty  Farrow  wrote  a
       version	using  libXg,  from which some ideas were borrowed.  This code
       was written by David Hogan and Arnold Robbins.  Rich Salz motivated the
       -shell option.  Christopher Platt motivated the -teleport option.  John
       O'Donnell supplied the basic code for the -fg and -bg  options.	 Peter
       Seebach	provided  the  base  code  for	the  -file  and	-path options.
       Matthias	Bauer made it work with	the keyboard.

				  Apr 16 2020			      9MENU(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=9menu&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>

home | help