mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 23:39:27 -05:00
battery: prevent auto suspend due to low bluetooth batt (#1882)
This commit is contained in:
@@ -12,12 +12,12 @@ Singleton {
|
||||
property var chargeState: UPower.displayDevice.state
|
||||
property bool isCharging: chargeState == UPowerDeviceState.Charging
|
||||
property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge
|
||||
property real percentage: UPower.displayDevice.percentage
|
||||
property real percentage: UPower.displayDevice?.percentage ?? 1
|
||||
readonly property bool allowAutomaticSuspend: Config.options.battery.automaticSuspend
|
||||
|
||||
property bool isLow: percentage <= Config.options.battery.low / 100
|
||||
property bool isCritical: percentage <= Config.options.battery.critical / 100
|
||||
property bool isSuspending: percentage <= Config.options.battery.suspend / 100
|
||||
property bool isLow: available && (percentage <= Config.options.battery.low / 100)
|
||||
property bool isCritical: available && (percentage <= Config.options.battery.critical / 100)
|
||||
property bool isSuspending: available && (percentage <= Config.options.battery.suspend / 100)
|
||||
|
||||
property bool isLowAndNotCharging: isLow && !isCharging
|
||||
property bool isCriticalAndNotCharging: isCritical && !isCharging
|
||||
|
||||
Reference in New Issue
Block a user