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

VolumeUp? List of buit-in commands? #758

Open
andreyadrian opened this issue Oct 24, 2023 · 1 comment
Open

VolumeUp? List of buit-in commands? #758

andreyadrian opened this issue Oct 24, 2023 · 1 comment

Comments

@andreyadrian
Copy link
Contributor

Is there built-in commands?
Like for volume up, brightness up, etc...

If not, its okay I could just do something like:

c1 (cmd-button "amixer set Master 10%+")

btw any idea why
c1 (cmd-button "kgx")
isnt working in my case
it should run a console window.

I do have
allow-cmd true
in the defcfg

@brosasaki
Copy link

Are you trying to configure builtin keyboard media controls? There are keycodes corresponding to brightness/volume/etc. in ./src/KMonad/Keyboard.hs, you could try binding those keycodes in your defsrc block or any other alias/layer, e.g.:
(defalias c1 volu) ;; volu is a builtin keycode for "KeyVolumeUp"
Well-made software would recognize media control buttons, I think; if they don't, then yeah, you'll have to roll your own media button integration or send a PR there.

As for the cmd-button issues, the first step is to run kmonad with debug logging sudo kmonad -l debug and try the key combo; if the command gives stdout on error, then you will see it in the terminal and can diagnose the issue. Note there is also #426, which causes commands to inherit sudo from kmonad and run in root environment instead of the user; my way of working around this is by wrapping commands with sudo -u and your non-root account, though this is not portable and probably not security-kosher.

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

No branches or pull requests

2 participants