You are not logged in.
Thank you, @marens.
Everything is as you said.
Nevertheless, there is the error that the cover image on the desktop is not refreshed. The last generated one remains.
However, everything is OK in Thunar and in the directory. I assume this character '>>' is missing somewhere in the script.
The album_cover is empty when RadioTray is switched off.
When playing, lines 1 and 2 are present.
However, I see an error with German special characters that looks familiar to me.
A picture shows everything:
BTW, I have Radio SwissPop as station (as always )
https://stream.srg-ssr.ch/m/rsp/aacp_96
Offline
^ Nice.
Nevertheless, there is the error that the cover image on the desktop is not refreshed.
Did you set imlib_cache_size 0 (old syntax) in the configuration?
The image in Thunar must be the same as in conky.
However, I see an error with German special characters that looks familiar to me.
I had a similar case and this is how I found a solution:
https://forums.bunsenlabs.org/viewtopic … 88#p139588
BTW, I have Radio SwissPop as station (as always
)
I never use the radiotray-ng conky when listening to local stations.
EDIT
Dion is the best-selling Canadian recording artist, the best-selling French-language artist, and one of the best-selling musical artists of all time.
https://en.wikipedia.org/wiki/Celine_Dion
I saw the U+00e9 Unicode character in your text editor (screenshot).
This is ' é ' (French - Céline Dion).
My radiotray-ng script still managed to find a right image.
I assume this character '>>' is missing somewhere in the script.
I can't see that from your screenshot.
There seem to be no errors in the terminal.
However, I am only interested in the album_art.png image that is displayed on the top left of the desktop.
Sure, it can be wrong sometimes, but a new song is coming soon.
Last edited by marens (2025-04-08 15:18:20)
If people would know how little brain is ruling the world, they would die of fear.
Offline
BINGO!
@marens, you had your thumb on it.
imlib_cache I had forgotten
additionally I had to remove the 'bash' in the conky call of the script.
${texeci 10 $HOME/.conky/RadioTray_NG/script/radiotray-ng}
${image $HOME/album_art.png -p 0,0 -s 128x128}
With the umlauts, I found the solution from @TBG/loutch in my documents:
sed -i -e 's/\'/'"'"'/g'
The problem with the RadioTray-Conky is now solved. Thank you for your constructive help and I hope to see more nice configurations of this ‘system monitor’ from you.
Offline
Hello
With the umlauts, I found the solution from @TBG/loutch
Ja, sie sind große Meister, conkystador
Wenn Sie mich suchen, bin ich schon weg. => []
------------------------------------------------
Yes, they are great masters, conkystador
If you're looking for me, I'm already gone.
Last edited by loutch (2025-04-08 16:14:34)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Hello
With the umlauts, I found the solution from @TBG/loutch
Ja, sie sind große Meister, conkystador
Wenn Sie mich suchen, bin ich schon weg. => []
------------------------------------------------
Yes, they are great masters, conkystadorIf you're looking for me, I'm already gone.
Merci, mon ami, pour les fleurs.
Mais le titre de « EL Conkystador » n'appartient qu'à une seule personne, et c'est notre ami Sector11.
----------------
Thank you, my friend, for the flowers.
But the title “EL Conkystador” only belongs to one person and that is our friend Sector11.
Offline
Hello
I know .
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
I have opted for the variant from @loutch with the image.lua script.
The advantage here over the image variant is that the image is displayed ‘real’. The ‘rest’ of the conky is transparent. This is why the image is blurred with 'image'.
e.g.
${image $HOME/.conky/RadioTray_NG/album_art.png -p 0,0 -s 128x128}
compared to
${lua fDrawImage $HOME/album_art.png 0 0 166 136 0}
It is also advantageous in this case to split the conky into several conkys. This saves you having to make extensive configurations with gap_x and y, as these do not usually match the cover image.
A pleasant side effect is that picom provides the ‘round corners’ for BL carbon.
Offline
^ I discarded that idea long ago.
It looks nice and I've already done it with ImageMagic, but some album covers are already framed (square) with fields of different colors and thicknesses.
When an album cover like this appears, you'll see how ugly it is with the rounded corners.
The ‘rest’ of the conky is transparent.
In the config I use own_window_colour 000A40 because my wallpaper is light blue and the headphones don't look good.
If people would know how little brain is ruling the world, they would die of fear.
Offline
I have opted for the variant from @loutch with the image.lua script.
The advantage here over the image variant is that the image is displayed ‘real’. The ‘rest’ of the conky is transparent. This is why the image is blurred with 'image'.
@unklar : Could you please share the image.lua script. I've searched hi an' lo - but unable to trace it.
Thanks in advance!
Offline
^ I discarded that idea long ago.
It looks nice and I've already done it with ImageMagic, but some album covers are already framed (square) with fields of different colors and thicknesses.
When an album cover like this appears, you'll see how ugly it is with the rounded corners.![]()
unklar wrote:The ‘rest’ of the conky is transparent.
In the config I use own_window_colour 000A40 because my wallpaper is light blue and the headphones don't look good.
https://i.postimg.cc/xXYssWCV/headphones.png https://i.postimg.cc/RNxGFjwJ/not-available.png
I never tried this with imagemagick because I never understood the program in this respect. So my respect if you have done that.
Here in the conky thread we experimented with the lua script variants 'draw_bg.lua' and draw-bg.lua' to get 'round corners' in the conky's. S11 will agree with me, those days will never come back.
And, if I turn off picom, the round corners are gone too...
Offline
unklar wrote:I have opted for the variant from @loutch with the image.lua script.
The advantage here over the image variant is that the image is displayed ‘real’. The ‘rest’ of the conky is transparent. This is why the image is blurred with 'image'.@unklar : Could you please share the image.lua script. I've searched hi an' lo - but unable to trace it.
Thanks in advance!
I have several.
https://forums.bunsenlabs.org/viewtopic … 10#p127610
https://forums.bunsenlabs.org/viewtopic … 07#p131607
Offline
I have several.
https://forums.bunsenlabs.org/viewtopic … 10#p127610
https://forums.bunsenlabs.org/viewtopic … 07#p131607
Offline
I never tried this with imagemagick because I never understood the program in this respect. So my respect if you have done that.
It's not that hard.
I tested album_art.png with a white frame in my HOME folder and this is what I'm talking about.
First I created a mask.png image.
Then I got a rounded.png image.
convert -size 300x300 xc:none -draw 'roundrectangle 0,0,300,300,30,30' mask.png
convert album_art.png -matte mask.png -compose DstIn -composite rounded.png
This is the result:
So it was removed from my radiotray-ng script.
And, if I turn off picom, the round corners are gone too...
The decision is yours.
The only thing that matters to me is that the radiotray-ng script works pretty well.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
Radiotray_Ng with rounded album cover .
Work Great , @ marrens great job.
#!/bin/bash
test1=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/"//g' | awk -F' - ' '{print $1}' | sed 's/\\//g')
test2=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/"//g' | awk -F' - ' '{print $2}' | sed 's/\\//g')
if [[ "$test1" == "$(sed -n '1p' $HOME/.conky/RadioTray_NG/cover-old)" && "$test2" == "$(sed -n '2p' $HOME/.conky/RadioTray_NG/cover-old)" ]]; then
exit 0
fi
echo $test1 > $HOME/.conky/RadioTray_NG/cover
echo $test2 >> $HOME/.conky/RadioTray_NG/cover
cp $HOME/.conky/RadioTray_NG/cover $HOME/.conky/RadioTray_NG/cover-old
artist=$(sed -n '1p' $HOME/.conky/RadioTray_NG/cover-old | sed 's/ /%20/g' | sed -e 's/$/%20-&/' | tr '[A-Z]' '[a-z]')
song=$(sed -n '2p' $HOME/.conky/RadioTray_NG/cover-old | sed 's/ /%20/g' | sed -e 's/$/\&size=medium&/' | sed 's/^/%20&/' | tr '[A-Z]' '[a-z]')
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -o $HOME/.conky/RadioTray_NG/image "https://aaaas.deno.dev?query=$artist$song"
album_art=$(sed -n '1p' $HOME/.conky/RadioTray_NG/image | sed 's/{"image":"//' | sed 's/"}//')
## récupération de la pochette
curl "$album_art" --output $HOME/.conky/RadioTray_NG/album_art.png
cat /dev/null > $HOME/.conky/RadioTray_NG/image
## conversion de la pochette en vrai png si utilisation du script image.lua
convert $HOME/.conky/RadioTray_NG/album_art.png $HOME/.conky/RadioTray_NG/pochette.png
## création d'un masque x,y,h,rayon des bords arrondis
convert -size 300x300 xc:none -draw 'roundrectangle 0,0,300,300,30,30' $HOME/.conky/RadioTray_NG/mask.png
## conversion de la pochette normale en pochette avec bord arrondi
convert $HOME/.conky/RadioTray_NG/pochette.png -matte mask.png -compose DstIn -composite $HOME/.conky/RadioTray_NG/pochette_ronde.png
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
^ Thanks.
It looks nice, but some album covers with rounded corners are just plain ugly.
I'm assuming you're using an older version of my script here because I see it hasn't been updated.
Also, it is better to use User-Agent: Mozilla/5.0 in curl.
Replace the lines:
## récupération de la pochette
curl "$album_art" --output $HOME/.conky/RadioTray_NG/album_art.png
with:
## récupération de la pochette
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -o $HOME/.conky/RadioTray_NG/album_art.png "$album_art"
Now that you already have the ~/.conky/RadioTray_NG/mask.png image in the folder, remove this line from the script:
convert -size 300x300 xc:none -draw 'roundrectangle 0,0,300,300,30,30' $HOME/.conky/RadioTray_NG/mask.png
P.S.
I don't use rounded corners, but I left the option for those who like it.
Let everyone choose what they want.
If people would know how little brain is ruling the world, they would die of fear.
Offline
RadioTrayNG - Now Playing
https://forums.bunsenlabs.org/viewtopic … 38#p140138
Country 108
Chris Stapleton - Starting Over - Starting Over
At first I thought it was a bug, then I found this:
https://en.wikipedia.org/wiki/Starting_ … ton_album)
Sometimes it's really funny.
Last edited by marens (2025-04-18 02:00:40)
If people would know how little brain is ruling the world, they would die of fear.
Offline
RadioTrayNG - Now Playing
https://forums.bunsenlabs.org/viewtopic … 38#p140138
This happened today.
Maybe it's a typo in the radio station or some 'gun' (?) character that my system font doesn't support?
I'm not sure, but...
You can see a 'non-printable' character at the end of the album_cover file (text editor) and that's why I don't have a right album_art.png image.
It's similar in notifications and the radiotray-ng popup menu:
I fixed that 'bug' by removing the 'non-printable' characters.
Add to the end of the existing code for lines test1 and test2:
test1=$( < existing code here > | sed 's/[^[:print:]]//g')
test2=$( < existing code here > | sed 's/[^[:print:]]//g')
After restarting the RadioTray_NG conky, the expected album_art.png image immediately appeared:
@unklar
You can also solve the 'Celine Dion' issue:
$ echo C\u00e9line Dion | sed 's/\u00e9/e/g'
Celine Dion
If needed again (similar case), you will do it yourself:
test1=$( < existing code here > | sed 's/"//g' | sed 's/\u00e9/e/g' | sed 's/[^[:print:]]//g')
test2=$( < existing code here > | sed 's/"//g' | sed 's/\u00e9/e/g' | sed 's/[^[:print:]]//g')
Note *
Sorry, @unklar.
I forgot that double quotes are sometimes a problem (sed 's/"//g').
See the end of the post here:
https://forums.bunsenlabs.org/viewtopic … 76#p135976
P.S.
The script was updated today.
If anyone has a problem, please post a screenshot like @unklar here:
https://i.imgur.com/2VTKHob.png
Last edited by marens (2025-05-01 00:52:20)
If people would know how little brain is ruling the world, they would die of fear.
Offline
Thanks for your work.
Sorry @marens, I've switched to only displaying the cover. I do without artist and album in Conky.
Your script currently looks like this (without changes)
#!/bin/bash
test1=$(qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep artist |sed 's/^.*" \: "//' |sed 's/",.*$//' | sed 's/é/e/g' | sed -e 's/^[ \t]*//' | sed 's/[ \t]*$//')
test2=$(qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep title |sed 's/^.*" \: "//' |sed 's/",.*$//' | sed -e 's/^[ \t]*//' | sed 's/[ \t]*$//')
if [[ "$test1" == "$(sed -n '1p' $HOME/.conky/RadioTray_NG/album_cover)" && "$test2" == "$(sed -n '2p' $HOME/.conky/RadioTray_NG/album_cover)" ]]; then
exit 0
fi
echo $test1 > $HOME/.conky/RadioTray_NG/album_cover
echo $test2 >> $HOME/.conky/RadioTray_NG/album_cover
if [[ "$test1" == "" && "$test2" == "" ]]; then
cp $HOME/.conky/RadioTray_NG/headphone.png $HOME/.conky/RadioTray_NG/album_art.png
else
artist=$(sed -n '1p' $HOME/.conky/RadioTray_NG/album_cover | sed 's/ /%20/g' | sed -e 's/$/%20-&/' | tr '[A-Z]' '[a-z]')
song=$(sed -n '2p' $HOME/.conky/RadioTray_NG/album_cover | sed 's/ /%20/g' | sed -e 's/$/\&size=medium&/' | sed 's/^/%20&/' | tr '[A-Z]' '[a-z]')
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -o $HOME/.conky/RadioTray_NG/image "https://aaaas.deno.dev?query=$artist$song"
album_art=$(sed -n '1p' $HOME/.conky/RadioTray_NG/image | sed 's/{"image":"//' | sed 's/"}//')
if [[ "$album_art" == "" ]]; then
cp $HOME/.conky/RadioTray_NG/not_available.png $HOME/.conky/RadioTray_NG/album_art.png
else
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -o $HOME/.conky/RadioTray_NG/album_art.png "$album_art"
cat /dev/null > $HOME/.conky/RadioTray_NG/image
#### Add the album_art.png thumbnail to the File Manager
convert $HOME/.conky/RadioTray_NG/album_art.png $HOME/.conky/RadioTray_NG/album_art.png
# cp $HOME/.conky/RadioTray_NG/album_art.png $HOME/album_art.png
#### END - Add the album_art.png thumbnail to the File Manager
fi
fi
#### Disable conky when you turn off Radiotray-NG
sleep 0.8
test3=$(qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep state | awk '{print$3}' | sed 's/"//g' | sed 's/,//g')
if [[ "$test3" == "stopped" ]]; then
radiotray_conky=$(pgrep -a conkyrc10 | awk '/RadioTray_NG/{print $1}')
kill -SIGKILL $radiotray_conky
> $HOME/.conky/RadioTray_NG/album_cover
thumbnail=$(ls | grep album_art)
if [ -f "$thumbnail" ]; then
rm $HOME/album_art.png
fi
fi
Offline
^ Yes.
That's best for you because German special characters are a problem.
Maybe changing the font would help.
That's easy for me, but I don't know how you'll do it:
P.S.
Thanks for posting the script for those using PipeWire instead of PulseAudio.
Last edited by marens (2025-05-02 02:12:20)
If people would know how little brain is ruling the world, they would die of fear.
Offline