mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Fixes #176 add mode that user expects.
This commit is contained in:
parent
18c53720f0
commit
d11c61cef1
3 changed files with 21 additions and 2 deletions
|
@ -515,6 +515,11 @@ The following options are further explained in the theming section:
|
||||||
Only return a selected item, do not allow custom entry.
|
Only return a selected item, do not allow custom entry.
|
||||||
This mode always returns an entry, or returns directly when no entries given.
|
This mode always returns an entry, or returns directly when no entries given.
|
||||||
|
|
||||||
|
`-no-custom`
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry.
|
||||||
|
This mode returns directly when no entries given.
|
||||||
|
|
||||||
`-format` *format*
|
`-format` *format*
|
||||||
|
|
||||||
Allows the output of dmenu to be customized (N is total number of input entries):
|
Allows the output of dmenu to be customized (N is total number of input entries):
|
||||||
|
|
14
doc/rofi.1
14
doc/rofi.1
|
@ -921,6 +921,20 @@ This mode always returns an entry, or returns directly when no entries given\.
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
|
\fB\-no\-custom\fR
|
||||||
|
.
|
||||||
|
.IP "" 4
|
||||||
|
.
|
||||||
|
.nf
|
||||||
|
|
||||||
|
Only return a selected item, do not allow custom entry\.
|
||||||
|
This mode returns directly when no entries given\.
|
||||||
|
.
|
||||||
|
.fi
|
||||||
|
.
|
||||||
|
.IP "" 0
|
||||||
|
.
|
||||||
|
.P
|
||||||
\fB\-format\fR \fIformat\fR
|
\fB\-format\fR \fIformat\fR
|
||||||
.
|
.
|
||||||
.IP "" 4
|
.IP "" 4
|
||||||
|
|
|
@ -217,7 +217,7 @@ int dmenu_switcher_dialog ( char **input )
|
||||||
}
|
}
|
||||||
|
|
||||||
int only_selected = FALSE;
|
int only_selected = FALSE;
|
||||||
if ( find_arg ( "-only-match" ) >= 0 ) {
|
if ( find_arg ( "-only-match" ) >= 0 || find_arg ( "-no-custom" ) ) {
|
||||||
only_selected = TRUE;
|
only_selected = TRUE;
|
||||||
if ( length == 0 ) {
|
if ( length == 0 ) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -248,7 +248,7 @@ int dmenu_switcher_dialog ( char **input )
|
||||||
/**
|
/**
|
||||||
* Select item mode.
|
* Select item mode.
|
||||||
*/
|
*/
|
||||||
restart = TRUE;
|
restart = ( find_arg ( "-only-match" ) >= 0 );
|
||||||
if ( ( mretv & ( MENU_OK | MENU_QUICK_SWITCH ) ) && list[selected_line] != NULL ) {
|
if ( ( mretv & ( MENU_OK | MENU_QUICK_SWITCH ) ) && list[selected_line] != NULL ) {
|
||||||
dmenu_output_formatted_line ( format, list[selected_line], selected_line, *input );
|
dmenu_output_formatted_line ( format, list[selected_line], selected_line, *input );
|
||||||
retv = TRUE;
|
retv = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue