From 7b88b12bb064319a7680ec6e4a06a2a34e9f0d78 Mon Sep 17 00:00:00 2001 From: Jason Pleau Date: Tue, 7 Apr 2015 21:50:57 -0400 Subject: [PATCH] man: add example for dmenu --- doc/rofi-manpage.markdown | 10 ++++++++++ doc/rofi.1 | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/doc/rofi-manpage.markdown b/doc/rofi-manpage.markdown index cb0e22b4..55247c86 100644 --- a/doc/rofi-manpage.markdown +++ b/doc/rofi-manpage.markdown @@ -109,6 +109,16 @@ The official website for `dmenu` can be found: http://tools.suckless.org/dmenu/ Run rofi in dmenu mode. Allowing it to be used for user interaction in scripts. + In `dmenu` mode, **rofi** will read input from STDIN, and will output to STDOUT by default. + + Example to let the user choose between three pre-defined options: + + echo -e "Option #1\nOption #2\nOption #3" | rofi -dmenu + + Or get the options from a script: + + ~/my_script.sh | rofi -dmenu + Pressing `shift-enter` will open the selected entries and move to the next entry. `-show` *mode* diff --git a/doc/rofi.1 b/doc/rofi.1 index ffea6a5d..1ece4565 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -110,6 +110,24 @@ Set the key combination to display a {mode} in daemon mode. .IP Run rofi in dmenu mode. Allowing it to be used for user interaction in scripts. .IP +In \fB\fCdmenu\fR mode, \fBrofi\fP will read input from STDIN, and will output to STDOUT by default. +.IP +Example to let the user choose between three pre\-defined options: +.PP +.RS +.nf + echo \-e "Option #1\\nOption #2\\nOption #3" | rofi \-dmenu +.fi +.RE +.IP +Or get the options from a script: +.PP +.RS +.nf + ~/my_script.sh | rofi \-dmenu +.fi +.RE +.IP Pressing \fB\fCshift\-enter\fR will open the selected entries and move to the next entry. .PP \fB\fC\-show\fR \fImode\fP