summaryrefslogtreecommitdiff
path: root/modules/Shortcuts.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-21 17:34:55 +1000
committerGitHub <noreply@github.com>2025-09-21 17:34:55 +1000
commit37b61cb0d923bc8ab988a0ba4174cd55de458bdc (patch)
treeee4808009110c6e85540b4b6d0f0b947b3f80d25 /modules/Shortcuts.qml
parentsidebar/notifs: add link support (diff)
parentfeat: add battery warnings (diff)
downloadcaelestia-shell-37b61cb0d923bc8ab988a0ba4174cd55de458bdc.tar.gz
caelestia-shell-37b61cb0d923bc8ab988a0ba4174cd55de458bdc.tar.bz2
caelestia-shell-37b61cb0d923bc8ab988a0ba4174cd55de458bdc.zip
Merge pull request #662 from caelestia-dots/toasts
utilities: add toasts & battery warnings
Diffstat (limited to 'modules/Shortcuts.qml')
-rw-r--r--modules/Shortcuts.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/Shortcuts.qml b/modules/Shortcuts.qml
index bf1cded..a62b827 100644
--- a/modules/Shortcuts.qml
+++ b/modules/Shortcuts.qml
@@ -1,6 +1,7 @@
import qs.components.misc
import qs.modules.controlcenter
import qs.services
+import Caelestia
import Quickshell
import Quickshell.Io
@@ -95,4 +96,24 @@ Scope {
WindowFactory.create();
}
}
+
+ IpcHandler {
+ target: "toaster"
+
+ function info(title: string, message: string, icon: string): void {
+ Toaster.toast(title, message, icon, Toast.Info);
+ }
+
+ function success(title: string, message: string, icon: string): void {
+ Toaster.toast(title, message, icon, Toast.Success);
+ }
+
+ function warn(title: string, message: string, icon: string): void {
+ Toaster.toast(title, message, icon, Toast.Warning);
+ }
+
+ function error(title: string, message: string, icon: string): void {
+ Toaster.toast(title, message, icon, Toast.Error);
+ }
+ }
}