From 8099dbef4cb9b33fc6cc1f00cefbc38337f1e501 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 21 Dec 2016 09:42:04 +0100 Subject: [PATCH 1/2] Add some usage examples to manpage. --- doc/rofi-manpage.markdown | 46 +++++++++++++ doc/rofi.1 | 135 +++++++++++++++++++++++++++++++++++++- 2 files changed, 180 insertions(+), 1 deletion(-) diff --git a/doc/rofi-manpage.markdown b/doc/rofi-manpage.markdown index d876a349..36f0041a 100644 --- a/doc/rofi-manpage.markdown +++ b/doc/rofi-manpage.markdown @@ -839,6 +839,52 @@ The indicator shows: `+` Case insensitive and Sorting enabled `±` Sorting and Case sensitivity enabled" +## EXAMPLES + +Some basic usage examples of **rofi**: + +Show the run dialog: + + rofi -modi run -show run + + +Show the the run dialog and allow switching to Desktop File run dialog (drun): + + rofi -modi run,drun -show run + +Combine the run and Desktop File run dialog (drun): + + rofi -modi combi -show combi -combi-modi run,drun + + +Combine the run and Desktop File run dialog (drun) and allow switching to window switcher: + + rofi -modi combi,window -show combi -combi-modi run,drun + +Run **rofi** full monitor width at the top of the monitor like a dropdown menu: + + rofi -show run -width 100 -location 1 -lines 5 -bw 2 -yoffset -2 + +Get a colored list of available wifi networks: + + tty-pipe nmcli device wifi | out2html -p | rofi -dmenu -markup-rows + +Popup a text message claiming that this is the end: + + rofi -e "This is the end" + +Popup a text message in red, bold font claiming that this is still the end: + + rofi -e "This is still the end>" -markup + +Show all keybindings: + + rofi -show keys + +Use `qalc` to get a simple calculator in **rofi**: + + rofi -show calc -modi "calc:qalc +u8 -nocurrencies" + ## LICENSE MIT/X11 diff --git a/doc/rofi.1 b/doc/rofi.1 index 53acadd0..6bb03a1b 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ROFI\-MANPAGE" "" "2016-12-19" "" "" +.TH "ROFI\-MANPAGE" "" "2016-12-21" "" "" . .SH "NAME" \fBrofi\fR \- A window switcher, run launcher, ssh dialog and dmenu replacement @@ -1336,6 +1336,139 @@ The indicator shows: . .IP "" 0 . +.SH "EXAMPLES" +Some basic usage examples of \fBrofi\fR: +. +.P +Show the run dialog: +. +.IP "" 4 +. +.nf + +rofi \-modi run \-show run +. +.fi +. +.IP "" 0 +. +.P +Show the the run dialog and allow switching to Desktop File run dialog (drun): +. +.IP "" 4 +. +.nf + +rofi \-modi run,drun \-show run +. +.fi +. +.IP "" 0 +. +.P +Combine the run and Desktop File run dialog (drun): +. +.IP "" 4 +. +.nf + +rofi \-modi combi \-show combi \-combi\-modi run,drun +. +.fi +. +.IP "" 0 +. +.P +Combine the run and Desktop File run dialog (drun) and allow switching to window switcher: +. +.IP "" 4 +. +.nf + +rofi \-modi combi,window \-show combi \-combi\-modi run,drun +. +.fi +. +.IP "" 0 +. +.P +Run \fBrofi\fR full monitor width at the top of the monitor like a dropdown menu: +. +.IP "" 4 +. +.nf + +rofi \-show run \-width 100 \-location 1 \-lines 5 \-bw 2 \-yoffset \-2 +. +.fi +. +.IP "" 0 +. +.P +Get a colored list of available wifi networks: +. +.IP "" 4 +. +.nf + +tty\-pipe nmcli device wifi | out2html \-p | rofi \-dmenu \-markup\-rows +. +.fi +. +.IP "" 0 +. +.P +Popup a text message claiming that this is the end: +. +.IP "" 4 +. +.nf + +rofi \-e "This is the end" +. +.fi +. +.IP "" 0 +. +.P +Popup a text message in red, bold font claiming that this is still the end: +. +.IP "" 4 +. +.nf + +rofi \-e "This is still the end>" \-markup +. +.fi +. +.IP "" 0 +. +.P +Show all keybindings: +. +.IP "" 4 +. +.nf + +rofi \-show keys +. +.fi +. +.IP "" 0 +. +.P +Use \fBqalc\fR to get a simple calculator in \fBrofi\fR: +. +.IP "" 4 +. +.nf + + rofi \-show calc \-modi "calc:qalc +u8 \-nocurrencies" +. +.fi +. +.IP "" 0 +. .SH "LICENSE" . .nf From e7375f77e86ac615e17f7588161cf7205a17c2db Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 21 Dec 2016 09:52:55 +0100 Subject: [PATCH 2/2] Fix wrong ' in manpage (should be `) --- doc/rofi-manpage.markdown | 2 +- doc/rofi.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rofi-manpage.markdown b/doc/rofi-manpage.markdown index 36f0041a..21e3f977 100644 --- a/doc/rofi-manpage.markdown +++ b/doc/rofi-manpage.markdown @@ -624,7 +624,7 @@ Message can be multi-line. ### Other -'-pid' *path* +`-pid` *path* Make **rofi** create a pid file and check this on startup. Avoiding multiple copies running simultaneously. This is useful when running **rofi** from a keybinding daemon. diff --git a/doc/rofi.1 b/doc/rofi.1 index 6bb03a1b..d3b91151 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -984,7 +984,7 @@ default: {w} {c} {t} Popup a message dialog (used internally for showing errors) with \fImessage\fR\. Message can be multi\-line\. . .SS "Other" -\'\-pid\' \fIpath\fR +\fB\-pid\fR \fIpath\fR . .P Make \fBrofi\fR create a pid file and check this on startup\. Avoiding multiple copies running simultaneously\. This is useful when running \fBrofi\fR from a keybinding daemon\.