As for how the available completions gets put to dmenu, maybe the script could check if a specific word is contained in the returned query, say, %%. I need to find a good one that:
is fast (and easy) to type; and
is an uncommon term that is very unlikely to conflict with an actual search term.
Maybe it could be configurable? DMENU_SURFRAW_COMPLETION_WORD? That's really long.
This requires API query completions to be implemented in
mkelvis
and co. See https://github.com/Hoboneer/surfraw-tools/issues/20.As for how the available completions gets put to
dmenu
, maybe the script could check if a specific word is contained in the returned query, say,%%
. I need to find a good one that:Maybe it could be configurable?
DMENU_SURFRAW_COMPLETION_WORD
? That's really long.It should limit completion requests to once per 10 seconds--maybe 5. I'll have to look around for common timeouts (https://www.nzsl.nz seems to have one of 10 seconds; see https://github.com/ODNZSL/nzsl-online/blob/1a12f4db3c7ee2fb02860c51e9acf20384248570/app/services/autocomplete_search_service.rb#L5).