-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: inputs
command to display a palette menu with all user defined inputs
#665
Conversation
tomasklaen
commented
Oct 3, 2023
is |
|
That could probably be done with a single Is the menu item parsing code still exactly the same as before? |
I've tried, but after running into issues (like the original won't match lines that don't end with a comment), I've realized that the resulting pattern and subsequent handling of its outputs would be too hacky, lost patience, and just split it into a separate match so it's simple and clear what's going on in each. It's not like there's a risk of this becoming a performance issue.
Yes.
Yeah I guess this is the most versatile one. |
Yeah I already suspected that's what happened, parsing can be surprisingly tricky at times. |
I've now tried it and it already works well, but by parsing input.conf we miss out on keybindings from other scripts. Alternatively we could do something like stats.lua. Another thing not directly related to this is that very long titles can end up cutting off even short hints because of the way the space gets divided. And dividing it up linearly is also not really optimal, shorter strings should have get a higher weight per length then longer ones. Some sort of sigmoid, but mirrored around the 45 degree axis and going from 0 to 1 instead of infinity in both directions. Something with arcsin maybe? I'll make a PR when I come up with something useful. |
I had no idea |
The code looks and works fine, but sorting the items in some way would be nice. Currently there is no order at all. |
Yes, the order from |