XMENU(1)
π XMENU(1) β the menu utility for X, bestie edition π
okay so first things first: the manual name is xmenu, it lives in the General Commands Manual section, and honestly? it's giving iconic. let's get into it β¨
πΈ NAME πΈ
xmenu β a menu utility for X. that's it, that's the vibe. π
β SYNOPSIS β
xmenu [-irw] [-p position] [-x|-X [modifier-]button] [title]
like, that's the whole summoning ritual. πͺ
π¦ DESCRIPTION π¦
so xmenu is a menu for X, right? it reads a list of newline-separated items from stdin, shows a menu so the user can pick one of the items, and then outputs the item they selected to stdout. that's the entire personality. no cap. π
okay the options are as follows, bestie, pay attention:
-iβ Disable icons. this makesxmenuload faster when you're not using icons. lowkey a speedrun strat. β‘-pposition β Set the position to spawnxmenu. without this option,xmenuspawns next to the cursor. position is a string of the formINTxINT[:MONITOR], where the firstINTis the x position and the secondINTis the y position. the monitor part between brackets is optional.MONITORcan be a number from0to the number of monitors minus 1; or it can be a string likecurrentorcursor. if present, the monitor specifies that the position is relative to the upper left corner of that monitor. if monitor iscurrentorcursor, the monitor to be used is that where the cursor is in. for example,-p 0x0:cursorspecifies thatxmenumust spawn at the position0x0of the monitor where the cursor is in. and-p 100x500:0specifies thatxmenumust spawn at the position100x500of the monitor0. π-rβ If this option is set, the right mouse button is disabled; so pressing it will not trigger any menu item. sorry right-click girlies, not today. π-wβ Asks the window manager to draw a border around the menus. > this option may be buggy in some window managers, specially tiled ones that do not respect window hints. so like, cute idea, risky execution. π-x[mod-]button β This option requires an argument of the formmod-buttonorbutton; wheremodisMod1toMod5, orAlt(equivalent toMod1), orSuper(equivalent toMod4); andbuttonis the number of a mouse button. when this option is used,xmenulistens to button presses on the root window, and shows the pie menu when the given button is pressed, together with the given modifier, on the root window. for example, invokingxmenuwith the option-x Super-3makes a menu open when clicking with the third mouse button on the root window, or when clicking with the third mouse button together with theSuper(Mod4) modifier on any window. this option makesxmenurun continuously; so it should be used whenxmenuis invoked in background on a X startup file (like~/.xinitrc). main character energy fr fr. π-X[mod-]button β Just like-x, but also pass the click to the root window (for the window manager to use it, for example). > this option is incompatible with-x. pick a lane, bestie. π«Ά
π the item format, a whole mood π
each item read from stdin has the following format:
ITEM := [TABS] [[IMAGE TABS] LABEL [TABS OUTPUT]] NEWLINE
that means that each item is composed by tabs, followed by an optional image specification, followed by tabs followed by a label, followed by more tabs, followed by an output, and ended by a newline. brackets group optional elements. iykyk. β¨
- the initial tabs indicate the menu hierarchy: items indented with a tab is shown in a submenu of the preceding item not indented. an item without initial tabs is a top-level item. nesting slay. π
- the image is a string of the form
"IMG:/path/to/image.png". it specifies the path to a image file to be shown as icon at the left of the entry. if the path does not begin with"/","./"or"../", the file is searched on the paths specified in theICONPATHenvironment variable. πΌοΈ - the label is the string that will be shown as a item in the menu. an item without label is considered a separator and is drawn as a thin line in the menu separating the item above from the item below. separator era. β
- the output is the string that will be output after selecting the item. if an item does not have an output, its label is used as its output. π¬
- the newline terminates the item specification. periodt. π
if the argument title is given, the title of the menu window is set to it. π·οΈ
π USAGE π
xmenu is controlled by the mouse, but can also be controlled by the keyboard. items can be selected using the arrow keys, Tab (with and without Shift), Home, End, Enter and Esc, and 1-9 keys. items can also be selected by typing the first several characters in it. keyboard girlies rise up. β¨οΈπ
- Home β Select the first item in the menu. β¬οΈ
- End β Select the last item in the menu. β¬οΈ
- Down β Cycle through the items in the regular direction. π
- Tab β Cycle through the items in the regular direction. when the type-to-select feature is active, cycle through matching items instead. π
- Up β Cycle through the items in the reverse direction. β©οΈ
- Shift-Tab β Cycle through the items in the reverse direction. when the type-to-select feature is active, cycle through matching items instead. π
- Right, Enter β Select the highlighted item. β
- Left β Go to the menu above. β¬ οΈ
- Esc β Go to the menu above or exit
xmenu. πͺ
xmenu features the type-to-select selecting style, where typing a string will select the first item matching it. literally so convenient. π
additional key bindings can be set at compile time by changing the config.h file. yes, compile time. get your build hat on, babe. π§
π RESOURCES π
xmenu understands the following X resources. aesthetic config time, bestie:
xmenu.fontβ The font in which the labels should be drawn. multiple fonts can be added as fallback fonts; they must be separated by a comma. π€xmenu.backgroundβ The background color of non-selected items in the menu. π¨xmenu.foregroundβ The color of the label text of non-selected items in the menu. ποΈxmenu.selbackgroundβ The background color of selected items in the menu. β¨xmenu.selforegroundβ The color of the label text of selected items in the menu. π«xmenu.borderβ The color of the border around the menu. πΌοΈxmenu.separatorβ The color of the separator between items in the menu. βxmenu.gapβ The gap, in pixels, between the menus. πxmenu.widthβ The minimum width, in pixels, of the items in the menu. πxmenu.heightβ The size in pixels of the height of a single menu item. πxmenu.borderWidthβ The size in pixels of the border around the menu. π²xmenu.separatorWidthβ The size in pixels of the item separator. βxmenu.alignmentβ If set to"left","center", or"right", text is aligned to the left, center, or right of the menu, respectively. by default, text is aligned to the left. β¬ οΈxmenu.maxItemsβ Maximum number of items to be displayed in a menu. if more a menu has more than this number of items, they will be scrolled with arrow buttons. scrolling icon behavior, honestly. π½
π§ ENVIRONMENT π§
the following environment variables affect the execution of xmenu. know them, love them:
DISPLAYβ The display to startxmenuon. π₯οΈICONPATHβ A colon-separated list of directories used to search for the location of image files. π
π₯ EXAMPLES π₯
the following script illustrates the use of xmenu. the output is redirected to sh(1), creating a command to be run by the shell. okay this one's actually so satisfying, watch:
#!/bin/sh
xmenu <<EOF | sh &
Applications
IMG:./web.png Web Browser firefox
IMG:./gimp.png Image editor gimp
Terminal (xterm) xterm
Terminal (urxvt) urxvt
Terminal (st) st
Shutdown poweroff
Reboot reboot
EOF
for example, by selecting βApplicationsβ, a new menu will appear. selecting βWeb Browserβ in the new menu opens firefox. nested menus eating, no crumbs. π₯π
β SEE ALSO β
dmenu(1), 9menu(1), thingmenu(1) β the rest of the menu besties, go say hi. π«Ά
and that's the whole page, diva. π the footer says XMENU(1), so like β you're reading the xmenu man page, section 1, General Commands Manual, and the vibe is immaculate. go forth and pipe things into it. πΈπ¦π
π¦ where this page comes from
- nixos 26.05: xmenu 4.6.1
- nixpkgs unstable: xmenu 4.6.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms