Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw icon takes priority over icon set via rules #339

Closed
jonathashenriques opened this issue Jul 19, 2017 · 12 comments
Closed

Raw icon takes priority over icon set via rules #339

jonathashenriques opened this issue Jul 19, 2017 · 12 comments
Labels

Comments

@jonathashenriques
Copy link

jonathashenriques commented Jul 19, 2017

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

@tsipinakis
Copy link
Member

tsipinakis commented Jul 19, 2017

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 :)

@jonathashenriques
Copy link
Author

jonathashenriques commented Jul 19, 2017

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 ?

@tsipinakis
Copy link
Member

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.

@jonathashenriques
Copy link
Author

So, how can i do it ? Haha

@tsipinakis
Copy link
Member

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.

@jonathashenriques
Copy link
Author

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.

@tsipinakis tsipinakis changed the title Error using Dunst with Spotify Raw icon takes priority over icon set via rules Jul 19, 2017
@tsipinakis tsipinakis added the Bug label Jul 19, 2017
@tsipinakis
Copy link
Member

tsipinakis commented Jul 19, 2017

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

@jonathashenriques
Copy link
Author

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

@tsipinakis
Copy link
Member

tsipinakis commented Jul 19, 2017

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

@jonathashenriques
Copy link
Author

jonathashenriques commented Jul 19, 2017

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

@tsipinakis
Copy link
Member

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

@Narrat
Copy link

Narrat commented Jul 19, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants