summaryrefslogtreecommitdiffstats
path: root/doc/rofi-dmenu.5
blob: c11dc96c4ff3e53ed9348c5c1dff706f4f65e4da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
.nh
.TH ROFI-DMENU 5 rofi-dmenu
.SH NAME
.PP
\fBrofi dmenu mode\fP - Rofi dmenu emulation

.SH DESCRIPTION
.PP
To integrate \fBrofi\fP into scripts as simple selection dialogs,
\fBrofi\fP supports emulating \fBdmenu(1)\fP (A dynamic menu for X11).

.PP
The website for \fB\fCdmenu\fR can be found here
\[la]http://tools.suckless.org/dmenu/\[ra]\&.

.PP
\fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too many flavors of \fB\fCdmenu\fR\&.
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
Besides, \fBrofi\fP offers some extended features (like multi-select, highlighting, message bar, extra key bindings).

.SH BASIC CONCEPT
.PP
In \fB\fCdmenu\fR mode, \fBrofi\fP reads data from standard in, splits them into separate entries and displays them.
If the user selects an row, this is printed out to standard out, allow the script to process it further.

.PP
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
\fBrofi\fP and the output of rofi into the next.

.SH USAGE
.PP
By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation mode.

.PP
.RS

.nf
ls | rofi -dmenu

.fi
.RE

.SS DMENU DROP-IN REPLACEMENT
.PP
If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode.
This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&.

.PP
.RS

.nf
ln -s /usr/bin/rofi /usr/bin/dmenu

.fi
.RE

.SS DMENU VS SCRIPT MODE
.PP
Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script.
The two do share much of the same input format. Please see the \fBrofi-script(5)\fP manpage for more information.

.SS DMENU SPECIFIC COMMANDLINE FLAGS
.PP
A lot of these options can also be modified by the script using special input. See the \fBrofi-script(5)\fP manpage
for more information about this syntax.

.PP
\fB\fC-sep\fR \fIseparator\fP

.PP
Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a separator:

.PP
.RS

.nf
echo "a|b|c|d|e" | rofi -sep '|' -dmenu

.fi
.RE

.PP
\fB\fC-p\fR \fIprompt\fP

.PP
Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', a,b,c,d, or e.

.PP
.RS

.nf
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"

.fi
.RE

.PP
Default: \fIdmenu\fP

.PP
\fB\fC-l\fR \fInumber of lines to show\fP

.PP
Maximum number of lines the menu may show before scrolling.

.PP
.RS

.nf
rofi -dmenu -l 25

.fi
.RE

.PP
Default: \fI15\fP

.PP
\fB\fC-i\fR

.PP
Makes \fB\fCdmenu\fR searches case-insensitive

.PP
\fB\fC-a\fR \fIX\fP

.PP
Active row, mark \fIX\fP as active. Where \fIX\fP is a comma-separated list of python(1)-style indices and ranges, e.g.  indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:

.RS
.IP \(bu 2
A single row: '5'
.IP \(bu 2
A range of (last 3) rows: '-3:'
.IP \(bu 2
4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
.IP \(bu 2
A set of rows: '2,0,-9'
.IP \(bu 2
Or any combination: '5,-3:,7:11,2,0,-9'

.RE

.PP
\fB\fC-u\fR \fIX\fP

.PP
Urgent row, mark \fIX\fP as urgent. See \fB\fC-a\fR option for details.

.PP
\fB\fC-only-match\fR

.PP
Only return a selected item, do not allow custom entry.
This mode always returns an entry. It will not return if no matching entry is
selected.

.PP
\fB\fC-no-custom\fR

.PP
Only return a selected item, do not allow custom entry.
This mode returns directly when no entries given.

.PP
\fB\fC-format\fR \fIformat\fP

.PP
Allows the output of dmenu to be customized (N is the total number of input entries):

.RS
.IP \(bu 2
\&'s' selected string
.IP \(bu 2
\&'i' index (0 - (N-1))
.IP \(bu 2
\&'d' index (1 - N)
.IP \(bu 2
\&'q' quote string
.IP \(bu 2
\&'p' Selected string stripped from Pango markup (Needs to be a valid string)
.IP \(bu 2
\&'f' filter string (user input)
.IP \(bu 2
\&'F' quoted filter string (user input)

.RE

.PP
Default: 's'

.PP
\fB\fC-select\fR \fIstring\fP

.PP
Select first line that matches the given string

.PP
\fB\fC-mesg\fR \fIstring\fP

.PP
Add a message line below the filter entry box. Supports Pango markup.
For more information on supported markup, see here
\[la]https://docs.gtk.org/Pango/pango_markup.html\[ra]

.PP
\fB\fC-dump\fR

.PP
Dump the filtered list to stdout and quit.
This can be used to get the list as \fBrofi\fP would filter it.
Use together with \fB\fC-filter\fR command.

.PP
\fB\fC-input\fR \fIfile\fP

.PP
Reads from \fIfile\fP instead of stdin.

.PP
\fB\fC-password\fR

.PP
Hide the input text. This should not be considered secure!

.PP
\fB\fC-markup-rows\fR

.PP
Tell \fBrofi\fP that DMenu input is Pango markup encoded, and should be rendered.
See here
\[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra] for details about Pango markup.

.PP
\fB\fC-multi-select\fR

.PP
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.

.PP
\fB\fC-sync\fR

.PP
Force \fBrofi\fP mode to first read all data from stdin before showing the selection window. This is original dmenu behavior.

.PP
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
such as \fB\fC-dump\fR, \fB\fC-only-match\fR or \fB\fC-auto-select\fR\&.

.PP
\fB\fC-window-title\fR \fItitle\fP

.PP
Set name used for the window title. Will be shown as Rofi - \fItitle\fP

.PP
\fB\fC-w\fR \fIwindowid\fP

.PP
Position \fBrofi\fP over the window with the given X11 window ID.

.PP
\fB\fC-keep-right\fR

.PP
Set ellipsize mode to start. So, the end of the string is visible.

.PP
\fB\fC-display-columns\fR

.PP
A comma seperated list of columns to show.

.PP
\fB\fC-display-column-separator\fR

.PP
The column separator. This is a regex.

.PP
\fIdefault\fP: '\\t'

.PP
\fB\fC-ballot-selected-str\fR \fIstring\fP

.PP
When multi-select is enabled, prefix this string when element is selected.

.PP
\fIdefault\fP: "☑ "

.PP
\fB\fC-ballot-unselected-str\fR \fIstring\fP

.PP
When multi-select is enabled, prefix this string when element is not selected.

.PP
\fIdefault\fP: "☐ "

.PP
\fB\fC-ellipsize-mode\fR (start|middle|end)

.PP
Set ellipsize mode on the listview.

.PP
\fIdefault\fP "end"

.SH PARSING ROW OPTIONS
.PP
Extra options for individual rows can be also set. See the \fBrofi-script(5)\fP manpage for details; the syntax and supported features are identical.

.SH RETURN VALUE
.RS
.IP \(bu 2
\fB0\fP: Row has been selected accepted by user.
.IP \(bu 2
\fB1\fP: User cancelled the selection.
.IP \(bu 2
\fB10-28\fP: Row accepted by custom keybinding.

.RE

.SH SEE ALSO
.PP
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)

.SH AUTHOR
.PP
Qball Cow qball@gmpclient.org
\[la]mailto:qball@gmpclient.org\[ra]

.PP
Rasmus Steinke rasi@xssn.at
\[la]mailto:rasi@xssn.at\[ra]

.PP
Morgane Glidic sardemff7+rofi@sardemff7.net
\[la]mailto:sardemff7+rofi@sardemff7.net\[ra]

.PP
Original code based on work by: Sean Pringle sean.pringle@gmail.com
\[la]mailto:sean.pringle@gmail.com\[ra]

.PP
For a full list of authors, check the AUTHORS file.