plugin: rust-side modules + theme services with serde-typed config
This commit is contained in:
parent
a86e90e927
commit
f34f3f2f4e
95 changed files with 2477 additions and 1011 deletions
|
|
@ -4,6 +4,7 @@ import QtQuick
|
|||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import "." as S
|
||||
import NovaStats as NS
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
|
@ -96,7 +97,7 @@ QtObject {
|
|||
});
|
||||
|
||||
// Trim excess popups
|
||||
const max = S.Modules.notifications.maxPopups || 4;
|
||||
const max = NS.ModulesService.notificationsMaxPopups || 4;
|
||||
const currentPopups = root.list.filter(n => n.popup);
|
||||
if (currentPopups.length > max) {
|
||||
for (let i = max; i < currentPopups.length; i++)
|
||||
|
|
@ -106,13 +107,13 @@ QtObject {
|
|||
|
||||
// Auto-expire popup (skip for critical)
|
||||
if (item.popup && !isCritical) {
|
||||
const timeout = notif.expireTimeout > 0 ? notif.expireTimeout : (S.Modules.notifications.timeout || 3000);
|
||||
const timeout = notif.expireTimeout > 0 ? notif.expireTimeout : (NS.ModulesService.notificationsTimeout || 3000);
|
||||
item._expireTimer.interval = timeout;
|
||||
item._expireTimer.running = true;
|
||||
}
|
||||
|
||||
// Trim history (-1 = unlimited)
|
||||
const maxHistory = S.Modules.notifications.maxHistory ?? -1;
|
||||
const maxHistory = NS.ModulesService.notificationsMaxHistory ?? -1;
|
||||
while (maxHistory > 0 && root.list.length > maxHistory) {
|
||||
const old = root.list.pop();
|
||||
old.finishDismiss();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue