dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.53k stars 341 forks source link

Filtering by appname not working #1105

Open 0xphk opened 2 years ago

0xphk commented 2 years ago

Issue description

Installation info

I'm trying to filter specific notifications sent by script using -a "appname", but can't get it to work. Filtering by "summary" does not work here, as it's a custom progress bar. Filtering by "category" isn't available in dunstify.

dunstify -a "dunst_volume" -i "$ICON" -h string:x-dunst-stack-tag:volume "$BAR" -r $msgID

[dunst_volume]
  appname = "dunst_volume"
  history_ignore = yes

If I switch to notify-send -c "dunst_volume" [...] the filter is working.

[dunst_volume]
  category = "dunst_volume"
  history_ignore = yes

I tested the bar using -h int:value:$value but it always renders the progress bar after the icon in a newline, which I don't like.

VOL)))
▅▅▅▅▅▅▅▅▅▅

The documentation says, it should filter by "appname" if it's set by the client (script). I know that this is discouraged but I can't use "desktop_entry" in this case.

So how to filter a script if it's using "dunstify" without a text summary?

apprehensions commented 1 year ago

https://github.com/dunst-project/dunst/blob/53a2ff19728aa3584784b0cb313212a1ed3ef801/dunstrc#L344 maybe?

0xphk commented 1 year ago

As stated above, summary unfortunately won't work as it is a custom progress bar with no text to filter.

For now I'll stick to notify-send and use the category instead.