-
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
Additional CHANGE_SUCCESS_CMD Functionality #164
Comments
Hi @alex-courtis ; apologies for the delay (as usual life expects a lot from me!). What kind of feedback would you like here? I really like the idea of state-change hooks, but it does seem like a missed opportunity to think more about both additional hooks (like failures) and multiple hooks for the same state change. I suspect we could run multiple commands in the existing implementation by stacking sh-commands... though I cannot remember (and don't have time to look into the code as I type this to check) whether multi-line strings are supported by the config parser [call me lazy, but I don't want to have to create another external script file to act as the hook]. I do also like the idea of a "last" state, but I'm not sure in practice how much value it would add. I don't think I would use it personally. I'm also not sure what I would do with a config reload hook (as distinct from the mode-changes effected by reloading the config), but perhaps there are good examples? |
Many thanks for your thoughts!
That is achievable. YAML does support multiline. Providing the command is expressed as a single shell executable e.g. Script files in this sort of context are divisive. The user could use either, however a script could be encouraged as multiple commands could be difficult for the novice shell scripter.
Yes, I'm also not quite sure of a use case beyond some script action that depends on the delta.
Unless this is completely trivial, YAGNI. |
Actually, multiline came out nicely: https://github.com/alex-courtis/way-displays/wiki/Configuration#change_success_cmd |
Love it! |
Work in progress: #168 Human readable change message is written to a file for notify-send to post. It might be time to remove all but the changed attribute from the "from:". |
#162 adds
CHANGE_SUCCESS_CMD
as a success hook. Additional information coould be built on this.Issue to discuss these @matthewwardrop
Possibilites include:
The text was updated successfully, but these errors were encountered: