dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Feature: Add negative comparison for regex (and other things?)

Open fwsmit opened this issue 4 years ago • 2 comments

Even with posix regex implemented (#1017) you cannot do negative matching (for example "appname is not firefox"). To achieve negative matching in an easy way, I'd suggest to allow writing != instead of = for regex rules. In the future this could even be used for other things like matching msg_urgency != critical.

This would look as follows:

[bigger-icons]
    appname != firefox # except for you, firefox
    icons_size = 64

fwsmit avatar Feb 22 '22 22:02 fwsmit

I had this idea: provide (optional) support for extended regexes. On my machine ldd dunst shows libpcre2 (I don't know which lib pulls it in). We may want to actually use it ourselves by adding an optional compile time flag PCRE or something like that. This will allow the use of negative matches and many other nice things. (instead of posix regex)

Do you think this is feasible?

bynect avatar Mar 05 '24 09:03 bynect

Could be feasible yeah. You'll have to see if it's worth the effort

fwsmit avatar Mar 08 '24 15:03 fwsmit