9MENU(1) | General Commands Manual | 9MENU(1) |
9menu - create a menu to run commands
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] ...
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 nothing 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. Alternatively, the UP-ARROW and DOWN-ARROW cursor keys may be used to highlight different items, with ENTER used to select the highlighted item.
Menu items and commands are separated by a colon. The colon and command 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 manager. The exit menu item can be anywhere in the list, although by convention 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 operating after launching it.
9menu accepts the following command line options, listed alphabetically:
9menu grabs the focus so that the UP and DOWN arrow keys will work.
9menu -label Remotes xterm 'acme:ssh acme xterm' 'herman:ssh herman 9term' & 9menu -label 'X progs' gv xdvi xeyes xneko exit &
sam(1), 9term(1), 9wm(1), rc(1).
The Plan 9 Programmer's Manual.
This man page documents 9menu version 1.11.
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.
This program has grown to have too many options.
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.
Feb 3 2023 |