DesktopPowerState record

Namespace Runic.Platform in Runic.Platform 0.23.0

public sealed record DesktopPowerState : IEquatable<DesktopPowerState>

Inherits or implements IEquatable.

The computer's power and session state, as far as the operating system tells it.

Remarks

Each value is null when the platform does not say, such as before the first change it reports.

Constructors

DesktopPowerState

public DesktopPowerState()

No documentation.

Properties

IsLocked

public bool? IsLocked { get; init; }

Whether the user's session is locked, so nobody sees the application's windows.

IsLowPower

public bool? IsLowPower { get; init; }

Whether the user or the system asks applications to save energy: Battery Saver or Energy Saver on Windows, Low Power Mode on macOS, and the power-saver profile on Linux.

IsOnBattery

public bool? IsOnBattery { get; init; }

Whether the computer runs on battery; false on mains power and for a computer without a battery.