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
[Feature Request] No daemon option (for temporary binding) #94
Comments
You could specify an extra config and add/remove temporary bindings there (and call |
@baskerville I would need to kill all instances of sxhkd beforehand though, right? Since specifying the config files ( Am I correct? |
Please note that the default configuration file is If you want to launch an extra instance to handle the temporary bindings, you need to start it with And then send the reload signal to the newest instance: |
To handle temporary bindings for the duration of the script, I have the following the script:
When I execute this script, maybe a little under 50% of the time it works as expected--I get the temporary bindings until I cancel the script. However, when I don't get the bindings (no errors reported--the temporary bindings just don't work), then restarting this script will never work unless I execute the script to kill all instances of sxhkd and then start the system-wide permanent bindings:
Any idea what may be the issue? To be clear, I already have an instance of |
@baskerville , @rieje See: https://stackoverflow.com/questions/20132671/how-to-kill-process-synchronously-on-linux I see two solutions: [1] Expose a sxhkd command that allows you to disable/enable key bindings on-the-fly. |
Making this smooth would be a good way to work around having i3-like modes stored in a separate file. Would be great to see progress here |
Perhaps https://github.com/hbekel/xchainkeys is in the meanwhile of interest. |
Xchainkeys is still pretty janky sadly. Almost more effort than it's worth to re-write config for it. |
xbindkeys
has the-n
option for no-daemon mode. This is incredibly useful for scripts where bindings can be temporarily assigned for the duration of the running script. For example, I can run a script that hasxbindkeys
re-map the space bar to execute another script which runsxdotools
so that I can mouse-over any webpage, hit space bar, and it will copy that webpage's URL into clipboard and append it to a text file. If I were to bind the script to a hotkey viasxhkdrc
, then it would have to be an unused hotkey (which is limited and inconvenient).I realize it goes against the spirit of the name of
sxhkd
but I wonder how difficult it is to implement such a feature. Or perhaps I can already do something similar withsxhkd
. This is the only thing holding me back from switching tosxhkd
fully.The text was updated successfully, but these errors were encountered: