From 4da22a434588d835e231ddc2b16007cc78d78240 Mon Sep 17 00:00:00 2001 From: Iris <78657554+RaiHormo@users.noreply.github.com> Date: Fri, 27 Feb 2026 16:45:52 +0200 Subject: [PATCH] Change IsPluggedIn logic (#1859) Co-authored-by: Iris --- quickshell/Services/BatteryService.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickshell/Services/BatteryService.qml b/quickshell/Services/BatteryService.qml index cebc9409..e7cea566 100644 --- a/quickshell/Services/BatteryService.qml +++ b/quickshell/Services/BatteryService.qml @@ -56,8 +56,8 @@ Singleton { } readonly property bool isCharging: batteryAvailable && batteries.some(b => b.state === UPowerDeviceState.Charging) - // Is the system plugged in (none of the batteries are discharging or empty) - readonly property bool isPluggedIn: batteryAvailable && batteries.every(b => b.state !== UPowerDeviceState.Discharging) + // Is the system plugged in (Is not running on battery) + readonly property bool isPluggedIn: !UPower.onBattery readonly property bool isLowBattery: batteryAvailable && batteryLevel <= 20 onIsPluggedInChanged: {