1BEMENU(1) BSD General Commands Manual BEMENU(1)
2
4 bemenu — dynamic menu inspired by dmenu(1)
5
7 bemenu [-hivwx] [-I index] [-l lines] [-P prefix] [-p prompt] [--ifne]
8 [--scrollbar none | always | autohide] [backend-options]
9 bemenu-run [-hivwx] [-I index] [-l lines] [-P prefix] [-p prompt]
10 [--ifne] [--scrollbar none | always | autohide] [--fork]
11 [--no-exec] [backend-options]
12
14 bemenu is a dynamic menu for tty(4) (using ncurses(3)), X11 and Wayland,
15 inspired by dmenu(1). It reads a list of newline-separated items from
16 standard input and then presents them as a list, where the user can se‐
17 lect one or more of them. When pressing ⟨carriage-return⟩, the selected
18 items are printed to standard output (one per line) and bemenu exits.
19 Entering text will filter the items to those that match the input. If
20 the number of items exceeds the size of the list, the items will be pagi‐
21 nated.
22
23 bemenu-run is a special-case invocation of bemenu, where the input is the
24 list of executables under PATH and the selected items are executed.
25
27 -h, --help
28 Print a help message to standard output and exit.
29
30 -I index, --index index
31 Highlight the item at index at the start. Indices start at 0.
32 By default, the first item is highlighted.
33
34 -i, --ignorecase
35 Filter items case-insensitively.
36
37 -l number, --list number
38 List items vertically with the given number of lines.
39
40 -P prefix, --prefix prefix
41 Display prefix before the highlighted item in a vertical list.
42
43 -p prompt, --prompt prompt
44 Defines the prompt text to be displayed to the left of the input
45 field. Defaults to ‘bemenu’.
46
47 -v, --version
48 Print the bemenu version number to standard output and exit.
49
50 -w, --wrap
51 Advancing past the end of the list returns you to the start.
52
53 -x, --password
54 Hide filter text.
55
56 --fork Always fork(2) before executing the selections. Disabled by de‐
57 fault when using the terminal backend.
58
59 --no-exec
60 Print the selected items to standard output instead of executing
61 them.
62
63 --scrollbar none | always | autohide
64 Specify when to show a scrollbar for vertical lists:
65
66 none Never display a scrollbar (the default).
67
68 always Always display a scrollbar.
69
70 autohide Only display a scrollbar when the number of items ex‐
71 ceeds the number of lines.
72
73 Backend Options
74 These options are only available on backends specified in the parenthe‐
75 ses:
76
77 -b, --bottom (Wayland, X11)
78 The list will appear at the bottom of the screen.
79
80 -f, --grab (Wayland, X11)
81 Show the bemenu window whilst reading the items.
82
83 -H height, --line-height height (Wayland, X11)
84 Specify the height in point size to make each entry.
85
86 -m index, --monitor index (Wayland, X11)
87 Specify the monitor index where the list should appear. Monitor
88 indices start at zero. The interpretation of the given argument
89 depends on the utilized backend. With X11 and Wayland, a value
90 of ‘-1’ or focused indicates that the current monitor should be
91 used (the default). With Wayland, the index should be a string
92 specifying a specific monitor name. The value ‘-2’ or all indi‐
93 cates that the list should appear on all monitors.
94
95 -n, --no-overlap (Wayland)
96 Set the bemenu window to be on top of any other panels.
97
98 --fn ‘name [size]’ (Wayland, X11)
99 Specify the font family name and size to be used. For more op‐
100 tions, consult the Pango Reference Manual for
101 pango_font_description_from_string().
102
103 The following options control the colours for various parts of the list
104 for the Wayland and X11 backends. Each takes an argument in the form of:
105
106 #RGB[A]
107
108 where R, G, B and A are hexadecimal integers from 00–FF that control the
109 red, green, blue and alpha-transparency channels.
110
111 --tb color Title background.
112
113 --tf color Title foreground.
114
115 --fb color Filter background.
116
117 --ff color Filter foreground
118
119 --nb color Normal background.
120
121 --nf color Normal foreground.
122
123 --hb color Highlighted background.
124
125 --hf color Highlighted foreground.
126
127 --sb color Selected background.
128
129 --sf color Selected foreground.
130
131 --scb color Scrollbar background.
132
133 --scf color Scrollbar foreground.
134
136 bemenu supports keyboard commands to move around the list and edit the
137 filter. In the following examples, C-x means ⟨control-x⟩, M-x means
138 ⟨alt-x⟩ and S-x means ⟨shift-x⟩:
139
140 ⟨cursor-up⟩, S-⟨cursor-left⟩, C-p, M-j, M-l
141 Highlight the previous item.
142
143 ⟨cursor-down⟩, ⟨tab⟩, C-n, M-h, M-k
144 Highlight the next item.
145
146 PageUp, M-v, M-u
147 Show the previous page of items, preserving the offset of the
148 currently highlighted item, if possible.
149
150 PageDown, C-v, M-d
151 Show the next page of items, preserving the offset of the cur‐
152 rently highlighted item, if possible.
153
154 S-M-<, S-PageUp
155 Highlight the first item in the list.
156
157 S-M->, S-PageDown
158 Highlight the last item in the list.
159
160 S-⟨tab⟩
161 Copy the highlighted item to the filter.
162
163 ⟨escape⟩, C-g
164 Terminate bemenu without printing items.
165
166 C-⟨carriage-return⟩
167 Select the highlighted item and continue highlighting.
168
169 S-⟨carriage-return⟩, C-m
170 Print selected items and the currently highlighted one, and exit.
171 Items are printed in the order they were selected, with the cur‐
172 rently highlighted item printed last.
173
174 S-⟨carriage-return⟩, Insert
175 Print the filter text to standard output and exit.
176
177 C-l, ⟨cursor-left⟩
178 Move cursor left.
179
180 C-f, ⟨cursor-right⟩
181 Move cursor right.
182
183 C-a, Home
184 Move cursor to the start.
185
186 C-e, End
187 Move cursor to the end.
188
189 ⟨backspace⟩ C-h
190 Remove character before the cursor.
191
192 ⟨delete⟩
193 Remove character at the cursor.
194
195 C-u, S-⟨delete⟩
196 Remove all characters before the cursor.
197
198 C-k Remove all characters after the cursor.
199
200 C-w Clear the filter.
201
202 M-[0–9]
203 Print selected items and exit with a custom error code. See EXIT
204 STATUS.
205
207 BEMENU_OPTS An alternative way to pass command line arguments to
208 bemenu.
209
210 BEMENU_BACKEND Force a backend to be used. If empty, one of the GUI
211 backends (Wayland, X11) will be selected automatically.
212 The accepted values are curses, wayland and x11.
213
214 BEMENU_RENDERER Force a backend by loading its shared object from the
215 set value.
216
217 BEMENU_RENDERERS Override the backend search path to the set value. De‐
218 faults to /usr/lib64/bemenu.
219
220 BEMENU_SCALE Override the rendering scale factor for the GUI back‐
221 ends.
222
224 bemenu exits 0 on success, 1 if the user exited without selecting or an
225 error, and if exiting with a custom error code, 10 plus the number speci‐
226 fied.
227
229 dmenu(1), fork(2), ncurses(3), tty(4)
230
231 Pango Reference Manual, https://developer.gnome.org/pango/1.46/, August
232 20, 2020, Fonts — pango_font_description_from_string().
233
235 bemenu is written and maintained by Jari Vetoniemi <mailroxas@gmail.com>.
236
237BSD March 29, 2021 BSD