plugin: rust-side modules + theme services with serde-typed config

This commit is contained in:
Damocles 2026-05-04 22:58:12 +02:00
parent a86e90e927
commit f34f3f2f4e
95 changed files with 2477 additions and 1011 deletions

View file

@ -4,11 +4,12 @@ import Quickshell.Services.Notifications
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.notifications.enable
spacing: S.Theme.moduleSpacing
active: NS.ModulesService.notificationsEnable
spacing: NS.ThemeService.moduleSpacing
tooltip: S.NotifService.count > 0 ? "Notifications: " + S.NotifService.count + (S.NotifService.dnd ? " (DND)" : "") : (S.NotifService.dnd ? "Do not disturb" : "No notifications")
panelNamespace: "nova-notifications"
panelContentWidth: 350
@ -28,13 +29,13 @@ M.BarModule {
return S.NotifService.count > 0 ? "\uDB80\uDCA0" : "\uDB82\uDE93";
return S.NotifService.count > 0 ? "\uDB84\uDD6B" : "\uDB80\uDC9C";
}
color: S.NotifService.dnd ? S.Theme.base04 : root.accentColor
color: S.NotifService.dnd ? NS.ThemeService.base04 : root.accentColor
anchors.verticalCenter: parent.verticalCenter
}
M.BarLabel {
id: countLabel
label: S.NotifService.count > 0 ? String(S.NotifService.count) + (root.hasUrgent ? "!" : "") : ""
color: root.hasUrgent ? S.Theme.base08 : root.accentColor
color: root.hasUrgent ? NS.ThemeService.base08 : root.accentColor
anchors.verticalCenter: parent.verticalCenter
transform: Scale {
@ -67,7 +68,7 @@ M.BarModule {
Connections {
target: S.NotifService
function onCountChanged() {
if (S.NotifService.count > 0 && !S.Theme.reducedMotion)
if (S.NotifService.count > 0 && !S.ThemeUtil.reducedMotion)
popAnim.start();
}
}