Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show Hotkeys-Help with search or fuzzy finder (like telescope in nvim) #3963

Open
actionless opened this issue Oct 5, 2024 Discussed in #3962 · 3 comments
Open

show Hotkeys-Help with search or fuzzy finder (like telescope in nvim) #3963

actionless opened this issue Oct 5, 2024 Discussed in #3962 · 3 comments

Comments

@actionless
Copy link
Member

Discussed in #3962

Originally posted by DeepReef11 October 4, 2024
I think the help panel would be much more useful if it had at least a search function and even better if it could be a fuzzy finder.

@actionless actionless changed the title show help with search or fuzzy finder (like telescope in nvim) show Hotkeys-Help with search or fuzzy finder (like telescope in nvim) Oct 5, 2024
@kosorin
Copy link
Contributor

kosorin commented Oct 13, 2024

Maybe I could do that, or at least some very basic searching.

In my config, I completely rewrote the default awful.hotkeys_popup. It doesn't perform fuzzy searching, but a simple search is good enough for me.

It takes a query string, splits it by whitespace, and then tries to match every word in the descriptions and keys.

Matching keys is a bit tricky. The whole word must match exactly. For example, if the query is "sup", it wouldn't make sense to highlight every keybinding containing the "super" key. Another example is if there is a keybinding super + ⬅️, the user can find it by typing "super left".

So, when the awful.hotkeys_popup is shown, it could automatically call awful.prompt.run and highlight the keybinding descriptions as the user types. But I'm uncertain whether this aligns with awesomewm philosophy.

image

bindbox.mp4

@actionless
Copy link
Member Author

yup, looks solid 👌😺

@actionless
Copy link
Member Author

So, when the awful.hotkeys_popup is shown, it could automatically call awful.prompt.run and highlight the keybinding descriptions as the user types

you still need though to handle Escape key (and mb make it configurable to set on which keys it could be closed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants