1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Async pre-read 25 entries by default, to make it feel more snappy. Fixes #550

This commit is contained in:
Dave Davenport 2017-02-01 21:07:07 +01:00
parent 8e64885c55
commit f10b879cac
3 changed files with 18 additions and 2 deletions

View file

@ -650,6 +650,12 @@ Force rofi mode to first read all data from stdin before showing selection windo
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options
such as `-dump`, `-only-match` or `-auto-select`
`-async-pre-read` *number*
Reads the first 25 entries blocking. Then switches to async mode. This makes it feel more 'snappy'.
*default*: 25
### Message dialog
`-e` *message*

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ROFI\-MANPAGE" "" "January 2017" "" ""
.TH "ROFI\-MANPAGE" "" "February 2017" "" ""
.
.SH "NAME"
\fBrofi\fR \- A window switcher, run launcher, ssh dialog and dmenu replacement
@ -1007,6 +1007,15 @@ Force rofi mode to first read all data from stdin before showing selection windo
.P
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options such as \fB\-dump\fR, \fB\-only\-match\fR or \fB\-auto\-select\fR
.
.P
\fB\-async\-pre\-read\fR \fInumber\fR
.
.P
Reads the first 25 entries blocking\. Then switches to async mode\. This makes it feel more \'snappy\'\.
.
.P
\fIdefault\fR: 25
.
.SS "Message dialog"
\fB\-e\fR \fImessage\fR
.

View file

@ -635,7 +635,7 @@ int dmenu_switcher_dialog ( void )
async = FALSE;
}
if ( async ) {
unsigned int pre_read = 0;
unsigned int pre_read = 25;
find_arg_uint("-async-pre-read", &pre_read);
async = get_dmenu_async ( pd, pre_read );
}
@ -728,4 +728,5 @@ void print_dmenu_options ( void )
print_help_msg ( "-sep", "[char]", "Element separator.", "'\\n'", is_term );
print_help_msg ( "-input", "[filename]", "Read input from file instead from standard input.", NULL, is_term );
print_help_msg ( "-sync", "", "Force dmenu to first read all input data, then show dialog.", NULL, is_term );
print_help_msg ( "-async-pre-read", "[number]", "Read several entries blocking before switching to async mode", "25", is_term);
}