Dunst: Raw icon takes priority over icon set via rules

Created on 19 Jul 2017  路  12Comments  路  Source: dunst-project/dunst

Hi, guys

I'm having a awkward error using Dunst and Spotify. Seems like dunst is not recognizing that Spotify is set up to use a custom icon. I use a small script to get the music album art from Spotify and use it as an icon with Spotify notification function and Dunst, but now i just can't get it to work. It was working all the year but now, when i exec dunst -print, it returns raw_icon set: true and not raw_icon set: false and when the notification pop up only a giant album art appears.

How it looks like:
2017-07-19-02-06-51

How it should look like:
2017-07-19-02-07-13

Here's my dunstrc:

DUNST CONFIGURATION FILE

[global]
alignment = left
allow_markup = yes
bounce_freq = 0
browser = /usr/bin/google-chrome-beta -new-tab
dmenu = /usr/bin/dmenu -p dunst
follow = mouse
font = Roboto 7
format = "%s\n%b"
geometry = "300x10-15+37"
horizontal_padding = 8
icon_folders = /usr/share/icons/Notifications
icon_position = left
idle_threshold = 120
ignore_newline = no
indicate_hidden = yes
line_height = 5
monitor = 0
padding = 6
separator_color = auto
separator_height = 0
show_age_threshold = -1
show_indicators = no
sort = yes
startup_notification = false
sticky_history = no
transparency = 40
word_wrap = yes

[frame]
color = "#ffffff"
width = 0

[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
context = ctrl+shift+period
history = ctrl+grave

[urgency_critical]
background = "#ffffff"
foreground = "#262626"
timeout = 0

[urgency_low]
background = "#ffffff"
foreground = "#262626"
timeout = 5

[urgency_normal]
background = "#ffffff"
foreground = "#262626"
timeout = 5

[AN2Linux]
appname = AN2Linux
format = "%s\n%b"
timeout = 10

[Discord]
appname = Discord Canary
format = "Discord\n%s\n%b"
new_icon = Discord

[Dropbox]
appname = Dropbox
format = "Dropbox\n%s\n%b"
new_icon = Dropbox
timeout = 0

[ImageMagick]
appname = ImageMagick
format = "System Notification\n%s\n%b"
timeout = 0

[Mozilla Firefox]
appname = Firefox
format = "Mozilla Firefox\n%s\n%b"
new_icon = Mozilla Firefox
timeout = 0

[NCMPCPP]
appname = NCMPCPP
format = "Now Playing\n%s\n%b"
timeout = 0

[Redshift]
appname = Redshift
format = "System Notification\n%s\n%b"
new_icon = Redshift
timeout = 0

[Spotify]
appname = Spotify
format = "Now Playing\n%s\n%b"
new_icon = Spotify
timeout = 0

[Transmission]
appname = Transmission
format = "Transmission\n%s\n%b"
new_icon = Transmission
timeout = 0

[UpdateChecker]
appname = UpdateChecker
format = "System Notification\n%s\n%b"
new_icon = UpdateChecker
timeout = 0

[Volume]
appname = Volume
format = "System Notification\n%s\n%b"
new_icon = Volume
timeout = 0

Bug

Most helpful comment

No need for an update from the maintainer.
VCS pkgbuilds pull latest version on running makepkg (unless #commit is added to the source line). Purely cosmetic what the maintainer is doing there.

And with adding #branch=branchname to the source line, one can create a package for that specific branch

All 12 comments

Seems like dunst is not recognizing that Spotify is set up to use a custom icon

Looks like the same icon to me, just different dimensions.

Right before the last release I changed the default of the max_icon_size setting to 0 to preserve backwards compatibility. Setting it back to 32 should be what you need to scale the icon.

PS: You can use code blocks to make configuration files much more readable :)

Yeah, is the same icon, but is giant! I wish i could set max_icon_size to 40, because is the dimension that i use in my script. Can i do it ?

I don't see why not? As mentioned in the docs max_icon_size is the maximum size in pixels for the icon, if any of the axis is larger than that it will be scaled down to match that size.

So, how can i do it ? Haha

You can't (currently) set it as a rule if that's what you're asking, just add max_icon_size = 40 in the global section of your config file.

Ok, now the icon is 40x40, however it still showing up as raw_icon set: true, what makes my script do not work the right way, because i use a little bit the imagemagick tool before sending the notification to add that line (separator) between the icon and the text.

I pushed a fix to the 339-icon-priority branch. Can you compile and confirm that it works?

I compile it via aur, but seems like is not working yet

You'll need to download the git repository to test it
Example:

git clone https://github.com/dunst-project/dunst
cd dunst
git checkout 339-icon-priority
make
./dunst

Oh, sorry! Now it's working very well! Thank you very much! Will it be avaliable on the aur repository ?

Awesome, merged to master. It'll be available on the aur the next time the maintainer updates the package.

No need for an update from the maintainer.
VCS pkgbuilds pull latest version on running makepkg (unless #commit is added to the source line). Purely cosmetic what the maintainer is doing there.

And with adding #branch=branchname to the source line, one can create a package for that specific branch

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wpovell picture wpovell  路  5Comments

Kaligule picture Kaligule  路  5Comments

mrmoroshkin picture mrmoroshkin  路  4Comments

adihrustic picture adihrustic  路  3Comments

coxley picture coxley  路  4Comments