Skip to content

feat(notifications): add file-based filtering rules#1454

Closed
ggyorfi wants to merge 1 commit intonoctalia-dev:mainfrom
ggyorfi:feat/notification-rules
Closed

feat(notifications): add file-based filtering rules#1454
ggyorfi wants to merge 1 commit intonoctalia-dev:mainfrom
ggyorfi:feat/notification-rules

Conversation

@ggyorfi
Copy link
Copy Markdown

@ggyorfi ggyorfi commented Jan 18, 2026

Motivation

Adds support for filtering notifications via ~/.config/noctalia/notification-rules.json. Users can block, mute, or allow notifications based on app name, content patterns, urgency, etc.

Closes #1453

Type of Change

  • New feature

Testing

  • Tested on niri
  • Tested on Hyprland
  • Tested on sway
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors (if applicable)

Manual testing performed:

  • ✅ Notifications work without rules file (backward compat)
  • ✅ Rules file auto-reloads on change
  • ✅ Block action suppresses toast
  • ✅ Mute action skips sound
  • ✅ Both raw and transformed app names match

Screenshots / Videos

N/A (no UI changes)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my code
  • No new warnings or errors
  • Documentation or comments updated (if relevant)

Additional Notes

  • Example config: Assets/notification-rules-default.json
  • Documentation: Added to README.md
  • Future work: Settings UI, additional actions (notoast, snooze, modify)

Add NotificationRulesService for filtering notifications via
 ~/.config/noctalia/notification-rules.json

Supported features:
- Actions: show, block, mute (notoast, snooze, modify declared for future)
- Match conditions: app_name, app_pattern, summary_pattern, body_pattern,
  body_contains, urgency (eq/lt/lte/gt/gte/in), category
- Hot-reload on file change
- Backward compatible (no rules file = no filtering)
@ggyorfi ggyorfi force-pushed the feat/notification-rules branch from 64ee35b to 12e6bdc Compare January 24, 2026 08:54
@ItsLemmy
Copy link
Copy Markdown
Collaborator

I feel like this is too niche of a use case. Usually it's up to the application to offer proper control on notifications.

Also even tho external configuration files are cool, nowhere in Noctalia we rely on direct text editing for configuration.

This could probably be re-worked into a nice little plugin and I would be willing to accommodate an API change for the "evaluate" function to be run when a notification is processed, so that your plugin could work.

@ItsLemmy ItsLemmy closed this Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature proposal: File-based notification filtering rules

2 participants