Profile Actions

Profile Actions — Profile Actions

Properties

char * action-name Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── PpdAction

Description

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.

Functions

Types and Values

struct PpdActionClass

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);
};

New profile actions should derive from PpdAction and implement at least activate_profile .

Members

probe ()

Called by the daemon on startup.

 

activate_profile ()

Called by the daemon when the profile changes.

 

power_changed ()

   

PpdAction

typedef struct _PpdAction PpdAction;

Property Details

The “action-name” property

  “action-name”              char *

Action name.

Owner: PpdAction

Flags: Read / Write / Construct Only

Default value: NULL