-
Notifications
You must be signed in to change notification settings - Fork 13
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: Run shell command on display change detected #65
Milestone
Comments
This would be most useful. |
We could also dump the state to, say, |
How would I process the state? I'd have to watch the file then, I guess? |
The command is the important part, state is just Nice To Have. |
#71 is a better alternative to writing a state file. |
alex-courtis
changed the title
Feature request: Run shell command on display change detected
Feature: Run shell command on display change detected
May 15, 2023
alex-courtis
added a commit
that referenced
this issue
Apr 20, 2024
* add spawn_async function * add ON_CHANGE_CMD config * spawn on_change_cmd in handle_success * adapt marshalling tests * isolate the spawed process a bit more * ignore adaptive sync changes Can't think of a use case to run a command when vrr changes * add a test for the change command * add ON_CHANGE_CMD to cfg.yaml * sanitary fixes * wrap spawn_async and simplify the on_change_cmd test Now we are not testing if the command actually gets executed. * fix mem leak due to creating the default config twice * rename to CHANGE_SUCCESS_CMD * add cli set and delete for CHANGE_SUCCESS_CMD * add CHANGE_SUCCESS_CMD to print_cfg and print_cfg_commands * add cfg merge tests for change_success_cmd * revision spawn command - only fork once - rename from spawn_async to spawn_sh_cmd * add CHANGE_SUCCESS_CMD to cli usage * add CHANGE_SUCCESS_CMD to man * prepare for next minor release * setup signal handlers in the server to avoid zombie processes Thanks to dwm :) * add compound command example, unify man and cfg.yaml --------- Co-authored-by: Alexander Courtis <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for this great tool. It detects when plugging in a display just fine. But I'd like to run a shell script e.g. to setup the desktop background on change. My proposal would be to add to the config a line:
The text was updated successfully, but these errors were encountered: