-
Notifications
You must be signed in to change notification settings - Fork 625
Customize sorting of modifiers in the hotkeys popup #4042
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
Customize sorting of modifiers in the hotkeys popup #4042
Conversation
Normally the modifiers are sorted alphabetically before being displayed in the hotkeys popup, I now added a special sort that, by default, follows the windows hotkey order.
Feature is now activated with a boolean variable, also added comments that get parsed by LDoc to document it
but that's not even what implemented in your code, did you tried running it yourself before submitting? |
Yes, it's what I'm using on my install. |
|
ok, if you claiming it works for you, show how you:
in your rc.lua for getting custom order |
Right now I'm replying from the airport, I'll get back to this once I install awesomeWM on the laptop I'm bringing with me |
|
there is no hurry, but i'd like to point it out, that aside of what i already mentioned above, it clearly not even building: https://github.com/awesomeWM/awesome/actions/runs/19651720043/job/58016350962?pr=4042 so please don't lie about things which they are not |
|
To make it work I added this to the default rc.lua: right after the initial part of: Also, I'm getting: When running |
Sorry about this, I originally only modified the widget.lua file from my install without doing a fork and then building and installing, so I messed up the LDoc comments for what I added, that and I had missed the s in modifiers. Now it builds, installs and runs on my local linux mint installation. |
lib/awful/hotkeys_popup/widget.lua
Outdated
| -- Ctrl = 2, | ||
| -- Super = 3, | ||
| -- Alt = 4, | ||
| -- } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it would be better to have one parameter for this same thing (sorting), instead of two:
- hotkeys_popup.widget.use_special_hotkey_mod_sort
- hotkeys_popup.widget.special_hotkey_mod_order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks much better now 👌😸
no, those lines are not what's causing luacheck to fail: https://github.com/awesomeWM/awesome/actions/runs/20239923820/job/58512550933?pr=4042 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4042 +/- ##
===========================================
+ Coverage 54.45% 90.41% +35.95%
===========================================
Files 262 938 +676
Lines 31196 60242 +29046
Branches 1139 1139
===========================================
+ Hits 16988 54467 +37479
+ Misses 13702 5269 -8433
Partials 506 506
🚀 New features to boost your workflow:
|
removed use_special_hotkey_mod_sort modifier_sort_order is always used and its default is alphabetical sort
… popup Add widget.modifier_sort_order table allowing users to customize how modifier keys are sorted when displayed in the hotkeys popup. Default order: Alt, Ctrl, Shift, Super (alphabetical) Users can override in rc.lua after requiring awful.hotkeys_popup. Upstream: awesomeWM/awesome#4042
… popup (#179) Add widget.modifier_sort_order table allowing users to customize how modifier keys are sorted when displayed in the hotkeys popup. Default order: Alt, Ctrl, Shift, Super (alphabetical) Users can override in rc.lua after requiring awful.hotkeys_popup. Upstream: awesomeWM/awesome#4042
Add the ability to customize the sorting order of the modifiers in the hotkeys popup.
Normally, the modifier keys in hotkeys get sorted before being shown in the hotkeys popup, which I didn't like, so I wanted to add a way for customizing it.
I added a new function that's only used for that, a default order and a variable that needs to be set to
truefor new sorting to be used. A custom order can be specified by in therc.luafile of the user.