1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-05 05:12:05 -04:00

notifications: Update Material 3 baselines

- New right-click to mute option
- New independent Notification Animation settings
This commit is contained in:
purian23
2026-02-12 22:16:16 -05:00
committed by bbedward
parent 8399d64c2d
commit 0ffeed3ff0
11 changed files with 350 additions and 48 deletions

View File

@@ -501,6 +501,8 @@ Singleton {
property int notificationTimeoutCritical: 0
property bool notificationCompactMode: false
property int notificationPopupPosition: SettingsData.Position.Top
property int notificationAnimationSpeed: SettingsData.AnimationSpeed.Short
property int notificationCustomAnimationDuration: 400
property bool notificationHistoryEnabled: true
property int notificationHistoryMaxCount: 50
property int notificationHistoryMaxAgeDays: 7
@@ -2152,6 +2154,24 @@ Singleton {
saveSettings();
}
function addMuteRuleForApp(appName, desktopEntry) {
var rules = JSON.parse(JSON.stringify(notificationRules || []));
var pattern = (desktopEntry && desktopEntry !== "") ? desktopEntry : (appName || "");
var field = (desktopEntry && desktopEntry !== "") ? "desktopEntry" : "appName";
if (pattern === "")
return;
rules.push({
enabled: true,
field: field,
pattern: pattern,
matchType: "exact",
action: "mute",
urgency: "default"
});
notificationRules = rules;
saveSettings();
}
function updateNotificationRule(index, ruleData) {
var rules = JSON.parse(JSON.stringify(notificationRules || []));
if (index < 0 || index >= rules.length)