[Feature request] Run custom code depending on AC/battery state
Submitted by Or Schiro
Assigned to Ali Abdallah @ali
Description
This feature request has been first discussed on forum.xfce.org [1] and I would like to draw your attention on this.
I would like to discuss with you the feature to run custom code depending on the machine's AC state. I am thinking of two input fields in the settings GUI that allow the user to enter custom code that is triggered and run on either "machine switched to charging" or "machine switched to battery".
Use case example:
- Start /usr/bin/dropboxd & /usr/bin/systemctl restart crashplan.service if laptop begins charging.
- If laptop begins to run on battery, run /usr/bin/killall dropboxd & /usr/bin/systemctl stop crashplan.service.
As far as I am aware, this would make Xfce Power Manager quite unique. Tools such as TLP do not offer to run custom code.
Let me please know what you think about such a feature.
[1] https://forum.xfce.org/viewtopic.php?pid=34746#p34746
Version: Unspecified