-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Shell command options for media keys #256
Conversation
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 suggest to change the naming to cmd-**-**
for a better scheme, which might help to find these commands faster, like --cmd-brightness-up
and --cmd-power-off
.
This feature could be insecure, but yet it's opt to the user to take the risk and make sure it works with their environment. It's simpler and better than my previous solution.
Good point! Done. Do you want the commits squashed together? edit: apologies for accidentally closing the PR when commenting |
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.
Is this acceptable? I tried to keep different key types to their own block of 10.
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 good to me~
You're forgetting the |
Thanks, I was being dumb :p |
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.
Just a quick thing about strdup
, everything else looks great and it works very nicely!
Per discussion in Raymo111#256
Per discussion in Raymo111#256
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.
Couple last things
Adjusted to use 610-660 instead of 650-699
Per discussion in Raymo111#256
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.
LGTM, thanks for contributing!
Closes #136
Description
Enables options to provide a shell command to run for each of the keys that could be passed by
--pass-*-keys
.A master option,
--custom-key-commands
enables all of the others, then each of--*-cmd
corresponds to a single keysym, taking a shell command to run when that key is pressed.This could look like a security hole, but it realistically should be no more dangerous than the existing
--pass-*-keys
options, which let the root window do whatever it wants in responds to the keypress.Release notes
Notes: Enables custom shell commands to handle media, power, screen, and volume keys as an alternative to passing them to the root window.