! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Feature request] Run custom code depending on AC/battery state
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Or Schiro 2014-10-15 08:22:09 CEST
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:

1. Start /usr/bin/dropboxd & /usr/bin/systemctl restart crashplan.service if laptop begins charging. 
2. 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
Comment 1 Harald Judt 2014-10-19 14:25:31 CEST
It's on the roadmap, though no decision has been made about it. At the moment, udev rules are the way to go, e.g.:

KERNEL=="AC", ACTION=="change", SUBSYSTEM=="power_supply", RUN+="/usr/local/sbin/powersave"
Comment 2 Harald Judt 2014-11-19 22:04:45 CET
*** Bug 8965 has been marked as a duplicate of this bug. ***
Comment 3 Git Bot editbugs 2020-05-27 01:37:22 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/6.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #11236

Reported by:
Or Schiro
Reported on: 2014-10-15
Last modified on: 2020-05-27
Duplicates (1):
  • 8965 Linux runtime PM support on battery

People

Assignee:
Ali Abdallah
CC List:
1 user

Version

Version:
Unspecified

Attachments

Additional information