Closed BadgerAAV closed 5 months ago
Moving to discussions to discuss possible regexes. Note that dunst uses the following line to compile the regex:
regcomp(®ex, pattern, REG_NEWLINE | REG_EXTENDED | REG_NOSUB);
You can take a look at man regcomp
and POSIX regex syntax
Issue description
I use batsignal to notify of a low battery on my laptop. Dunstrc has two sections - for all notifications excluding the batsignal application and for the batsignal application itself. With regex excluding only the batsignal application, dust writes in the log
WARNING: Invalid preceding regular expression: "^(?!batsignal).*$"
and does not process my script from "all" section. If I remove the rule, then when receiving a notification from batsignal, both my scripts from the All and batsignal sections are processed, respectively.Installation info
1.9.2 (2023-04-20)
extra/dunst (package)
i3wm
archlinux
Addition to the standard dunstrc
```ini [global] enable_posix_regex = true [all] appname = ^(?!batsignal).*$ script = ~/.config/dunst/bell_sound.sh [batsignal] appname = batsignal script = ~/.config/dunst/power_sound_alert.sh ```Is it possible to use exclusionary expressions in the rules? I want to set the rules for a separate script for one application and one separate script for all the others.