1bemenu(1)                   General Commands Manual                  bemenu(1)
2
3
4

NAME

6       bemenu - dynamic menu inspired by dmenu(1)
7

SYNOPSIS

9       bemenu [-hivwx] [-I <index>] [-l <lines>] [-P prefix]
10           [-p <prompt>] [--ifne] [--scrollbar none|always|autohide] [back‐
11           end_options]
12
13       bemenu-run [-hivwx] [-I <index>] [-l <lines>] [-P <prefix>]
14           [-p <prompt>] [--ifne] [--scrollbar none|always|autohide] [--fork]
15           [--no-exec] [backend-options]
16

DESCRIPTION

18       bemenu is a dynamic menu for tty(4) (using ncurses(3)), X11 and Way‐
19       land, inspired by dmenu(1).
20
21       It reads a list of newline-separated items from standard input and then
22       presents them as a list, where the user can select one or more of them.
23       When pressing <carriage-return>, the selected items are printed to
24       standard output (one per line) and bemenu exits.
25
26       Entering text will filter the items to those that match the input. If
27       the number of items exceeds the size of the list, the items will be
28       paginated.
29
30       bemenu-run is a special-case invocation of bemenu, where the input is
31       the list of executables under PATH and the selected items are executed.
32

OPTIONS

34       -h, --help
35           Print a help message to standard output and exit.
36
37       -I, --index <index>
38           Highlight the item at index at the start. Indices start at 0. By
39           default, the first item is highlighted.
40
41       -i, --ignorecase
42           Filter items case-insensitively.
43
44       -l, --list <number>
45           List items vertically with the given number of lines.
46
47       -P, --prefix <prefix>
48           Display prefix before the highlighted item in a vertical list.
49
50       -p, --prompt <prompt>
51           Defines the prompt text to be displayed to the left of the input
52           field. Defaults to ‘bemenu’.
53
54       -v, --version
55           Print the bemenu version number to standard output and exit.
56
57       -w, --wrap
58           Advancing past the end of the list returns you to the start.
59
60       -x, --password
61           Hide filter text.
62
63       --fork
64           Always fork(2) before executing the selections. Disabled by default
65           when using the terminal backend.
66
67       --no-exec
68           Print the selected items to standard output instead of executing
69           them.
70
71       --scrollbar none|always|autohide
72           Specify when to show a scrollbar for vertical lists:
73
74       ┌─────────┬────────────────────────────────────────────────────────────┐
75none     │ Never display a scrollbar (the default).                   │
76       ├─────────┼────────────────────────────────────────────────────────────┤
77always   │ Always display a scrollbar.                                │
78       ├─────────┼────────────────────────────────────────────────────────────┤
79autohide │ Only display a scrollbar when the number of items exceeds  │
80       │         │ the number of lines.                                       │
81       └─────────┴────────────────────────────────────────────────────────────┘
82
83   Backend options
84       These options are only available on backends specified in the parenthe‐
85       ses:
86
87       -b, --bottom (Wayland, X11)
88           The list will appear at the bottom of the screen.
89
90       -f, --grab (Wayland, X11)
91           Show the bemenu window whilst reading the items.
92
93       -H, --line-height <height> (Wayland, X11)
94           Specify the height in point size to make each entry.
95
96       -m, --monitor <index> (Wayland, X11)
97           Specify the monitor index where the list should appear. Monitor in‐
98           dices start at zero. The interpretation of the given argument de‐
99           pends on the utilized backend. With X11 and Wayland, a value of
100           ‘-1’ or focused indicates that the current monitor should be used
101           (the default). With Wayland, the index should be a string specify‐
102           ing a specific monitor name. The value ‘-2’ or all indicates that
103           the list should appear on all monitors.
104
105       -n, --no-overlap (Wayland)
106           Set the bemenu window to be on top of any other panels.
107
108       -M, --margin <margin> (Wayland, X11)
109           Specify the margin (empty space) in pixels to leave between menu
110           and vertical view borders. bemenu will reduce it's size to fit in
111           space between gaps.
112
113       -W, --width-factor <factor> (Wayland, X11)
114           Specify the relative width factor as a floating point number. It
115           makes sense to set it between 0 and 1 to define how much of the
116           screen width bemenu will use. However, bemenu will still respect
117           margin, so if resulting size is greater than space between gaps,
118           bemenu will ignore factor and use available space instead.
119
120       --fn <name [size]> (Wayland, X11)
121           Specify the font family name and size to be used. For more options,
122           consult the Pango Reference Manual for pango_font_descrip‐
123           tion_from_string().
124
125       The following options control the colours for various parts of the list
126       for the Wayland and X11 backends. Each takes an argument in the form
127       of:
128
129           #RGB[A]
130
131       where R, G, B and A are hexadecimal integers from 00–FF that control
132       the red, green, blue and alpha-transparency channels.
133
134       --tb <color>   Title background.
135
136       --tf <color>   Title foreground.
137
138       --fb <color>   Filter background.
139
140       --ff <color>   Filter foreground
141
142       --cb <color>   Cursor background.
143
144       --cf <color>   Cursor foreground
145
146       --nb <color>   Normal background.
147
148       --nf <color>   Normal foreground.
149
150       --hb <color>   Highlighted background.
151
152       --hf <color>   Highlighted foreground.
153
154       --sb <color>   Selected background.
155
156       --sf <color>   Selected foreground.
157
158       --scb <color>  Scrollbar background.
159
160       --scf <color>  Scrollbar foreground.
161

KEYBOARD COMMANDS

163       bemenu supports keyboard commands to move around the list and edit the
164       filter. In the following examples, C-x means <control-x>, M-x means
165       <alt-x> and S-x means <shift-x>:
166
167       <cursor-up>, S-<cursor-left>, C-p, M-j, M-l
168           Highlight the previous item.
169
170       <cursor-down>, <tab>, C-n, M-h, M-k
171           Highlight the next item.
172
173       PageUp, M-v, M-u
174           Show the previous page of items, preserving the offset of the cur‐
175           rently highlighted item, if possible.
176
177       PageDown, C-v, M-d
178           Show the next page of items, preserving the offset of the currently
179           highlighted item, if possible.
180
181       S-M-<, S-PageUp
182           Highlight the first item in the list.
183
184       S-M->, S-PageDown
185           Highlight the last item in the list.
186
187       S-<tab>
188           Copy the highlighted item to the filter.
189
190       <escape>, C-g
191           Terminate bemenu without printing items.
192
193       C-<carriage-return>, C-m
194           Print selected items and the currently highlighted one, and exit.
195           Items are printed in the order they were selected, with the cur‐
196           rently highlighted item printed last.
197
198       S-<carriage-return>, Insert
199           Print the filter text to standard output and exit.
200
201       C-l, <cursor-left>
202           Move cursor left.
203
204       C-f, <cursor-right>
205           Move cursor right.
206
207       C-a, Home
208           Move cursor to the start.
209
210       C-e, End
211           Move cursor to the end.
212
213       <backspace> C-h
214           Remove character before the cursor.
215
216       <delete>
217           Remove character at the cursor.
218
219       C-u, S-<delete>
220           Remove all characters before the cursor.
221
222       C-k
223           Remove all characters after the cursor.
224
225       C-w
226           Clear the filter.
227
228       C-y
229           Paste the clipboard.
230
231       M-[0-9]
232           Print selected items and exit with a custom error code. See EXIT
233           STATUS.
234

ENVIRONMENT

236       ┌─────────────────┬────────────────────────────────────────────────────┐
237BEMENU_OPTS      │ An alternative way to pass command line arguments  │
238       │                 │ to bemenu.                                         │
239       ├─────────────────┼────────────────────────────────────────────────────┤
240BEMENU_BACKEND   │ Force a backend to be used. If empty, one of the   │
241       │                 │ GUI backends (Wayland, X11) will be selected auto‐ │
242       │                 │ matically. The accepted values are curses, wayland 
243       │                 │ and x11.                                           │
244       ├─────────────────┼────────────────────────────────────────────────────┤
245BEMENU_RENDERER  │ Force a backend by loading its shared object from  │
246       │                 │ the set value.                                     │
247       ├─────────────────┼────────────────────────────────────────────────────┤
248BEMENU_RENDERERS │ Override the backend search path to the set value. │
249       │                 │ Defaults to /usr/lib64/bemenu.                     │
250       ├─────────────────┼────────────────────────────────────────────────────┤
251BEMENU_SCALE     │ Override the rendering scale factor for the GUI    │
252       │                 │ backends.                                          │
253       └─────────────────┴────────────────────────────────────────────────────┘
254

EXIT STATUS

256       bemenu exits 0 on success, 1 if the user exited without selecting or an
257       error, and if exiting with a custom error code, 10 plus the number
258       specified.
259

SEE ALSO

261       dmenu(1), fork(2), ncurses(3), tty(4)
262
263       Pango Reference Manual, https://developer.gnome.org/pango/1.46/, August
264       20, 2020, Fonts — pango_font_description_from_string().
265

AUTHORS

267       bemenu is written and maintained by Jari Vetoniemi <mail‐
268       roxas@gmail.com> with the help of various contributors.
269
270
271
272                                  2022-07-11                         bemenu(1)
Impressum