summaryrefslogtreecommitdiff
path: root/modules/BatteryMonitor.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-23 18:10:32 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-23 18:10:32 +1000
commit21e1efd944f39c53c649348559550e18f6a9803b (patch)
tree1bc762bc2e4dd19cae41ae0bae696ed6cf1fa528 /modules/BatteryMonitor.qml
parentaudio: audio device changed toasts (#684) (diff)
downloadcaelestia-shell-21e1efd944f39c53c649348559550e18f6a9803b.tar.gz
caelestia-shell-21e1efd944f39c53c649348559550e18f6a9803b.tar.bz2
caelestia-shell-21e1efd944f39c53c649348559550e18f6a9803b.zip
config: enable/disable specific toasts
Diffstat (limited to 'modules/BatteryMonitor.qml')
-rw-r--r--modules/BatteryMonitor.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/BatteryMonitor.qml b/modules/BatteryMonitor.qml
index bd51c85..7a3be12 100644
--- a/modules/BatteryMonitor.qml
+++ b/modules/BatteryMonitor.qml
@@ -14,9 +14,11 @@ Scope {
function onOnBatteryChanged(): void {
if (UPower.onBattery) {
- Toaster.toast(qsTr("Charger unplugged"), qsTr("Battery is now on AC"), "power_off");
+ if (Config.utilities.toasts.chargingChanged)
+ Toaster.toast(qsTr("Charger unplugged"), qsTr("Battery is now on AC"), "power_off");
} else {
- Toaster.toast(qsTr("Charger plugged in"), qsTr("Battery is charging"), "power");
+ if (Config.utilities.toasts.chargingChanged)
+ Toaster.toast(qsTr("Charger plugged in"), qsTr("Battery is charging"), "power");
for (const level of root.warnLevels)
level.warned = false;
}