RATMENU(1)
β¨ RATMENU(1) β¨
okay bestie, so this is a page from the General Commands Manual β it's all about ratmenu, the little menu-making icon, and I'm gonna walk you through literally every single thing on it, no skips, no shortcuts π
πΈ NAME πΈ
ratmenu β create a menu to run commands
π SYNOPSIS π
ratmenu [ -display displayname ] [ -font fname ] [ -fg foreground-color
] [ -bg background-color ] [ -io item-offset ] [ -label name ] [ -shell
prog ] [ -align {left|center|right} ] [ -style {snazzy|dreary} ] [
-persist ] [ -version ] [ menuitem command ] ...
π DESCRIPTION π
okay so picture this: ratmenu is a super simple program, right? You hand it a big ol' list of menu-item-and-command pairs straight on the command line, and it makes a window that is nothing but a menu. That's it. That's the whole vibe. When you select a particular item, the matching command just runs. Slay.
and here's the part that's giving very much "not like other menu programs": ratmenu does not recognize any usage of the rodent ππ«. It is entirely keystroke operated. Keyboard main character energy, periodt.
menu items must be followed by a command β non-negotiable. The syntax is based on that of the dialog program. iykyk.
ratmenu accepts the following command line options π
β OPTIONS β
-displaydisplayname β Use the X display displayname, instead of the default display.-fontfname β (X Resource:font) Use the font fname, instead of the default font.-labelname β Change both the window and icon labels of the window to name. The default label is the last component of the path used to runratmenu, typically,ratmenu.-fgforeground-color β (X Resource:fgcolor) Set the foreground color to foreground-color. By default, the foreground color isblack.-bgbackground-color β (X Resource:bgcolor) Set the background color to background-color. By default, the background color iswhite.-ioitem-offset β Set the first selected item to item-offset. By default, the first item is the top-most one, oritem-offset 1. The next item down would be atitem-offset 2.-style {snazzy|dreary}β (X Resource:style) The default style issnazzy, where the highlight bar β the one showing the currently selected item β stays stationary while all the menu items get rotated up or down when the cursor keys are moved. Indrearymode, the highlight bar moves up and down the menu as it does on all conventional keyboard controlled menus.-align {left|center|right}β (X Resource:align) Align the text of the menu entries to the left, right, or center. Defaults toleft. This is different from9menu, which defaults to center.-shellprog β Use prog as the shell to run commands, instead of/bin/sh. A popular alternative shell isrc(1). If the shell cannot be executed,ratmenuwill silently fall back to using/bin/sh.-backprevmenu β prevmenu is a command or shell script to run when the back key is pressed, usually a script that hasratmenushowing the previous menu. Used to create nested menus, it gives the user a way to back out and return to the previous menu. Note that you can use this option for other things too. The command specified by the-backoption is executed when the user hits one of the "back" keys.-persistβ (X Resource:persist) Ordinarily,ratmenuexits if a new window pops up on top of it, or if you switch to another window. This option tellsratmenuto hang around, like a regular window.-versionβ This option prints the version ofratmenuon the standard output, and then exits with an exit value ofzero.
π¦ KEYSTROKES π¦
The Up keystrokes move the selection to the next item up β¬οΈ. The Down keystrokes move the selection to the next item down β¬οΈ. When the selection reaches the top or bottom, it scrolls around to the other side on pressing of the appropriate keystroke β yes, it wraps, it's giving circular π«. The Select keystrokes execute the command corresponding to the currently selected menu item, and exit ratmenu. The Exit keystrokes quit ratmenu without doing anything at all, no cap.
- Up
'k',Up_arrow,BackSpace,'-',C-p
- Down
'j',Down_arrow,Space,Tab,'+',C-n,C-i
- Select
'l',Right_arrow,Return,C-f,C-m,C-j
- Back
'h',Left_arrow,C-b
- Exit
'q',Escape,C-g
π CONFIGURATION USING X RESOURCES π
You can configure some items using xrdb to load appropriate X resources β¨. There's an example configuration chilling in the file /usr/share/doc/ratmenu/Xresources.ratmenu, and it shows all possible configuration items. Give it a look bestie β it is fairly easy to figure out. π
π EXAMPLES π
ratmenu -label "Remotes xterm" acme "rsh acme xterm" herman "rsh herman 9term" &
ratmenu -label 'X progs' ghostview ghostview xdvi xdvi xeyes xeyes xneko xneko &
ratmenu -back ~/bin/mypreviousmenu "X Eyes" xeyes &
π SEE ALSO π
ratpoison(1), ratpoisonrc(5), dialog(1) xrdb(1)
Ratpoison Desktop Users Manual.
π 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. Jonathan Walther modified this code to play nicely with the ratpoison window manager by removing handling of mouse events and iconification. Zrajm C Akfohg made many improvements in his ratmen fork, including X resource handling, some of which were folded back in.
and that's the whole page, bestie, you ate it π«Άβ¨ this gem comes from the Ratpoison Desktop For X era, dated Oct 10 2001 β vintage but still iconic, fr fr π ππΈ
π¦ where this page comes from
- debian bookworm: ratmenu 2.3.22+b2
- debian trixie: ratmenu 2.3.22+b3
- ubuntu jammy: ratmenu 2.3.22build1
- ubuntu noble: ratmenu 2.3.22build1
- ubuntu resolute: ratmenu 2.3.23 Β· 9menu
- ubuntu stonking: ratmenu 2.3.23 Β· 9menu
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms