summaryrefslogtreecommitdiff
path: root/utils/Icons.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-25 18:28:25 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-25 18:28:25 +1000
commitfbb58e3e1dcd08786afb46740cd18e09dcb51d1e (patch)
treed4ca6d988b25629d2e2db0a062d276b46075fc0c /utils/Icons.qml
parentlock: add session buttons (diff)
downloadcaelestia-shell-fbb58e3e1dcd08786afb46740cd18e09dcb51d1e.tar.gz
caelestia-shell-fbb58e3e1dcd08786afb46740cd18e09dcb51d1e.tar.bz2
caelestia-shell-fbb58e3e1dcd08786afb46740cd18e09dcb51d1e.zip
internal: move notif icon guessing to utils
Diffstat (limited to '')
-rw-r--r--utils/Icons.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/utils/Icons.qml b/utils/Icons.qml
index 078ab2d..96ad194 100644
--- a/utils/Icons.qml
+++ b/utils/Icons.qml
@@ -2,6 +2,7 @@ pragma Singleton
import Quickshell
import Quickshell.Io
+import Quickshell.Services.Notifications
Singleton {
id: root
@@ -202,6 +203,34 @@ Singleton {
return "air";
}
+ function getNotifIcon(summary: string, urgency: int): string {
+ if (summary.includes("reboot"))
+ return "restart_alt";
+ if (summary.includes("recording"))
+ return "screen_record";
+ if (summary.includes("battery"))
+ return "power";
+ if (summary.includes("screenshot"))
+ return "screenshot_monitor";
+ if (summary.includes("welcome"))
+ return "waving_hand";
+ if (summary.includes("time") || summary.includes("a break"))
+ return "schedule";
+ if (summary.includes("installed"))
+ return "download";
+ if (summary.includes("update"))
+ return "update";
+ if (summary.includes("unable to"))
+ return "deployed_code_alert";
+ if (summary.includes("profile"))
+ return "person";
+ if (summary.includes("file"))
+ return "folder_copy";
+ if (urgency === NotificationUrgency.Critical)
+ return "release_alert";
+ return "chat";
+ }
+
FileView {
path: "/etc/os-release"
onLoaded: {