Skip to content

excluding regex does not work in dunstrc rules #1260

@BadgerAAV

Description

@BadgerAAV

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

  • Version: 1.9.2 (2023-04-20)
  • Install type: extra/dunst (package)
  • Window manager / Desktop environment: i3wm
  • Distro: archlinux
Addition to the standard dunstrc
[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions