internal: add toasts for gamemode & dnd
This commit is contained in:
parent
1dad7d52ea
commit
a6deec963c
2 changed files with 13 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue