bemenu(1)
π NAME π
bemenu β dynamic menu inspired by dmenu(1). Bestie, this is the bemenu(1) page from the General Commands Manual, and itβs literally the main character of dynamic menus. π
β¨ SYNOPSIS β¨
bemenu [-hCiKTvwx] [-I <index>] [-l <lines>] [-P <prefix>]
[-p <prompt>] [--ifne] [--scrollbar none|always|autohide] [--binding
vim] [--fork] [backend_options]
bemenu-run [-hCiKTvwx] [-I <index>] [-l <lines>] [-P <prefix>]
[-p <prompt>] [--ifne] [--scrollbar none|always|autohide] [--binding
vim] [--fork] [--no-exec] [backend-options]
π DESCRIPTION π
bemenu is a dynamic menu for tty(4) (using ncurses(3)), X11 and Wayland, inspired by dmenu(1). Itβs giving βpicker but make it fashion,β and honestly? Obsessed. π¦
It reads a list of newline-separated items from standard input and then presents them as a list, where you can select one or more of them. When you press carriage-return, the selected items are printed to standard output (one per line) and bemenu exits. Slay. β¨
Entering text will filter the items to those that match the input. If the number of items exceeds the size of the list, the items will be paginated. No cap, it just keeps things tidy. π
bemenu-run is a special-case invocation of bemenu, where the input is the list of executables under PATH and the selected items are executed. Itβs the βrun it, bestieβ mode. π₯
π OPTIONS π
Okay so hereβs the full options lineup β every flag, every value, no skipping. Iykyk. πΈ
-h,--helpβ print a help message to standard output and exit.-C,--no-cursorβ disable all cursor events.-I,--index <index>β highlight the item at index at the start. Indices start at0. By default, the first item is highlighted.-i,--ignorecaseβ filter items case-insensitively.-K,--no-keyboardβ disable all keyboard events.-l,--list "<number> down|up"β list items vertically down or up with the given number of lines.-P,--prefix <prefix>β display prefix before the highlighted item in a vertical list.-p,--prompt <prompt>β defines the prompt text to be displayed to the left of the input field. Defaults tobemenu.-s,--no-spacingβ disable the title spacing on entries.-T,--no-touchβ disable all touch events.-v,--versionβ print thebemenuversion number to standard output and exit.-w,--wrapβ advancing past the end of the list returns you to the start.-x,--password none|hide|indicatorβ specify how the filter text should be displayed:noneβ display the input (the default).hideβ do not display any input.indicatorβ replace input with asterisks.
--fixed-heightβ prevent the display from changing height on filter.--accept-singleβ immediately return if there is only one item.--auto-selectβ when one entry is left, automatically select it.--bindingβ use alternative key bindings. Available options:vim--forkβ alwaysfork(2)before executing the selections. Disabled by default when using the terminal backend.--ifneβ only display menu if there are items.--single-instanceβ force a single menu instance.--no-execβ print the selected items to standard output instead of executing them.--scrollbar none|always|autohideβ specify when to show a scrollbar for vertical lists:noneβ never display a scrollbar (the default).alwaysβ always display a scrollbar.autohideβ only display a scrollbar when the number of items exceeds the number of lines.
-e,--vim-esc-exitsβ exitbemenuwhen pressing escape in normal mode for vim bindings.-N,--vim-normal-modeβ start in normal mode for vim bindings.-F,--filterβ filter items for a given string before showing the menu. Affects--ifneand--accept-single
π οΈ Backend options π οΈ
Heads up bestie: these options are only available on backends specified in the parentheses. π
-b,--bottomβ (Wayland, X11) the list will appear at the bottom of the screen.-c,--centerβ (Wayland, X11) the list will appear at the center of the screen.(wx)-f,--grabβ (Wayland, X11) show thebemenuwindow whilst reading the items.-B,--borderβ (Wayland, X11) specify the width of the border in pixels around the menu.--bdrβ (Wayland, X11) specify the border color.-R,--border-radiusβ (Wayland, X11) specify the radius of the border around the menu (0= no curved borders).-H,--line-height <height>β (Wayland, X11) specify the height in point size to make each entry.--chβ (Wayland, X11) specify the height of the cursor (0= scales with line height).--cwβ (Wayland, X11) specify the width of the cursor.-m,--monitor <index>β (Wayland, X11) specify the monitor index where the list should appear. Monitor indices start at zero. The interpretation of the given argument depends on the utilized backend. With X11 and Wayland, a value of-1orfocusedindicates that the current monitor should be used (the default). With Wayland, the index should be a string specifying a specific monitor name. The value-2orallindicates that the list should appear on all monitors.-n,--no-overlapβ (Wayland) set thebemenuwindow to be on top of any other panels.-M,--margin <margin>β (Wayland, X11) specify the margin (empty space) in pixels to leave between menu and vertical view borders.bemenuwill reduce its size to fit in space between gaps.--hpβ (Wayland, X11) specify the horizontal padding for the entries in single line mode.-W,--width-factor <factor>β (Wayland, X11) specify the relative width factor as a floating point number. It makes sense to set it between0and1to define how much of the screen widthbemenuwill use. However,bemenuwill still respect margin, so if resulting size is greater than space between gaps,bemenuwill ignore factor and use available space instead.--fn <name [size]>β (Wayland, X11) specify the font family name and size to be used. For more options, consult the Pango Reference Manual forpango_font_description_from_string().
The following options control the colours for various parts of the list for the Wayland and X11 backends. Each takes an argument in the form of #RGB[A], where R, G, B and A are hexadecimal integers from 00βFF that control the red, green, blue and alpha-transparency channels. π
--tb <color>β title background.--tf <color>β title foreground.--fb <color>β filter background.--ff <color>β filter foreground.--cb <color>β cursor background.--cf <color>β cursor foreground.--nb <color>β normal background.--nf <color>β normal foreground.--hb <color>β highlighted background.--hf <color>β highlighted foreground.--fbb <color>β feedback background.--fbf <color>β feedback foreground.--sb <color>β selected background.--sf <color>β selected foreground.--ab <color>β alternating background color.--af <color>β alternating foreground color.--scb <color>β scrollbar background.--scf <color>β scrollbar foreground.
β¨οΈ KEYBOARD COMMANDS β¨οΈ
okay so bemenu is fully keyboard-driven and honestly that's the vibe π
β you've got commands to scoot around the list and to edit your filter. quick legend before we go, because the notation is a whole thing: C-x means Ctrl+x, M-x means Alt+x, and S-x means Shift+x. periodt. β¨
<cursor-up>,S-<cursor-left>,C-p,M-j,M-lβ highlight the previous item, slay β¬οΈ<cursor-down>,<tab>,C-n,M-h,M-kβ highlight the next item, keep it moving β¬οΈ- PageUp,
M-v,M-uβ show the previous page of items, and it preserves the offset of the currently highlighted item if possible (keyword: if possible, bestie, don't come for me) π¦ - PageDown,
C-v,M-dβ show the next page of items, same deal β offset of the currently highlighted item preserved if possible π¦ S-M-<,S-PageUpβ highlight the first item in the list, back to the top we go πS-M->,S-PageDownβ highlight the last item in the list, bottom of the barrel bestie π₯S-<tab>β copy the highlighted item into the filter. literally so useful π<escape>,C-gβ terminate bemenu without printing items. we're leaving, no receipts πC-<carriage-return>,C-mβ print the selected items and the currently highlighted one, then exit. items print in the order they were selected, with the currently highlighted item printed last πS-<carriage-return>, Insert β print the filter text to standard output and exit β¨C-b,C-l,<cursor-left>β move cursor leftC-f,<cursor-right>β move cursor rightC-a, Home β move cursor to the startC-e, End β move cursor to the end<backspace>,C-hβ remove the character before the cursor<delete>β remove the character at the cursorC-u,S-<delete>β remove all characters before the cursorC-kβ remove all characters after the cursorC-wβ clear the filter, fresh start energy πΈC-y,C-Yβ paste selection (C-yfor "primary",C-Yfor "clipboard"). yes those are different, no you may not mix them up π«ΆM-[1-9]β print selected items and exit with a custom error code 10 (M-1) through 18 (M-9), see EXIT STATUS. custom codes, main character behaviour πM-0β print selected items and exit with the custom error code 19, see EXIT STATUS
π Vim bindings π
so if you invoke bemenu with --binding vim, you get vim-like modal entry β these bindings roughly emulate insert and normal vim modes. the initial mode is insert mode, unless --vim-normal-mode is specified. iykyk π§
insert mode
in insert mode, all the keys up top function exactly as described above, except for this one:
<escape>β switch to normal mode. welcome to normal mode bestie πΈ
normal mode
in normal mode, only the following keys have meaning. everything else? crickets. π
qβ terminate bemenu without printing itemsiβ enter insert modeIβ enter insert mode after moving the cursor to the startaβ enter insert mode after moving the cursor rightAβ enter insert mode after moving the cursor to the endccβ enter insert mode after clearing the filtercwβ enter insert mode after removing all characters between the cursor and the start of the next wordcbβ enter insert mode after removing all characters between the start of the word and the cursorc$β enter insert mode after removing all characters after the cursorc0β enter insert mode after removing all characters before the cursorn,jβ highlight the next itemp,kβ highlight the previous itemggβ highlight the first item in the listGβ highlight the last item in the listHβ highlight the first visible itemMβ highlight the middle-most visible itemLβ highlight the last visible itemvβ select or deselect the highlighted itemFβ show the next page of itemsBβ show the previous page of itemshβ move cursor leftlβ move cursor right0β move cursor to the start$β move cursor to the endwβ move cursor forward to the start of a wordbβ move cursor backward to the start of a wordeβ move cursor forward to the end of a wordxβ remove the character at the cursorXβ remove the character before the cursordwβ remove all characters between the cursor and the start of the next worddbβ remove all characters between the start of the word and the cursord$β remove all characters after the cursord0β remove all characters before the cursorddβ clear the filter
π± ENVIRONMENT π±
env vars, bestie, the little knobs that change everything π (the original put these in a cute little box, we're doing bullets because bullets ate):
BEMENU_OPTSβ an alternative way to pass command line arguments to bemenu. sneaky and iconic β¨BEMENU_BACKENDβ force a backend to be used. if empty, one of the GUI backends (Wayland, X11) will be selected automatically. the accepted values arecurses,waylandandx11.BEMENU_RENDERERβ force a backend by loading its shared object from the set value πBEMENU_RENDERERSβ override the backend search path to the set value. defaults to/usr/lib64/bemenu. no cap, that's the path π¦BEMENU_SCALEβ override the rendering scale factor for the GUI backends. make it big, make it small, it's giving control π
π EXIT STATUS π
0β bemenu ran successfully. we love a happy ending π1β the user exited without selecting, or bemenu encountered an error. two very different moods, same number π10-19β the user specified a custom exit code withM-[0-9], see KEYBOARD COMMANDS. yes you can pick your own number, diva behaviour π₯
π«Ά SEE ALSO π«Ά
also the Pango Reference Manual, https://developer.gnome.org/pango/1.46/, August 20, 2020, Fonts β pango_font_description_from_string(). go read it, it's right there π
π AUTHORS π
bemenu is written and maintained by Jari Vetoniemi <mailroxas@gmail.com> with the help of various contributors. absolute icons, all of them π
and that's the page!! π¦ this build is the 2024-07-19 version of bemenu(1) β go forth and pick your items, bestie, mwah π
π¦ where this page comes from
- opensuse-leap 16.0: bemenu 0.6.23-bp160.1.12 Β· MIT
- opensuse-leap 16.0: bemenu 0.6.23-bp160.1.12 Β· MIT
- opensuse-leap 16.0: bemenu 0.6.23-bp160.1.12 Β· MIT
- opensuse-leap 16.0: bemenu 0.6.23-bp160.1.12 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms