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
|
pragma Singleton
|
||||||
|
|
||||||
|
import Caelestia
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
@ -14,10 +15,13 @@ Singleton {
|
||||||
}
|
}
|
||||||
|
|
||||||
onEnabledChanged: {
|
onEnabledChanged: {
|
||||||
if (enabled)
|
if (enabled) {
|
||||||
setDynamicConfs();
|
setDynamicConfs();
|
||||||
else
|
Toaster.toast(qsTr("Game mode enabled"), qsTr("Disabled Hyprland animations, blur, gaps and shadows"), "gamepad");
|
||||||
|
} else {
|
||||||
Quickshell.execDetached(["hyprctl", "reload"]);
|
Quickshell.execDetached(["hyprctl", "reload"]);
|
||||||
|
Toaster.toast(qsTr("Game mode disabled"), qsTr("Hyprland settings restored"), "gamepad");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PersistentProperties {
|
PersistentProperties {
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,13 @@ Singleton {
|
||||||
|
|
||||||
property bool loaded
|
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: {
|
onListChanged: {
|
||||||
if (loaded)
|
if (loaded)
|
||||||
saveTimer.restart();
|
saveTimer.restart();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue