SwayNotificationCenter
SwayNotificationCenter copied to clipboard
[Feature Request] criteria-based styling
it'd be nice if styling options could be configured based on criteria. e.g. mako allows users to define styling/visibility options on criteria which are matched against the values in the notifications. It's very useful for assigning more granular visibility/urgency rules (most messaging apps don't send different urgency levels even if you are mentioned).
I imagine it'd work similarly to the current scripts and notification-visibility rules. To clarify, I'm picturing something along the lines of:
{
"$schema": "/etc/xdg/swaync/configSchema.json",
...,
"rules": {
// could very well be an array
"foobar": {
// rules to match against
"criteria": {
"app-name": "Firefox",
"urgency": "Critical",
"summary": ".*foobar\\d+.*"
},
// override timeout for notifications that match
"timeout": 600,
// add css classes to this notification
"classes": [
"user-high-priority",
"user-image"
]
}
}
}
Not sure of how big an ask this is, but it'd make swaync a lot more powerful, and I'd be able to translate my current mako config
I too, would very much like to have something like this, though all I need at the moment is custom timeouts for certain app's notifications.
Then we could probably merge the "notification-visibility" and "scripts" into this 🤔