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

Overriding a notification's raw icon #1009

Closed
hokomo opened this issue Jan 6, 2022 · 4 comments
Closed

Overriding a notification's raw icon #1009

hokomo opened this issue Jan 6, 2022 · 4 comments

Comments

@hokomo
Copy link

hokomo commented Jan 6, 2022

Issue description

I can't seem to be able to override the icon of a Discord notification using the new_icon setting as descibed in the manual. The body gets overriden according to the format setting, but not the icon. The same rule works when I test it on a notification sent with notify-send however. Here's the output of dunst -print (with some details elided with the <home>, <user> and <channel> variables):

{
    appname: 'notify-send'
    summary: '<user>'
    body: 'testing'
    icon: '/home/<home>/.config/dunst/hello.png'
    raw_icon set: false
    icon_id: '(null)'
    desktop_entry: ''
    category:
    timeout: 10000
    urgency: NORMAL
    transient: 0
    formatted: 'hello!'
    fg: #ffffff
    bg: #285577
    highlight: #1745d1
    frame: #aaaaaa
    fullscreen: show
    format: hello!
    progress: -1
    stack_tag:
    id: 2
    actions: {}
    script_count: 0
}
{
    appname: 'discord'
    summary: '<user> (<channel>)'
    body: 'testing'
    icon: '/home/<home>/.config/dunst/hello.png'
    raw_icon set: true
    icon_id: '<id>'
    desktop_entry: 'discord'
    category:
    timeout: 10000
    urgency: NORMAL
    transient: 0
    formatted: 'hello!'
    fg: #ffffff
    bg: #285577
    highlight: #1745d1
    frame: #aaaaaa
    fullscreen: show
    format: hello!
    progress: -1
    stack_tag:
    id: 1974
    actions: {
        "default": "View"
    }
    script_count: 0
}

The only notable difference between the two seems to be the raw_icon flag that's set on the Discord notification. The same issue existed before (#339), but it should've been fixed according to 86cbc1d. Searching the current source code I can't find similar functionality anymore.

What am I missing? Has the fix been undone? Is the raw_icon flag the culprit here or something else? How can I still override the icon even if the flag is set?

Installation info

  • Version: Dunst - A customizable and lightweight notification-daemon 1.7.3
  • Install type: package
  • Window manager / Desktop environment: Fedora 35, i3
Minimal dunstrc
[discord]
summary = "*<user>*"
format = "test test!"
new_icon = "~/.config/dunst/hello.png"
@fwsmit
Copy link
Member

fwsmit commented Feb 7, 2022

I bisected it and it broke with ea9c7f1. I'm making a fix.

@fwsmit fwsmit closed this as completed in d4f492b Feb 7, 2022
@fwsmit
Copy link
Member

fwsmit commented Feb 7, 2022

Fixed it. Would you mind testing the fix?

@hokomo
Copy link
Author

hokomo commented Feb 7, 2022

Thanks for looking at it! I'll test it out soon.

@hokomo
Copy link
Author

hokomo commented Feb 12, 2022

Just tested it and it works! Thanks a lot!

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

No branches or pull requests

2 participants