You are not logged in.
RadioTrayNG - Now Playing
https://forums.bunsenlabs.org/viewtopic … 76#p135976
After 5+ months of testing I can say that the script works better than expected.
Maybe it's time for a new version, the script has been improved and new features have been added:
1) You can now (if you want) see the album_art.png thumbnail in your file manager
If you open ~/album_art.png (with preferred app) you will get a size of 300x300 which is probably bigger than in conky and the album cover is much more detailed.
You can easily activate this by removing the ' # ' at the beginning of the lines (with convert and cp).
#### 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
2) The option Disable conky when turn off Radiotray-NG is now the default
When you turn off Radiotray-NG, the conky will disappear, along with the album_art.png thumbnail in the file manager.
3) The code has also been improved
...
This is the new radiotray-ng script:
#!/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/.$//' | awk -F' - ' '{print $1}' | sed 's/\\"//g' | sed 's/é/e/g' | sed -e 's/^[ \t]*//' | sed 's/[ \t]*$//' | sed 's/[^[:print:]]//g')
test2=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | awk -F' - ' '{print $2}' | sed 's/\\"//g' | sed -e 's/^[ \t]*//' | sed 's/[ \t]*$//' | sed 's/[^[:print:]]//g')
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=$(pacmd list-sink-inputs | grep 'radiotray-ng')
if [[ "$test3" == "" ]]; then
radiotray_conky=$(pgrep -a conky | 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
Notes *
1) Don't forget to make the script executable
2) Inside the ~/.conky/RadioTray_NG folder, create an album_cover file
3) Change the path to the new script (radiotray-ng) in the conky
Last edited by marens (2025-04-30 17:06:02)
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
Latest conky's for 2024 .
Original from Logansfury at reddit.com/conkyporn
https://www.reddit.com/r/Conkyporn/comm … additions/
- Change openweather map to accuweather with marens's script
- Modify it for my ASUS.
- Ad radiotrayng
@+
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
That monitor screen is MASSIVE
Offline
Wow!
Offline
@loutch
Logansfury is a member of the Linux Mint forums.
You have many of his posts there:
https://forums.linuxmint.com/viewtopic. … &start=260
Off topic.
Here's a little surprise for you.
Download this file:
https://workupload.com/file/dSapUhet5RZ
Then > Extract Here.
You will get a folder ~/Downloads/mozilla_BL_loutch
Open mozilla_BL_loutch Folder > Right click on index.html (or index_gif.html) > Open With Firefox Web Browser.
You will get the weather forecast for your location in French.
If you hover over the icons, you will get a description of the weather forecast (like a tooltip) in French.
If you click on the widget, you will get a detailed weather forecast (hourly and daily).
If you like it, add it to your Firefox bookmarks.
If people would know how little brain is ruling the world, they would die of fear.
Offline
@ marens
WWWOOOOWWWW
Many tanks
@+
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
@ marens
WWWOOOOWWWW
Many tanks
@+
I use both variants (index.html and index_gif.html) when I want to visit BL-forums.
Of course, other users can also try, but they have to change the location.
Everything is explained in readme.md.
Note *
I don't know how long the file will be available on workupload.com.
If you are interested, hurry up.
P.S.
I have already posted this before:
https://forums.bunsenlabs.org/viewtopic.php?id=8704
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
I found a bug that rarely happens (maybe 1-2%).
Although the script works fine in those cases, the download of the album art is done every ten seconds.
It was hard to find why because:
You have to notice when it happens
Then you only have a few minutes (until the next song)
After that you have to wait an hour or two again
It has been seen many times that radio stations make typos.
Uppercase and lowercase (or wrong) letters are not a problem.
It is ideal when the radio station gives:
Artist Name - Song Name
But sometimes (in a hurry) things like this happen:
Artist Name - Song Name
or
Artist Name - Song Name
or
Artist Name - Song Name
or ...
I assumed that the problem was empty (blank) spaces at the beginning and end and found a solution.
Replace the lines:
test1=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | awk -F' - ' '{print $1}' | sed 's/\\"//g' | sed 's/é/e/g')
With:
test1=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | awk -F' - ' '{print $1}' | sed 's/\\"//g' | sed 's/é/e/g' | sed -e 's/^[ \t]*//' | sed 's/[ \t]*$//')
And:
test2=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | awk -F' - ' '{print $2}' | sed 's/\\"//g')
With:
test2=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | awk -F' - ' '{print $2}' | sed 's/\\"//g' | sed -e 's/^[ \t]*//' | sed 's/[ \t]*$//')
Done.
Note *
The script was updated today.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Offline
It's not about size it's about if it meets your needs.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
It's not about size it's about if it meets your needs.
If only my wife thought that way....
But yes, you are right.
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
Very nice.
Maybe your old RadioTrayNG conky looks better, but the album cover is smaller.
I usually just use the album art image (128x128) in the top left corner.
The Artist/Song are in another conky like here in the old screenshot:
https://postimg.cc/QHRgXP2h
No problem if the album title is too long because space is not limited.
This is a line from my conky, if you like the idea just change the colors:
${font Ubuntu:size=10:italic}${alignc}${color1}RadioTray \
${if_empty ${texeci 5 pacmd list-sink-inputs | grep 'Radiotray-NG'}}${color}Disabled\
${else}${color7}${texeci 5 pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | sed 's/\\//g'}${endif}
What script did you use for the album art image?
My script gives the same result but it is slightly different if I try here:
https://forums.bunsenlabs.org/viewtopic … 88#p140688
If people would know how little brain is ruling the world, they would die of fear.
Offline
Sector11 wrote:It's not about size it's about if it meets your needs.
If only my wife thought that way....
But yes, you are right.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Hello
@ marrens .
Your script
test1=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | awk -F' - ' '{print $1}' | sed 's/\\"//g' | sed 's/é/e/g')
test2=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | sed -e 's/^[ \t]*//' | sed 's/media.title = "//' | sed 's/.$//' | awk -F' - ' '{print $2}' | sed 's/\\"//g')
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/}//' | sed 's/{//' | sed -e 's/.*"\(.*\)".*/\1/')
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=$(pacmd list-sink-inputs | grep 'radiotray-ng')
if [[ "$test3" == "" ]]; then
radiotray_conky=$(pgrep -a conky | awk '/RadioTray_NG/{print $1}')
kill -SIGKILL $radiotray_conky
thumbnail=$(ls | grep album_art)
if [ -f "$thumbnail" ]; then
rm $HOME/album_art.png
fi
fi
Here in bleu
full screen .
@+
Last edited by loutch (2025-01-20 08:55:16)
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
^ OK.
Very nice conky.
I see you manually updated the old script.
You should replace the test1 and test2 lines:
https://forums.bunsenlabs.org/viewtopic … 32#p140332
Note *
It's possible that the radio stations you listen to don't make typos, but I have a different experience.
Or use an updated script - Last edited by marens (2024-12-30 17:23:21):
https://forums.bunsenlabs.org/viewtopic … 38#p140138
This French radio station is good to test:
Great music (Oldies)
Albums (Singles) are 50+ years old
We see and hear something new (for us)
https://forums.bunsenlabs.org/viewtopic … 70#p140170
The situation here is similar:
https://forums.bunsenlabs.org/viewtopic … 05#p139305
For testing, I also use the station Country 108, which is part of the Country group (RadioTrayNG).
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
Guy's i need your help for a conky to have saint's of the day. i think the whebsite have any problem.
here code who worked many years.
${texeci 1000 wget -O - -q http://fetedujour.fr/ --user-agent="Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0" | grep h2 | head -1 | cut -d">" -f2 | cut -d"<" -f1 | cut -d":" -f2 }
Many tanks
@+
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