internal: add toasts for gamemode & dnd

This commit is contained in:
2 * r + 2 * t 2025-09-23 14:20:14 +10:00
parent 1dad7d52ea
commit a6deec963c
2 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,6 @@
pragma Singleton
import Caelestia
import Quickshell
import Quickshell.Io
import QtQuick
@ -14,10 +15,13 @@ Singleton {
}
onEnabledChanged: {
if (enabled)
if (enabled) {
setDynamicConfs();
else
Toaster.toast(qsTr("Game mode enabled"), qsTr("Disabled Hyprland animations, blur, gaps and shadows"), "gamepad");
} else {
Quickshell.execDetached(["hyprctl", "reload"]);
Toaster.toast(qsTr("Game mode disabled"), qsTr("Hyprland settings restored"), "gamepad");
}
}
PersistentProperties {

View file

@ -20,6 +20,13 @@ Singleton {
property bool loaded
onDndChanged: {
if (dnd)
Toaster.toast(qsTr("Do not disturb enabled"), qsTr("Popup notifications are now disabled"), "do_not_disturb_on");
else
Toaster.toast(qsTr("Do not disturb disabled"), qsTr("Popup notifications are now enabled"), "do_not_disturb_off");
}
onListChanged: {
if (loaded)
saveTimer.restart();