You are not logged in.

#2101 2024-06-12 15:33:53

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Hello

No, nothing serious, just some blood leaking into my skull and compressing my brain.
After a few treatments it's better, but it's still knocking.

Let's talk about conky.

Another config like weewx Now which one to choose

Capture-d-cran-2024-06-13-11-05-11.png


@+

Last edited by loutch (2024-06-13 09:05:41)


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

#2102 2024-06-12 16:47:30

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

^ I wish you good health because that is the most important thing.

loutch wrote:

Another config like weewx Now which one to choose

Yes indeed.
They both look great and it's not easy to decide.

P.S.
I think the moon image looks better if you use the moongiant conky script.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2103 2024-06-12 16:55:58

altman
Member
From: Canada
Registered: 2015-10-24
Posts: 619

Re: Show us your conky

loutch wrote:

Hello

Here's some coding to help me forget my headache since i got home from hospital. It's accuweatherAPI. Look like Weewx

https://i.postimg.cc/zy62SQGN/Capture-d-cran-2024-06-10-11-20-48.png


@+

That sux mate, get well soon !

I guess that I would get headaches from codings on my end !


My Linux installs are as in my music; it s on Metal

Offline

#2104 2024-06-13 03:03:56

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Show us your conky

Get well soon loutch.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#2105 2024-06-13 06:22:52

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Hello


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

#2106 2024-06-21 17:06:58

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

RadioTray NG

@loutch made a RadioTray NG conky script a long time ago.
I found his script on another forum and I'm not sure if it's the latest one.
That script works great, Googlebot  sometimes doesn't find the right image, but that's to be expected.

Anyway, I decided to see if I could adjust it since I always listen to RadioTray NG.

I think I improved a few things:

1) Fixed error:

Warning: User-Agent string does not contain "Lynx" or "L_y_n_x"!

2) His script creates two images that change very often (every ten seconds Conky starts the script). Now we only have one image until the song changes.

3) I replaced Googlebot-Image/1.0  with GoogleOther-Image/1.0.

Google wrote:

GoogleOther-Image is the version of GoogleOther optimized for fetching publicly accessible image URLs. It goes under the User agent tokens; GoogleOther-Image and GoogleOther and uses the full user agent string GoogleOther-Image/1.0.

4) I added headphones (when the radio was disabled).


radiotray1.png    radiotray2.jpg    radiotray3.png


Of course, you can try if you use RadioTray NG.


You need to install lynx:

$ sudo apt install lynx

Create a ~/.conky/RadioTray_NG  folder.

Open the folder and create the mpris-radiotray-ng  file (script) inside:

#!/bin/bash

#créé par loutch
#2018-12-27 modifier par TeoBigusGeekus et loutch pour radiotray-ng et conky 1.10
#2021-02-20 modifier par nic80 et loutch

#qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep artist |sed 's/^.*" \: "//' |sed 's/",.*$//' > artiste_titre.txt

  pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | awk -F'"' '{print $2}' | awk -F' - ' '{print $1}' > $HOME/.conky/RadioTray_NG/cover
  
#qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep title  |sed 's/^.*" \: "//' |sed 's/",.*$//' >> artiste_titre.txt

  pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | awk -F'"' '{print $2}' | awk -F' - ' '{print $2}' >> $HOME/.conky/RadioTray_NG/cover
  

  cover1=$(sed -n '1p' $HOME/.conky/RadioTray_NG/cover)
  cover2=$(sed -n '2p' $HOME/.conky/RadioTray_NG/cover)
  cover3=$(sed -n '1p' $HOME/.conky/RadioTray_NG/cover-old)
  cover4=$(sed -n '2p' $HOME/.conky/RadioTray_NG/cover-old)


  if [[ "$cover1" == "$cover3" && "$cover2" == "$cover4"  ]]; then
  
    exit 0
    
  else  
  
  cp $HOME/.conky/RadioTray_NG/cover $HOME/.conky/RadioTray_NG/cover-old 

  art=$(cat $HOME/.conky/RadioTray_NG/cover)

  lynx --source -useragent="Lynx; GoogleOther-Image/1.0" "www.google.com/search?q=$art\&tbm=isch" | perl -pe 's!.*<img .* src="([^"]*)".*!$1!' > $HOME/.conky/RadioTray_NG/radiotray_ng


  sed -i 's/^.* http\:/http\:/' $HOME/.conky/RadioTray_NG/radiotray_ng
  sed -i '/gstatic/!d' $HOME/.conky/RadioTray_NG/radiotray_ng


  if [[ "$cover1" == "" && "$cover2" == ""  ]]; then
 
    cp $HOME/.conky/RadioTray_NG/headphone.png $HOME/.conky/RadioTray_NG/radiotray_ng.png
   
  else

    radiotray_ng=$(cat $HOME/.conky/RadioTray_NG/radiotray_ng)
    lynx -dump "$radiotray_ng" > $HOME/.conky/RadioTray_NG/radiotray_ng.png

  fi
  
fi  

#convert miniatureGoogleImage pochette.png

Make the script executable.

Download headphone.png and copy/paste into the ~/.conky/RadioTray_NG  folder.

headphone.png


I created in the same folder RadioTray_NG conky with the usual configuration (like accuweather or moongiant):

${texeci 10 bash $HOME/.conky/RadioTray_NG/mpris-radiotray-ng}\
${image $HOME/.conky/RadioTray_NG/radiotray_ng.png -p 0,0 -s 128x128}

Done.

If @loutch  feels better (hopefully) it would be interesting to see some parallel testing.

Thanks to:

avatar.png

Last edited by marens (2024-06-21 17:15:10)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2107 2024-06-23 17:28:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

@loutch

This is your pochette.sh script (from 2021) that I found on another forum:

#!/bin/bash
#créé par loutch
#2018-12-27 modifier par TeoBigusGeekus et loutch pour radiotray-ng et conky 1.10
#2021-02-20 modifier par nic80 et loutch

qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep artist |sed 's/^.*" \: "//' |sed 's/",.*$//' > artiste_titre.txt
qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep title  |sed 's/^.*" \: "//' |sed 's/",.*$//' >> artiste_titre.txt
titre=$(cat artiste_titre.txt)
lynx --source -useragent="Googlebot-Image/1.0" "www.google.com/search?q=$titre\&tbm=isch" | perl -pe 's!.*<img .* src="([^"]*)".*!$1!' > lienMiniaturefile
sed -i 's/^.* http\:/http\:/' lienMiniaturefile
sed -i '/gstatic/!d' lienMiniaturefile

lienMiniature=$(cat lienMiniaturefile)
lynx -dump "$lienMiniature" > miniatureGoogleImage

convert miniatureGoogleImage pochette.png

Here I kept all your basic settings and tried to improve them a bit.

pochette.sh

#!/bin/bash
#créé par loutch
#2018-12-27 modifier par TeoBigusGeekus et loutch pour radiotray-ng et conky 1.10
#2021-02-20 modifier par nic80 et loutch

qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep artist |sed 's/^.*" \: "//' |sed 's/",.*$//' > artiste_titre.txt
qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep title  |sed 's/^.*" \: "//' |sed 's/",.*$//' >> artiste_titre.txt

## Marens

ligne1=$(sed -n '1p' artiste_titre.txt)
ligne2=$(sed -n '2p' artiste_titre.txt)
ligne3=$(sed -n '1p' artiste_titre_ex.txt)
ligne4=$(sed -n '2p' artiste_titre_ex.txt)

if [[ "$ligne1" == "$ligne3" && "$ligne2" == "$ligne4"  ]]; then
  
 exit 0
    
else  
  
  cp artiste_titre.txt artiste_titre_ex.txt

## la fin Marens

titre=$(cat artiste_titre.txt)
lynx --source -useragent="Lynx; Googlebot-Image/1.0" "www.google.com/search?q=$titre\&tbm=isch" | perl -pe 's!.*<img .* src="([^"]*)".*!$1!' > lienMiniaturefile
sed -i 's/^.* http\:/http\:/' lienMiniaturefile
sed -i '/gstatic/!d' lienMiniaturefile

lienMiniature=$(cat lienMiniaturefile)

## Marens

#lynx -dump "$lienMiniature" > miniatureGoogleImage
lynx -dump "$lienMiniature" > pochette.png

#convert miniatureGoogleImage pochette.png

fi

## la fin Marens

The first time you run conky from the terminal, you will get an error:

sed: can't read artiste_titre_ex.txt: No such file or directory

This happens because the file artiste_titre_ex.txt has not been created yet.
Just restart conky (from terminal) and no more errors.

Now look at your HOME folder.

We've avoided constant downloads (every 8s) and now have just one image.
The image pochette.png only changes when a new song appears.

P.S.
I don't have dbus installed but I tested the script with pacmd and it works as expected.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2108 2024-06-24 00:08:41

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

RadioTray NG


After a few days of testing, which I did very easily because I always listen to RadioTray NG, I have my opinion.

Conclusion

All of the above scripts work quite well.
More precisely, as much as possible.

Explanation

How many times have you searched for an image on Google and immediately got the best one?
Yes, that can be a problem.
If you listen to radio stations  that play only big hits  and world-famous bands  (artists), then the possibility that our scripts will work very well increases.

radiotray-ng.jpg

Otherwise, sometimes you can get a strange result  (image), but luckily a new song is coming soon.

Note *
The most important thing is that this way you can create a script for each media player.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2109 2024-06-24 00:11:49

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,611

Re: Show us your conky

A rather simple one -

GZ8Yag04_t.png


You must unlearn what you have learned.
    -- yoda

Offline

#2110 2024-06-25 00:00:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

marens wrote:

Note *
The most important thing is that this way you can create a script for each media player.

Unfortunately, this is not entirely true.

The pacmd list-sink-inputs  command does not always provide the ability to get titles and artists.
Tried Audacious  and VLC  but no data (title, artist).

I already wrote before that only Parole  works well for me:
https://forums.bunsenlabs.org/viewtopic … 52#p134152

It was also confirmed in this case.

I started the Parole  player and just replaced the commands for RadioTray NG  with:

  pacmd list-sink-inputs | grep media.artist | awk -F'"' '{print $2}' > $HOME/.conky/RadioTray_NG/cover
  
  pacmd list-sink-inputs | grep media.title | awk -F'"' '{print $2}' >> $HOME/.conky/RadioTray_NG/cover

I love listening to old blues artists  who aren't world famous and this was a great test for the script.
Honestly, I got more than expected because the result is excellent.

This has been tested (again):

nautilus.png

These are some of the results:

test1.jpg   test2.jpg
test3.jpg   test4.jpg

Indeed many look better than in FM (Nautilus).

Anyway, it was very interesting testing.

Last edited by marens (2024-06-25 00:04:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2111 2024-07-09 17:58:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

RadioTrayNG  -  Now Playing

This is my new script that searches for an image (album_art.png) when listening to RadioTrayNG.
The script is located in the same folder as the previous one (~/.conky/RadioTray_NG)
I'm not using Google to search for images this time.

mpris-radiotray-ng2:

#!/bin/bash


  test1=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | awk -F'"' '{print $2}' | awk -F' - ' '{print $1}')
  test2=$(pacmd list-sink-inputs | grep -A 2 'Radiotray-NG' | awk 'END{print}' | awk -F'"' '{print $2}' | awk -F' - ' '{print $2}')
  
  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
  
  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/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"://g' | sed 's/}//g' | sed -e 's/.*"\(.*\)".*/\1/')
  
    curl "$album_art" --output $HOME/.conky/RadioTray_NG/album_art.png 
  
  fi

Note *
Don't forget to make the script executable.

Conky:

${texeci 10 bash $HOME/.conky/RadioTray_NG/mpris-radiotray-ng2}\
${image $HOME/.conky/RadioTray_NG/album_art.png -p 0,0 -s 128x128}

EDIT
You can find the latest version of the radiotray-ng  script here:
https://forums.bunsenlabs.org/viewtopic … 38#p140138

Last edited by marens (2025-07-08 22:44:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2112 2024-07-12 15:56:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

RadioTrayNG  -  Now Playing

When a radio station broadcasts promo messages or advertisements, of course we don't have an album art image.
Although our source has several hundreds of thousands of album covers, it may happen that the album cover image is not available.
This will never happen if you only listen to big hits and world famous bands (artists) unlike me.

So I improved my script a bit and tried to predict these possibilities.

mpris-radiotray-ng2:

#!/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' | 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/"//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
  
  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/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/}//' | 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 "$album_art" --output $HOME/.conky/RadioTray_NG/album_art.png
        cat /dev/null > $HOME/.conky/RadioTray_NG/image
    
    fi  
  
  fi

You will need the image not-available.png located in the same folder (~/.conky/RadioTray_NG) and you can download it here:

not-available.png


This is what RadioTrayNG conky looks like now:

Annika Chambers - Stand Up
Ronnie Baker Brooks - Doing Too Much
Charlie Musselwhite - Blues Up The River
Robert Cray - Track 14
Promo

album-art1.png album-art2.png album-art3.png album-art4.png promo.png


P.S.
If I change the code in the future, I'll just edit this post and let you know with a link.

EDIT
Sometimes radio stations use double quotes in the title and this can be a problem for the script to find the album cover image.
The script has been updated.

Testing:

Artist: George "Harmonica" Smith
Album: "Now You Can Talk About Me"
Song: Astatic Stomp

album-art.png

The script works as expected and the album cover  is found.

EDIT
You can find the latest version of the radiotray-ng  script here:
https://forums.bunsenlabs.org/viewtopic … 38#p140138

Last edited by marens (2025-07-08 22:46:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2113 2024-07-23 08:09:58

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Hello

@ marens

As I'm using a lua script to display the album_art and I need a real .png for that, I've added this before the first fi, otherwise the album_art won't be displayed in the conky.

convert $HOME/.conky/RadioTray_NG/album_art.png $HOME/.conky/radiotrayng/pochette.png

Now it work great.

Capture-d-cran-2024-07-23-10-09-26.png

@+

Last edited by loutch (2024-07-23 08:12:20)


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

#2114 2024-07-23 14:58:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

^ The source I use always comes out in .jpeg format.
It also works in conky.

It could look like this:

        curl "$album_art" --output $HOME/.conky/RadioTray_NG/album_art.jpeg
        cat /dev/null > $HOME/.conky/RadioTray_NG/image

If needed for your lua script, you can always add:

convert $HOME/.conky/RadioTray_NG/album_art.jpeg $HOME/.conky/radiotrayng/pochette.png

If people would know how little brain is ruling the world, they would die of fear.

Offline

#2115 2024-07-23 16:24:56

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Re

Oki-doki.

@+


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

#2116 2024-07-30 09:42:43

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Hello guys

I would like to add to the fabulous section by marens hourly the  wind direction and  compass rose

I'm trying this but it don't work.

cat $HOME/Accuweather_conky_script/hourly | grep 'class="value' | awk -F'">' '{print $2}' | sed -r 's/.{6}$//' > $HOME/Accuweather_conky_script/marens_hourly/wind

If someone can look into it , there's no hurry thanks in advance

@+


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

#2117 2024-07-30 14:15:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

^ Find the #Temperature part in #### Marens hourly  and add below  #Wind:

#Temperature
        cat $HOME/Accuweather_conky_script/hourly | grep '"temp metric"' | awk -F'">' '{print $2}' | sed -r 's/.{12}$//' > $HOME/Accuweather_conky_script/marens_hourly/temperature

#Wind
        cat $HOME/Accuweather_conky_script/hourly | grep 'Wind<' | sed 's/^[ \t]*//' | sed 's/<p>Wind<span class="value">//g' | sed 's/<\/span><\/p>//g' > $HOME/Accuweather_conky_script/marens_hourly/wind

Restart conky and check the file ~/Accuweather_conky_script/marens_hourly/wind.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2118 2024-07-30 15:51:11

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Hello

@ marens

MANY TANKS , work great .

Capture-d-cran-2024-07-30-18-00-11.png

@+

Last edited by loutch (2024-07-30 16:00:41)


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

#2119 2024-07-30 16:27:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

Re: Show us your conky

^ I don't know what the output will be when the wind is CALM.
That should be tested.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#2120 2024-07-30 20:11:43

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

RE

Here with wind rose

Capture-d-cran-2024-07-30-22-10-38.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

Board footer

Powered by FluxBB