You are not logged in.
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
@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...)
If people would know how little brain is ruling the world, they would die of fear.
Offline
@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...)
Thanks, I've already tried it.
Offline
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 :
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.jsonRemarque : 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 !
------------------------
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:
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.jsonPlease 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!
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}
...
Offline
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
------------------------------------------------------------------
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
@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
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.
-------------------------------------------
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.
Last edited by unklar (Yesterday 09:03:00)
Offline
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
Hello
Work great with my cac40 conky
${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}
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
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
----------------
@loutch,
awesome!
fantastique!
Offline
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.
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.
@+
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
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