9MENU(1)

πŸ“¦
version 1.11 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 9menu ✨

Okay bestie, welcome to the 9menu manual from the General Commands Manual πŸ’–

πŸŽ€ 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 πŸ’«

Okay so 9menu is lowkey the simplest 🫢 You hand it a list of menu item and command pairs right on the command line, and it pops up a window that is literally just a menu. Pick an item and its matching command gets run. Iconic. πŸ¦‹

You can select an item with Button1 or Button3. Or, if you're feeling keyboard-core, the UP-ARROW and DOWN-ARROW cursor keys highlight different items, and ENTER picks whichever one is highlighted. πŸ’…

Menu items and commands are split by a colon. The colon and the command are both optional 🌸 If they're missing, the menu item is treated as a command that can run directly, no fuss.

A menu item that says exactly exit makes 9menu exit when it's selected. Otherwise, if you want 9menu gone, you delete it with the window manager πŸ™ˆ The exit item can go anywhere in the list, but by convention it sits last. If you attach a command to the exit item, that command runs before 9menu bounces.

If a menu item's command starts with the word exec, 9menu stops operating after it launches that command. Main character exit πŸ‘‘

9menu takes the following command line options, listed alphabetically ✨

🌈 OPTIONS 🌈

  • -bg background-color β€” Sets the background color to background-color. The default is white 🀍
  • -display displayname β€” Uses the X display displayname instead of the default display πŸ–₯️
  • -file filename β€” Reads items to show from filename, on top of whatever else you typed on the command line. This is meant for use with #! in scripts πŸ“ If the filename is -, it reads from stdin. A filename of - causes 9menu to read items from standard input.
  • -fg foreground-color β€” Sets the foreground color to foreground-color. The default is black πŸ–€
  • -font fname β€” Uses the font fname instead of one of the default fonts built into 9wm πŸ”€
  • -geometry geom β€” Uses geom (a geometry in standard X format) as the menu's geometry. This is most useful for setting where the menu starts out. Heads up: 9menu overrides the size part of the geometry spec. The window is always just big enough to fit the menu, no more, no less πŸ’…
  • -iconic β€” Starts up in the iconified state πŸ«₯
  • -label name β€” Changes both the window and icon labels to name. The default label is the last component of the path used to run 9menu, which is typically 9menu 🏷️
  • -path β€” Appends the current directory to the command search path πŸ“‚
  • -popdown β€” Once an item is selected, the menu window automatically iconifies itself ✨
  • -popup β€” Acts like a pop-up menu. Once a menu item is selected, 9menu exits. This option overrides -popdown 🧚
  • -shell prog β€” Uses prog as the shell to run commands, instead of /bin/sh. A popular alternative is rc(1) 🐚 If the shell can't be executed, 9menu silently falls back to /bin/sh. No drama.
  • -teleport β€” Moves the menu to wherever the mouse is when the menu gets uniconified. This one is especially slay when paired with -popdown πŸͺ„
  • -version β€” Prints the version of 9menu on standard output, then exits with an exit value of zero πŸ”’
  • -warp β€” Warps the mouse to the menu when it gets uniconified. After you make a selection, the mouse goes back to where it was. Also extra good with -popdown 🐭

9menu grabs the focus so the UP and DOWN arrow keys actually work. Lowkey essential 🫢


🍭 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.11 ✨

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

The code with full history is also on Git at http://github.com/arnoldrobbins/9menu. πŸ’Ύ

πŸ™ˆ BUGS πŸ™ˆ

This program has grown to have too many options. πŸ’€

πŸ’œ AUTHORS πŸ’œ

The initial idea for this program came from Arnold Robbins, after he'd been working with John Mackin's GWM Blit emulation 🫢 Matty Farrow wrote a version using libXg, and some ideas were borrowed from it. The 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. And Matthias Bauer made it work with the keyboard ⌨️ iykyk, they're all iconic πŸ‘‘


That's the whole 9menu tea, last updated Feb 3 2023 🌸 Stay hydrated, bestie, and go be a 9MENU(1) legend πŸ’–πŸ¦‹

πŸ“¦ where this page comes from