Closed kristianvld closed 1 year ago
Not entirely sure, but I think in https://github.com/phuhl/linux_notification_center/pull/138 you can match everything by having an empty match.
Then you could use the scripting method to match however you like in a script and only modify when you match, using this:
Btw, you can test what is in https://github.com/phuhl/linux_notification_center/pull/138 as of today. The code is there. The only reason it is not merged, yet, is because it has a lot of braking changes regarding configuration. But one day, when I feel brave, I probably will merge.
If you try that, I'd love to hear your feedback on how it went
Should be fixed by new config format
I don't think matching all works?
Without any match:
deadd-notification-center: AesonException "Error in $.modifications[7]: key \"match\" not found"
Empty match block"
deadd-notification-center: AesonException "Error in $.modifications[7].match: parsing Map failed, expected Object, but encountered Null"
And matching with an empty filter string doesn't match anything.
What is your config?
All right, apparently I didn't know how to define empty Maps in yaml, your question made me question my own knowledge and I found a solution. If anyone else is looking for it
modifications:
- match: {}
script: "/home/santzes/.config/qtile/notifications/processor/process_notification.py"
seems to match everything. Thanks
It would be really nice to be able to match patterns and not only exact values.
For instance, being able to match any notifications with a word in the title or body would be nice. Either with simple pattern like
This on it's own could be really powerful, but even more so when #138 gets implemented.
The last example would also be a nice way to match any notifications. Currently I don't see any way to do this, even though I would expect an empty match to do this (as all [none] match conditions are met).