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

hyprctl binds to also show modkeys (string) instead of just modmask (int) #8606

Open
msmafra opened this issue Nov 28, 2024 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@msmafra
Copy link

msmafra commented Nov 28, 2024

Description

This bind uses $mainMod (SUPER) plus SHIFT plus RETURN and shows modmask 65 as result

❯ hyprctl binds -j | jq -r '.[] | select(.description |contains("Alacritty"))'
{
  "locked": false,
  "mouse": false,
  "release": false,
  "repeat": false,
  "non_consuming": false,
  "has_description": true,
  "modmask": 65,
  "submap": "",
  "key": "RETURN",
  "keycode": 0,
  "catch_all": false,
  "description": "Opens Alacritty terminal",
  "dispatcher": "exec",
  "arg": "alacritty"
}

It would be very nice for it to also show the modkeys

❯ hyprctl binds -j | jq -r '.[] | select(.description |contains("manager"))'
{
  "locked": false,
  "mouse": false,
  "release": false,
  "repeat": false,
  "non_consuming": false,
  "has_description": true,
  "modmask": 64,
  "modkeys":"SUPER SHIFT",
  "submap": "",
  "key": "E",
  "keycode": 0,
  "catch_all": false,
  "description": "Opens your file manager",
  "dispatcher": "exec",
  "arg": "nautilus"
}
"modkeys":"SUPER SHIFT",

or

"modkeys": [
                 "SUPER",
                 "SHIFT"
],

@msmafra msmafra added the enhancement New feature or request label Nov 28, 2024
davc0n added a commit to davc0n/Hyprland that referenced this issue Nov 28, 2024
@vaxerski
Copy link
Member

but why? Modmask is what you want.

@msmafra
Copy link
Author

msmafra commented Nov 30, 2024

but why? Modmask is what you want.

Sorry, my intention is/was not to replace modmask, but to add modkeys. It would allow to a much clear/easier keybinds generation with hyprctl binds, making it a simpler dynamic thing, for example. Even more now with the description for binds.
It would be quicker to check the keybinds with hyprctl -j binds | jq <some_filter_here>

@msmafra
Copy link
Author

msmafra commented Nov 30, 2024

Like so

{
  "modmask": 72,
  "modname": "SUPER ALT",
  "locked": false,
  "mouse": false,
  "release": false,
  "repeat": false,
  "non_consuming": false,
  "has_description": true,
  "submap": "",
  "key": "comma",
  "keycode": 0,
  "catch_all": false,
  "description": "Move current workspace to another monitor decrementally",
  "dispatcher": "movecurrentworkspacetomonitor",
  "arg": "-1"
},
{
  "modmask": 77,
  "modname": "SUPER SHIFT ALT CTRL",
  "locked": false,
  "mouse": false,
  "release": false,
  "repeat": false,
  "non_consuming": false,
  "has_description": true,
  "submap": "",
  "key": "END",
  "keycode": 0,
  "catch_all": false,
  "description": "Exits Hyprland by terminating the user sessions",
  "dispatcher": "exec",
  "arg": "loginctl terminate-user \"\""
}

@vaxerski
Copy link
Member

vaxerski commented Dec 2, 2024

I am generally against duplicating data that can be easily parsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants