Top |
Profile actions are actions to run on profile change that do not affect the overall power usage, or performance level of the system, but instead of individual components.
For example, an action might want to save energy when in the power-saver
profile, and thus reduce the charging speed of a particular device. Or it
could automatically reduce the speed of animations, or luminosity of an
RGB keyboard.
The list of actions that are currently running is available through the D-Bus API.
Note that power-profiles-daemon
can only accept PpdActions that
will not make devices appear “broken” to users not in the know, so actions
will never disable Wi-Fi or Bluetooth, or make some buttons stop working
until power saving is turned off.
struct PpdActionClass { GObjectClass parent_class; PpdProbeResult (* probe) (PpdAction *action); gboolean (* activate_profile) (PpdAction *action, PpdProfile profile, GError **error); gboolean (* power_changed) (PpdAction *action, PpdPowerChangedReason reason, GError **error); gboolean (* battery_changed) (PpdAction *action, gdouble val, GError **error); };
New profile actions should derive from PpdAction and implement
at least activate_profile
.