To integrate rofi into scripts as simple selection dialogs, rofi supports emulating dmenu(1) (A dynamic menu for X11).
The website for
dmenu can be found here ⟨http://tools.suckless.org/dmenu/⟩.
rofi does not aim to be 100% compatible with
dmenu. There are simply too many flavors of
dmenu. The idea is that the basic usage command-line flags are obeyed, theme-related flags are not. Besides, rofi offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
dmenu mode, rofi 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.
By default separation of rows is done on new lines, making it easy to pipe the output a one application into rofi and the output of rofi into the next.
By launching rofi with the
-dmenu flag it will go into dmenu emulation mode.
ls | rofi -dmenu
- 0: Row has been selected accepted by user.
- 1: User cancelled the selection.
- 10-28: Row accepted by custom keybinding.
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
Qball Cow firstname.lastname@example.org ⟨mailto:email@example.com⟩
Rasmus Steinke firstname.lastname@example.org ⟨mailto:email@example.com⟩
Morgane Glidic firstname.lastname@example.org ⟨mailto:email@example.com⟩
Original code based on work by: Sean Pringle firstname.lastname@example.org ⟨mailto:email@example.com⟩
For a full list of authors, check the AUTHORS file.