-
Notifications
You must be signed in to change notification settings - Fork 351
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
duntstify -i icon doesnt show with /tmp/image.png #1445
Comments
Do you have recursive icon lookup enable? |
Yes Sr. this is the part of icons conf i have in my dunst config file.
|
Thanks. I'll look into it. Meanwhile if you can could you try if dinst 1.11 worked correctly? |
i assume is with all paths because i have this little script to change brightness and show notification and the notifications breaks days ago: this is part of the code: with the -I works fine.
Yeah let me downgrade dunst and i will reply soon. |
i downgraded to dunst-1.11.0-1 And my image doesnt show but now an informative icon appears But im pretty sure is because the config file.. i cant find the commit before when i changed the config to work with dunst 1.12 Beyond that, dunstify -i /path/ should work I think, but it shows an alternative icon. |
Could you clarify this point. Does |
Ok sorry, let me start with dunst 1.12 This code not work, only show the text but not the image: But with the -I flag works. And works too with notify-send these 2 commands works and shows the image.
Now with dunst 1.11 My cover song still not show with command: Now with -I flag works as intended same as dunst 1.12 Now the command: works fine too with dunst 1.11 So in 1.11 and 1.12 dunstify -i /path/to/icon dont work. |
Ok thank you. It seems this problem is unrelated to 1408 and only affects dunstify 👍 |
with libnotify-0.8.3 dunstify works for me. so I will try to update to the new version of libnotify |
I tried 0.8.4 and it does work too with a /tmp/image. maybe the problem is somewhere else? could you send a log of dunst when dunstify is used?
|
Ok sure! i will explain my setup and give you logs from Im using bspwm, in my bspwmrc i have this line:
This will launch dunst only the first time, if i reload the wm dunst will not be loaded again. Now bspwmrc also loads my Theme.sh because i have more than one theme in bspwm. But changing themes does not reload the wm, it only applies changes, for dunst they are these: theme.sh# Set dunst config
set_dunst_config() {
dunst_config_file="$HOME/.config/bspwm/src/config/dunstrc"
sed -i "$dunst_config_file" \
-e "s/origin = .*/origin = ${dunst_origin}/" \
-e "s/offset = .*/offset = ${dunst_offset}/" \
-e "s/transparency = .*/transparency = ${dunst_transparency}/" \
-e "s/^corner_radius = .*/corner_radius = ${dunst_corner_radius}/" \
-e "s/frame_width = .*/frame_width = ${dunst_border}/" \
-e "s/frame_color = .*/frame_color = \"${dunst_frame_color}\"/" \
-e "s/font = .*/font = ${dunst_font}/" \
-e "s/foreground='.*'/foreground='${blue}'/" \
-e "s/icon_theme = .*/icon_theme = \"${dunst_icon_theme}, Adwaita\"/"
sed -i '/urgency_low/Q' "$dunst_config_file"
cat >>"$dunst_config_file" <<-_EOF_
[urgency_low]
timeout = 3
background = "${bg}"
foreground = "${green}"
[urgency_normal]
timeout = 5
background = "${bg}"
foreground = "${fg}"
[urgency_critical]
timeout = 0
background = "${bg}"
foreground = "${red}"
_EOF_
dunstctl reload "$dunst_config_file"
} As you can see I only change colors and a few other things and in the end I reload dunst with dunstctl reload configfile.. And thats it, thats how it works, I don't think it has anything to do with the -i flag not working. My dunstrc is this: dunstrc[global]
monitor = 0
follow = mouse
width = (300, 400)
#height = (0, 200)
origin = top-right
offset = (20, 60)
scale = 0
notification_limit = 20
indicate_hidden = yes
transparency = 0
corner_radius = 6
gap_size = 4
separator_height = 1
separator_color = "#abb2bf"
padding = 15
horizontal_padding = 15
text_icon_padding = 0
frame_width = 0
frame_color = "#222330"
sort = no
idle_threshold = 0
font = JetBrainsMono NF Medium 9
line_height = 0
markup = full
format = "<span size='xx-large' font_desc='Cantarell 9' weight='bold' foreground='#7aa2f7'>%s</span>\n%b"
alignment = center
vertical_alignment = center
show_age_threshold = 60
#ellipsize = middle
ignore_newline = no
stack_duplicates = false
hide_duplicate_count = true
show_indicators = yes
enable_recursive_icon_lookup = true
icon_theme = "TokyoNight-SE, Adwaita"
icon_position = left
min_icon_size = 60
max_icon_size = 90
icon_corner_radius = 6
sticky_history = yes
history_length = 25
#dmenu = /usr/bin/rofi -config "$HOME/.config/rofi/notification.rasi" -dmenu -p dunst:
browser = /usr/bin/xdg-open
always_run_script = true
ignore_dbusclose = false
force_xinerama = false
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
progress_bar = true
progress_bar_height = 10
progress_bar_frame_width = 0
progress_bar_min_width = 125
progress_bar_max_width = 250
progress_bar_corner_radius = 5
title = Dunst
class = Dunst
[urgency_low]
timeout = 3
background = "#1a1b26"
foreground = "#9ece6a"
[urgency_normal]
timeout = 5
background = "#1a1b26"
foreground = "#c0caf5"
[urgency_critical]
timeout = 0
background = "#1a1b26"
foreground = "#f7768e" Now i kill dunst
The first debug log when i launch dunst is this: debug log when launch dunst
Now i open ncmpcpp player, this player has an option to run a script or command when song changes, i use it to send notification with the cover image and song name and artist. This is part of the ncmpcpp config file: execute_on_song_change = "MediaControl nccover ; dunstify -i /tmp/cover.png "Playing..." "$(mpc --format '%title% \n%artist%' current)"" (MediaControl nccover) is my script to generate the cover image of the song. log when i open ncmpcpp music player and this send a notification with cover image and song
And thats it, the notification should look like this: But looks like this: Another thing: from man dunstctl
In my theme.sh I reload dunst with |
thank you. the log seems normal.
|
thanks for pointing this out. I should have fixed it with #1447 |
allright i kill dunst and launched with this command:
then i send a notification with this command:
and the output is:
Now with notify-send :
|
Ok it seems like the icon is not being sent by dunstify somehow. |
This is a really strange bug that I can't reproduce. Does it happen if you use a different path? Like /tmp/image2.jpg or something like that? Is your version of dunstify up to date witj that of dunst? Are the permissions of /tmp right? |
Hello, today i test it in another PC, and the problem is there, both pcs with arch linux, all system updated. Yes it happends with all paths, i tested with images in /tmp/, in my HOME and in my ~/.config/bspwm/src/assets paths I note the bug after an issue in my repo from a guy gh0stzk/dotfiles#421 at the end that was related with the --replace segmentation fault bug but that drives me to the -i bug. So it's probably not just me or a problem with my setup. I just read a new issue here, about this same problem. #1448 Maybe it is related only to arch? |
I will try to make an arch vm. my hypothesis right now is that the new version of libnotify is not sending the icon name |
from the new version
https://gitlab.gnome.org/GNOME/libnotify/-/commit/f5842adeffdbb8675484b89867938249a65485d9 |
oh i see, so, what should be the correct commando now? |
I am investigating the solution but I think a tweak to the dunstify source is needed. you could try |
Yeah i just got it from chtgpt lol..
this works.. finally. and for icons is the same Well... I don't know why to complicate life, -i flag worked easily and simply.
thank you for your help. for now i will change the scripts to work with this new method. Probably more users come with the same problem, I will not close the issue, I will leave it to your discretion. Good morning and I appreciate your help and interest. |
idk, they made some change in the libnotify library and spec. |
That will be great, thank you. |
if you want you can check #1449 it should fix the problem |
Hello maybe this related to #1408
Im using arch linux with dunst 1.12.1-1 and libnotify 0.8.4-1
this code not work
dunstify -i /tmp/cover.png "Playing..." "$(mpc --format '%title% \n%artist%' current)"
But if i chenge to -I it works.
dunstify -I /tmp/cover.png "Playing..." "$(mpc --format '%title% \n%artist%' current)"
I need to change all my scripts or is a bug? i see a commit to fix it but apparently still the bug.
But reading the manual i think i need to change my scripts:
And i already see and issue with --replace=ID segmentation fault bug, i have this bug too.
The text was updated successfully, but these errors were encountered: