diff --git a/shell/plugins/services/battery/Service.qml b/shell/plugins/services/battery/Service.qml index eb7561f10f91..c6cee14535f3 100644 --- a/shell/plugins/services/battery/Service.qml +++ b/shell/plugins/services/battery/Service.qml @@ -44,6 +44,10 @@ Item { warningProcess.running = true } + function dismissLowBatteryWarningOnAc() { + Quickshell.execDetached(["bash", "-c", "omarchy-power-present && omarchy-notification-dismiss 'Time to recharge'"]) + } + function applyPowerProfile() { pendingPowerSource = UPower.onBattery ? "battery" : "ac" if (!powerProfileProcess.running) runPendingPowerProfile() @@ -69,7 +73,10 @@ Item { } } - Process { id: warningProcess } + Process { + id: warningProcess + onExited: root.dismissLowBatteryWarningOnAc() + } Process { id: powerProfileProcess @@ -117,6 +124,7 @@ Item { target: UPower function onOnBatteryChanged() { root.checkBattery() + root.dismissLowBatteryWarningOnAc() root.applyPowerProfile() root.refreshPowerProfile() }