lighthouse
lighthouse copied to clipboard
Shortcut to set input = currently selected output item
(command would be analogous to Tab Copy the selected item to the input field.
command found in dmenu.)
This is useful when input is complex or when you want to make a selection but then refine it by further typing.
For example, I have an eagerly-completing tmsu tagging script for lighthouse -- I type tag fragments and the script matches them to the best candidate tag name, and also shows other candidates. Currently, selecting other candidates with up/down arrows is not very useful, as you then have to press Enter to finalize the selection, which terminates Lighthouse rather than allowing you to continue refining your selection.
I can probably work up an implementation of this pretty easily. I see we are already using Tab and Shift+Tab -- could we bind this to Control-Tab, or would something else be better?
(Interestingly, Control+Tab currently causes the same behaviour as Tab, even though there is no case for Control+Tab listed in lighthouse.c:process_key_stroke(); is that a bug?)
an alternative to tab complete from selections would be the ability for the script to provide specific tab completes. for example "light" might be a valid query where the first result would be something that turns on the keyboard light, but [tab] might complete to "lighthouse." I'd imagine this would be shown as suggested text like this (note dave is the suggestion but Dave is the first result)
control + tab is likely a bug