Profile Actions

Profile Actions — Profile Actions

Properties

gchar * 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;

  gboolean       (* probe)            (PpdAction  *action);
  gboolean       (* activate_profile) (PpdAction  *action,
                                       PpdProfile  profile,
                                       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.

 

PpdAction

typedef struct _PpdAction PpdAction;

Property Details

The “action-name” property

  “action-name”              gchar *

Action name.

Owner: PpdAction

Flags: Read / Write / Construct Only

Default value: NULL