Power Profiles#
- class ignis.services.power_profiles.PowerProfilesService None #
A service for managing power profiles through the DBus interface power-profiles-daemon provides.
Example usage:
from ignis.services.power_profiles import PowerProfilesService power_profiles = PowerProfilesService.get_default() print(power_profiles.active_profile) power_profiles.active_profile = "performance" for profile in power_profiles.profiles: print(profile) power_profiles.connect("notify::active-profile", lambda x, y: print(power_profiles.active_profile))
- gproperty is_available: bool#
read-only
Whether power profiles capability in UPower is available and UPower is running.
If
False
, this service will not be functional.
- gproperty active_profile: str#
read-write
Current active power profile.
- Should be either of:
performance
balanced
power-saver
- hold_profile(profile: str) None #
This forces the passed profile (only performance or power-saver) to be activated until ignis exits,
release_profile()
is called, or theactive_profile
is changed manually.Use if you need to ensure a specific profile is active for a certain amount of time or while a specific task is being performed. This way the previous state will not have to be managed by you.
- Return type: