2022-10-22 05:03:11 -04:00
|
|
|
.nh
|
|
|
|
.TH ROFI-DMENU 5 rofi-dmenu
|
2021-12-17 05:13:29 -05:00
|
|
|
.SH NAME
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fBrofi dmenu mode\fP - Rofi dmenu emulation
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.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
|
2023-03-27 12:45:44 -04:00
|
|
|
\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).
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.SH BASIC CONCEPT
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
In \fB\fCdmenu\fR mode, \fBrofi\fP reads data from standard in, splits them into
|
2023-08-23 16:19:07 -04:00
|
|
|
separate entries and displays them. If the user selects a row, this is printed
|
|
|
|
out to standard out, allowing the script to process it further.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
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.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.SH USAGE
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation
|
|
|
|
mode.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
.RS
|
|
|
|
|
|
|
|
.nf
|
2022-10-22 05:03:11 -04:00
|
|
|
ls | rofi -dmenu
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
|
2022-10-22 05:03:11 -04:00
|
|
|
.SS DMENU DROP-IN REPLACEMENT
|
2021-12-17 05:13:29 -05:00
|
|
|
.PP
|
|
|
|
If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode.
|
2023-03-27 12:45:44 -04:00
|
|
|
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\&.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
.RS
|
|
|
|
|
|
|
|
.nf
|
2022-10-22 05:03:11 -04:00
|
|
|
ln -s /usr/bin/rofi /usr/bin/dmenu
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
|
|
|
|
.SS DMENU VS SCRIPT MODE
|
|
|
|
.PP
|
|
|
|
Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script.
|
2023-03-27 12:45:44 -04:00
|
|
|
The two do share much of the same input format. Please see the
|
|
|
|
\fBrofi-script(5)\fP manpage for more information.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.SS DMENU SPECIFIC COMMANDLINE FLAGS
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
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.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-sep\fR \fIseparator\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a
|
|
|
|
separator:
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
.RS
|
|
|
|
|
|
|
|
.nf
|
2022-10-22 05:03:11 -04:00
|
|
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-p\fR \fIprompt\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey',
|
|
|
|
a,b,c,d, or e.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
.RS
|
|
|
|
|
|
|
|
.nf
|
2022-10-22 05:03:11 -04:00
|
|
|
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Default: \fIdmenu\fP
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-l\fR \fInumber of lines to show\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Maximum number of lines the menu may show before scrolling.
|
|
|
|
|
|
|
|
.PP
|
|
|
|
.RS
|
|
|
|
|
|
|
|
.nf
|
2022-10-22 05:03:11 -04:00
|
|
|
rofi -dmenu -l 25
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.fi
|
|
|
|
.RE
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Default: \fI15\fP
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-i\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
Makes \fB\fCdmenu\fR searches case-insensitive
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-a\fR \fIX\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
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:
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.RS
|
|
|
|
.IP \(bu 2
|
|
|
|
A single row: '5'
|
|
|
|
.IP \(bu 2
|
2022-10-22 05:03:11 -04:00
|
|
|
A range of (last 3) rows: '-3:'
|
2021-12-17 05:13:29 -05:00
|
|
|
.IP \(bu 2
|
2022-10-22 05:03:11 -04:00
|
|
|
4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
|
2021-12-17 05:13:29 -05:00
|
|
|
.IP \(bu 2
|
2022-10-22 05:03:11 -04:00
|
|
|
A set of rows: '2,0,-9'
|
2021-12-17 05:13:29 -05:00
|
|
|
.IP \(bu 2
|
2022-10-22 05:03:11 -04:00
|
|
|
Or any combination: '5,-3:,7:11,2,0,-9'
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.RE
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-u\fR \fIX\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
Urgent row, mark \fIX\fP as urgent. See \fB\fC-a\fR option for details.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-only-match\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.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
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-no-custom\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Only return a selected item, do not allow custom entry.
|
|
|
|
This mode returns directly when no entries given.
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-format\fR \fIformat\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
Allows the output of dmenu to be customized (N is the total number of input
|
|
|
|
entries):
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.RS
|
|
|
|
.IP \(bu 2
|
|
|
|
\&'s' selected string
|
|
|
|
.IP \(bu 2
|
2022-10-22 05:03:11 -04:00
|
|
|
\&'i' index (0 - (N-1))
|
2021-12-17 05:13:29 -05:00
|
|
|
.IP \(bu 2
|
2022-10-22 05:03:11 -04:00
|
|
|
\&'d' index (1 - N)
|
2021-12-17 05:13:29 -05:00
|
|
|
.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
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-select\fR \fIstring\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Select first line that matches the given string
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-mesg\fR \fIstring\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
Add a message line below the filter entry box. Supports Pango markup. For more
|
|
|
|
information on supported markup, see
|
|
|
|
here
|
2021-12-17 05:13:29 -05:00
|
|
|
\[la]https://docs.gtk.org/Pango/pango_markup.html\[ra]
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-dump\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Dump the filtered list to stdout and quit.
|
|
|
|
This can be used to get the list as \fBrofi\fP would filter it.
|
2022-10-22 05:03:11 -04:00
|
|
|
Use together with \fB\fC-filter\fR command.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-input\fR \fIfile\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Reads from \fIfile\fP instead of stdin.
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-password\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Hide the input text. This should not be considered secure!
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-markup-rows\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Tell \fBrofi\fP that DMenu input is Pango markup encoded, and should be rendered.
|
|
|
|
See here
|
2023-03-27 12:45:44 -04:00
|
|
|
\[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra]
|
|
|
|
for details about Pango markup.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-multi-select\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
Allow multiple lines to be selected. Adds a small selection indicator to the
|
|
|
|
left of each entry.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-sync\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
Force \fBrofi\fP mode to first read all data from stdin before showing the
|
|
|
|
selection window. This is original dmenu behavior.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
Note: the default asynchronous mode will also be automatically disabled if used
|
|
|
|
with conflicting options,
|
2022-10-22 05:03:11 -04:00
|
|
|
such as \fB\fC-dump\fR, \fB\fC-only-match\fR or \fB\fC-auto-select\fR\&.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-window-title\fR \fItitle\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
Set name used for the window title. Will be shown as Rofi - \fItitle\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-w\fR \fIwindowid\fP
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Position \fBrofi\fP over the window with the given X11 window ID.
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-keep-right\fR
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Set ellipsize mode to start. So, the end of the string is visible.
|
|
|
|
|
2022-01-31 06:56:18 -05:00
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-display-columns\fR
|
2022-01-31 06:56:18 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
A comma seperated list of columns to show.
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-display-column-separator\fR
|
2022-01-31 06:56:18 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
The column separator. This is a regex.
|
|
|
|
|
|
|
|
.PP
|
|
|
|
\fIdefault\fP: '\\t'
|
|
|
|
|
2022-07-23 14:21:00 -04:00
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-ballot-selected-str\fR \fIstring\fP
|
2022-07-23 14:21:00 -04:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
When multi-select is enabled, prefix this string when element is selected.
|
2022-07-23 14:21:00 -04:00
|
|
|
|
|
|
|
.PP
|
|
|
|
\fIdefault\fP: "☑ "
|
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB\fC-ballot-unselected-str\fR \fIstring\fP
|
2022-07-23 14:21:00 -04:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
When multi-select is enabled, prefix this string when element is not selected.
|
2022-07-23 14:21:00 -04:00
|
|
|
|
|
|
|
.PP
|
2022-08-07 03:47:22 -04:00
|
|
|
\fIdefault\fP: "☐ "
|
2022-07-23 14:21:00 -04:00
|
|
|
|
2022-11-19 15:03:22 -05:00
|
|
|
.PP
|
|
|
|
\fB\fC-ellipsize-mode\fR (start|middle|end)
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Set ellipsize mode on the listview.
|
|
|
|
|
|
|
|
.PP
|
|
|
|
\fIdefault\fP "end"
|
|
|
|
|
2022-10-25 13:14:54 -04:00
|
|
|
.SH PARSING ROW OPTIONS
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
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.
|
2022-10-25 13:14:54 -04:00
|
|
|
|
2021-12-17 05:13:29 -05:00
|
|
|
.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
|
2022-10-22 05:03:11 -04:00
|
|
|
\fB10-28\fP: Row accepted by custom keybinding.
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.RE
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
.PP
|
2023-03-27 12:45:44 -04:00
|
|
|
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5),
|
|
|
|
rofi-theme-selector(1), ascii(7)
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.SH AUTHOR
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
Qball Cow qball@gmpclient.org
|
|
|
|
\[la]mailto:qball@gmpclient.org\[ra]
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
Rasmus Steinke rasi@xssn.at
|
|
|
|
\[la]mailto:rasi@xssn.at\[ra]
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
Morgane Glidic sardemff7+rofi@sardemff7.net
|
|
|
|
\[la]mailto:sardemff7+rofi@sardemff7.net\[ra]
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
2022-10-22 05:03:11 -04:00
|
|
|
Original code based on work by: Sean Pringle sean.pringle@gmail.com
|
|
|
|
\[la]mailto:sean.pringle@gmail.com\[ra]
|
2021-12-17 05:13:29 -05:00
|
|
|
|
|
|
|
.PP
|
|
|
|
For a full list of authors, check the AUTHORS file.
|