You are not logged in.

#2421 2025-09-18 12:13:12

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

Re: Show us your conky

I will stay away from Wayland and use conky v 1.9.0 for as long as I can.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#2422 2025-09-22 18:22:20

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

Re: Show us your conky

@unklar

Another piece of good news for you, maybe even two.

1) It seems that there are no longer any problems with image sharpness on the Radio Swiss Pop website
2) The new script (audacious-stream-swiss-pop) can also use RadioTray-NG with minor changes (test1, test2, test3, paths...)

radio-swis-pop.png


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

Offline

#2423 2025-09-30 11:11:29

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,670

Re: Show us your conky

marens wrote:

@unklar

Another piece of good news for you, maybe even two.

1) It seems that there are no longer any problems with image sharpness on the Radio Swiss Pop website
2) The new script (audacious-stream-swiss-pop) can also use RadioTray-NG with minor changes (test1, test2, test3, paths...)

https://i.postimg.cc/Lq815xKd/radio-swis-pop.png

Thanks, I've already tried it. smile

Offline

#2424 2025-09-30 11:23:19

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,670

Re: Show us your conky

Je cherchais le cours actuel de l'or pour un Conky et j'ai trouvé ce site web « compatible avec Linux » : https://www.gold.de/chartgenerator/

Il fournit une API gratuite au format json :

gold.de wrote:

Cours de l'or, de l'argent, etc. gratuits – API JSON

Interface API au format JSON avec cours gratuits (or, argent, platine, palladium en euros et en dollars, taux de change EUR/USD) :

Interface :
https://api.edelmetalle.de/public.json

Remarque : toutes les données sont fournies sans garantie, aucune assistance n'est fournie pour l'intégration. La mention « © GOLD.DE » ou similaire est obligatoire.

@loutch ; @marens, pourriez-vous vérifier si ma solution peut être appliquée ainsi ? Le cours est actualisé toutes les 30 secondes.
Merci !  wink

------------------------
I was looking for the current gold price for a Conky and found this ‘Linux-friendly’ website: https://www.gold.de/chartgenerator/

It provides a free API in json format:

gold.de wrote:

Free gold price, silver price, etc. – JSON API

API interface in JSON format with prices for free use (gold, silver, platinum, palladium in euros and dollars, EUR/USD exchange rate):

Interface:
https://api.edelmetalle.de/public.json

Please note: All data is provided without guarantee, no support for integration. Copyright notice “© GOLD.DE” or similar is required.

@loutch; @marens, could you please take a look and see if my solution can be used this way. The course is updated every 30 seconds.
Thanks!  smile

script

#!/bin/bash

#gold.de

#put your GOLD.DE address API here
wget api.edelmetalle.de/public.json -O $HOME/.config/conky/gold/gold.json -o /dev/null

conkyrc

...
${font hack:size=12}${texeci 300 bash $HOME/.config/conky/gold/goldkurs1}© GOLD.DE
${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold.json | jq -r '.gold_eur'} EUR/oz
${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold.json | jq -r '.gold_usd'} USD/oz${font}
...

3akPP99t.png

Offline

#2425 2025-09-30 12:55:26

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

Re: Show us your conky

Hello

Funktioniert bei mir, habe dies nur hinzugefügt, um eine Datei zu haben, die ich überprüfen kann.

conkyrc

 ${alignc}Gold Unklar
${texeci 300 bash $HOME/.conky/Tahoe/gold/gold.sh}

     mise @ jour ${execi 300 date -d "@$(jq -r .timestamp ~/.conky/Tahoe/gold/or)" +%H:%M}
     ${execpi 6 cat $HOME/.conky/Tahoe/gold/or | jq -r '.gold_eur'} EUR/once
     ${execpi 6 cat $HOME/.conky/Tahoe/gold/or | jq -r '.gold_usd'} USD/once
     Taux de change usd-€ ${execpi 6 cat $HOME/.conky/Tahoe/gold/or | jq -r '.wechselkurs_usd_eur' | cut -c1-6}

gold.sh

#!/bin/bash

wget api.edelmetalle.de/public.json -O $HOME/.conky/Tahoe/gold/gold.json -o /dev/null
jq --raw-output . $HOME/.conky/Tahoe/gold/gold.json > $HOME/.conky/Tahoe/gold/or
exit

PDesnP5B_t.png

------------------------------------------------------------------
Works for me, just added this to get a file I can examine.

@+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Online

#2426 2025-09-30 14:32:40

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

Re: Show us your conky

@unklar

Download:

$ wget "api.edelmetalle.de/public.json" -O "$HOME/.config/conky/gold/gold-raw" -o /dev/null

Extract:

$ cat $HOME/.config/conky/gold/gold-raw | awk -F',' '{print $2}' | awk -F':' '{print $2, "EUR/oz"}'
3254.08 EUR/oz

$ cat $HOME/.config/conky/gold/gold-raw | awk -F',' '{print $1}' | awk -F':' '{print $2, "USD/oz"}'
3815.25 USD/oz

Conky:

...
${execpi 600 wget "api.edelmetalle.de/public.json" -O "$HOME/.config/conky/gold/gold-raw" -o /dev/null}
${alignc}${execpi 60 cat $HOME/.config/conky/gold/gold-raw | awk -F',' '{print $2}' | awk -F':' '{print $2, "EUR/oz"}'}
${alignc}${execpi 60 cat $HOME/.config/conky/gold/gold-raw | awk -F',' '{print $1}' | awk -F':' '{print $2, "USD/oz"}'}
... 

EDIT

The download interval of the ${execpi 600 wget...  and  ${execpi 60 cat...  commands should be set so that they rarely overlap.
That's your job because I have no idea how often you need fresh data.

I tested 60/8.37 as an example:

...
${execpi 60 wget "api.edelmetalle.de/public.json" -O "$HOME/.config/conky/gold/gold-raw" -o /dev/null}
${alignc}${execpi 8.37 cat $HOME/.config/conky/gold/gold-raw | awk -F',' '{print $2}' | awk -F':' '{print $2, "EUR/oz"}'}
${alignc}${execpi 8.37 cat $HOME/.config/conky/gold/gold-raw | awk -F',' '{print $1}' | awk -F':' '{print $2, "USD/oz"}'}
...

Last edited by marens (2025-09-30 18:12:20)


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

Offline

#2427 Yesterday 09:00:57

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,670

Re: Show us your conky

Merci beaucoup à vous deux ! Ce sont d'excellentes idées !

@marens,
j'ai  compris qu'il fallait mettre l'adresse API entre " guillemets ". J'ai également
compris qu'il ne fallait pas travailler avec les données originales. Il vaut mieux les enregistrer dans un fichier RAW.

Je trouve que c'est une idée très intelligente de ta part, cela ne nécessite aucun script. Depuis Conky, cela consomme beaucoup moins de ressources [!].

Pour moi, ces paramètres sont optimaux :

${alignc}${font hack:size=12}© GOLD.DE
${execpi 300 wget "api.edelmetalle.de/public.json" -O "$HOME/.config/conky/gold/gold-raw" -o /dev/null}
${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold-raw | jq -r “.gold_eur”} EUR/oz
${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold-raw | jq -r “.gold_usd”} USD/oz${font}

Comme tu peux le voir, en tant qu'ami du code "court", je préfère tout de même travailler avec jq plutôt qu'avec awk et print.  hiMq1z9.png

-------------------------------------------
Thank you both! Those are great ideas!

@marens,
I understand that you put the API address in “quotation marks.” I also understand that you don't actually work with the original data. It's better to store that in a RAW file.

I think that's a really smart idea on your part; no script is needed. Working from within Conky is much more resource-efficient [!].

For me, these settings are optimal:

${alignc}${font hack:size=12}© GOLD.DE
${execpi 300 wget "api.edelmetalle.de/public.json" -O "$HOME/.config/conky/gold/gold-raw" -o /dev/null}
${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold-raw | jq -r “.gold_eur”} EUR/oz
${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold-raw | jq -r “.gold_usd”} USD/oz${font}

As you can see, as a fan of ‘short’ code, I still prefer to work with jq rather than awk and print.  big_smile

Last edited by unklar (Yesterday 09:03:00)

Offline

#2428 Yesterday 12:40:49

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

Re: Show us your conky

I noticed a small 'problem' with the alignment.

Sometimes it happens that EUR/oz (or USD/oz) has only one decimal place.
Conky is set with  alignc  and so the alignment is lost.

This can be easily solved:

$ echo '3815.2' | awk '{printf("%.2f\n", $0)}'
3815.20

Conky:

${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold-raw | jq -r “.gold_eur” | awk '{printf("%.2f\n", $0)}'} EUR/oz
${alignc}${execpi 6 cat $HOME/.config/conky/gold/gold-raw | jq -r “.gold_usd” | awk '{printf("%.2f\n", $0)}'} USD/oz

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

Offline

#2429 Yesterday 12:57:45

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

Re: Show us your conky

Hello

Work great with my cac40 conky

Ru2XI0OO_t.png

 ${alignc}CAC 40
     ${texeci 300 sed -n '11p' $HOME/.conky/Tahoe/bourse/info_cac.txt} Pts
     ${texeci 300 sed -n '12p' $HOME/.conky/Tahoe/bourse/info_cac.txt}
${execpi 300 wget "api.edelmetalle.de/public.json" -O "$HOME/.conky/Tahoe/bourse/gold-raw"}
${alignc} OR
     mise @ jour ${execi 300 date -d "@$(jq -r .timestamp ~/.conky/Tahoe/bourse/gold-raw)" +%H:%M}
     ${execpi 6 cat $HOME/.conky/Tahoe/bourse/gold-raw | jq -r '.gold_eur'} €/once
     ${execpi 6 cat $HOME/.conky/Tahoe/bourse/gold-raw | jq -r '.gold_usd'} $$/once
     Taux de change $$ - € ${execpi 6 cat $HOME/.conky/Tahoe/bourse/gold-raw | jq -r '.wechselkurs_usd_eur' | cut -c1-6}

${lua fDrawImage $HOME/.conky/Tahoe/bourse/diag.png 20 51 130 72}
${voffset -200}
${execi 350 ~/.conky/Tahoe/bourse/cac40.sh}

UyyY6mRW_t.png
@+

Last edited by loutch (Yesterday 13:01:19)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Online

#2430 Today 08:40:00

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,670

Re: Show us your conky

marens wrote:

I noticed a small 'problem' with the alignment.

Sometimes it happens that EUR/oz (or USD/oz) has only one decimal place.
Conky is set with  alignc  and so the alignment is lost.

This can be easily solved:

perfectionist  wink

----------------
@loutch,

awesome!
fantastique!  smile

Offline

#2431 Today 15:45:41

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

Re: Show us your conky

Hello

@ unklar

Danke.


I continue to work on my Tahoe conkys , one of my old conkys (1600x900) from Mageia 5, drastically reduced to fit into a box.

1iYpjbnF_t.png

Since each conky at left side has its own launcher, I can put whichever one I want on the desktop.

Here are some of them.

V944l8fl_t.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

Online

#2432 Today 15:58:21

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

Re: Show us your conky

Start and Close Conky  -  same keyboard shortcut

It's best to explain with an example.

Conky:
Name: RadioTray_NG
Path: $HOME/.conky/RadioTray_NG/RadioTray_NG

1) The keyboard_shortcut  script inside the ~/.conky/RadioTray_NG  folder:

#!/usr/bin/env bash

# Try to get a list of PIDs for appropriate conky's
# Name not Path
runningConkys=$(pgrep -a conky | awk '/RadioTray_NG/{print $1}')

# if runningConkys is empty
if [[ -z "$runningConkys" ]]; then
    # Start Conky if Disabled
    # Path
    conky -q -c $HOME/.conky/RadioTray_NG/RadioTray_NG &
else #not empty
    # Kill all of the PIDs listed in $runningConkys
    # Kill Conky if Enabled
    kill -SIGKILL $runningConkys
fi

2) Make the script executable
3) Set Shortcut in Settings: Ctrl + Super + Alt + R
4) Command: bash -c '$HOME/.conky/RadioTray_NG/keyboard_shortcut'

Done.

Now you can easily start/close this conky with Ctrl + Super + Alt + R.


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

Offline

Board footer

Powered by FluxBB