Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#2901 Le 11/09/2010, à 13:45

Fenouille84

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

sunkart a écrit :

J'ai testé et ça fonctionne pour les deux. Par contre, je peux pas la définir comme font par défaut. Je suis obligé d'utiliser les balises fonts dans le texte.

Tant mieux si sa fonctionne.
Pour les balises, c'est ce qu'il y a de plus pratique je trouve.

DarthWound a écrit :

J'en sais rien mais ça viendrait pas du fait que c'est une police spéciale (BRK)? J'avais eu ce même ''soucis" avec une police de ce type.

Ben non, justement, la BRK fonctionnait chez moi alors que l'autre non... tongue

Dernière modification par Fenouille84 (Le 11/09/2010, à 13:45)


Ma page Deviant Art : conky inside ;-)
.
-- DropBox (online backup) : 2Go + 250 Mo pour vous et moi par parrainage --

Hors ligne

#2902 Le 11/09/2010, à 14:57

DarthWound

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Ah tongue

--> je m'enterre

#2903 Le 11/09/2010, à 22:25

Birdwing

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

scoubidou,

lifala a écrit :

salut,

voila de nouveau mon bureau réorganisé avec tilda, je souhaiterai ajouter des consoles, comment je pourrais faire sa?

http://img59.imageshack.us/img59/9672/lifalacapture.png

merci

j'aime beaucoup celui-là, notamment la date ([size=7]mais le reste aussi ;-) [/size])


Voyager 12.04 LTS basé sur Ubuntu 12.04 LTS
Ylmf OS 3.0
AbulEdu
2x AMD Athlon(tm) II X2 215 Processor - RAM 3Go

Hors ligne

#2904 Le 12/09/2010, à 12:36

sunkart

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Pour les pros des scripts, est-ce qu'il y aurait un moyen de pinger une ip sur le réseau pour renvoyer l'information connecté ou non ?

Comme la commande ping renvoit une information, ça pourrait marcher, mais je ne sais pas trop par où commencer ?


Cyril

Hors ligne

#2905 Le 12/09/2010, à 15:00

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Dis nous ce que renvoie ta commande dans un terminal, ensuite avec un grep, awk ou cut on peut choisir ce que l'on veut afficher...


Tout est dans tout et réciproquement....

Hors ligne

#2906 Le 12/09/2010, à 15:03

spinoziste

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Salut à tous .


Je poste mon probleme ici .

Je suis sous fluxbox et je ne parviens decidemment pas à lancer conky . J'ai installé les polices necessaires tenté d'enlever les lignes sur le CPU au cas ou , changé la taille dans le .conkyrc :

minimum_size 300 750 ## Height can not be less than the height of background.

Rien à faire il ne veut pas se lancer le terminal me rend cette erreur .

Conky: desktop window (13c) is root window
Conky: window type - override
Conky: drawing to created window (0x2800001)
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  1 (X_CreateWindow)
  Value in failed request:  0x0
  Serial number of failed request:  489
  Current serial number in output stream:  492

Que faire par ou commencer . ?

Voici le conky que je tente desesperement de faire afficher à mon laptop .
http://linuxmint-art.org/content/show.p … ent=127511

Merci d'avance ubunteros .


Nous mourrons tous .

Hors ligne

#2907 Le 12/09/2010, à 18:49

kakulupia

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

wlourf a écrit :

@Fenouille :
bon résumé! par contre utiliser le dossier /usr/share/vlc/http/ c'est un peu pénible car il faut être en sudo pour y avoir accès. Et j'aime bien avoir tous les fichiers pour un même conky dans un seul dossier, d'où l'interêt de --http-src

Et si tu trouves une astuce pour récupérer la pochette de l'album je suis preneur, ou même le nom du fichier , ce serait déjà bien ! J'avais regardé du côté des macros de vlc mais j'ai laissé tombé wink

@kakulupia

en plus de ce qu'a dit chepioq, ajoute un flux RSS dans ton script, ça ira mieux tongue

URI=     #URI of RSS Feed

il existe aussi la variable rss à utiliser directement dans ton conky, mais elle semble un peu buguée :
http://conky.sourceforge.net/variables.html

Oui éfféctivement je l'avais oublié lors de mon Copier/Coller! Mais il était bien présent.

Voici l'erreurr ressortis lors du lancement du fichier conky-rss.sh :

conky-rss.sh: line 28: Caractère de fin de fichier (EOF) prématuré lors de la recherche du « ' » correspondant
conky-rss.sh: line 31: Erreur de syntaxe : fin de fichier prématurée

Revoici le fichier en question :

#!/bin/bash
# RSS Feed Display Script by Hellf[i]re v0.1
#Chancery
# This script is designed for most any RSS Feed. As some feeds may not be
# completely compliant, it may need a bit of tweaking
#
# This script depends on curl.
# Gentoo: emerge -av net-misc/curl
# Debian: apt-get install curl
# Homepage: http://curl.haxx.se/
#
# Usage:
# .conkyrc: ${execi [time] /path/to/script/conky-rss.sh}
#
# Usage Example
# ${execi 300 /home/youruser/scripts/conky-rss.sh}#RSS Setup
URI=http://www.pcinpact.com/include/news.xml #URI of RSS Feed
LINES=2 #Number of headlines
#Environment Setup
EXEC="/usr/bin/curl -s" #Path to curl
#Work Start
$EXEC $URI | grep title |\
sed -e :a -e 's/<[^>]*>//g;/
sed -e 's/[ \t]*//' |\
sed -e 's/\(.*\)/ \1/' |\
sed -e 's/\.//' |\
sed -e 's/\"//' |\
sed -e 's/\"//' |\
head -n $(($LINES + 2)) |\
tail -n $(($LINES))

Sinon j'ai essayé la fonction RSS (je savais pas qu'elle y était ) mais j'ai pas trop compris comment l'utilisé (et je suis pas arrivé à trouver des personnes qui l'utilisait) .. elle ne me sort qu'une seule ligne, sans titre ni rien.
Voici la ligne:

${rss http://www.lemonde.fr/rss/une.xml 5 title_item 1}

merci encore pour l'aide smile

Hors ligne

#2908 Le 12/09/2010, à 19:45

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Il te manque un ' ligne 23 tu devrais avoir:

sed -e :a -e 's/<[^>]*>//g';/

Dernière modification par chepioq (Le 12/09/2010, à 19:45)


Tout est dans tout et réciproquement....

Hors ligne

#2909 Le 12/09/2010, à 20:17

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Bon j'ai essayé ton script, mais cela ne fonctionne pas comme il faut.

En recherchant sur le net, j'ai trouvé le script original, qui fonctionne un peu mieux:

#!/bin/bash
# RSS Feed Display Script by Hellf[i]re v0.1
#Chancery
# This script is designed for most any RSS Feed. As some feeds may not be
# completely compliant, it may need a bit of tweaking
#
# This script depends on curl.
# Gentoo: emerge -av net-misc/curl
# Debian: apt-get install curl
# Homepage: http://curl.haxx.se/
#
# Usage:
# .conkyrc: ${execi [time] /path/to/script/conky-rss.sh}
#
# Usage Example
# ${execi 300 /home/youruser/scripts/conky-rss.sh}#RSS Setup
URI=http://www.pcinpact.com/include/news.xml #URI of RSS Feed
LINES=2 #Number of headlines
#Environment Setup
EXEC="/usr/bin/curl -s" #Path to curl
#Work Start
$EXEC $URI | grep title |\
sed -e :a -e 's/<[^>]*>//g;/</N' |\
sed -e 's/[ \t]*//' |\
sed -e 's/\(.*\)/ \1/' |\
sed -e 's/\.//' |\
sed -e 's/\"//' |\
sed -e 's/\"//' |\
head -n $(($LINES + 2)) |\
tail -n $(($LINES))

Qui me renvoie, quand je le lance en console (j'ai appelé ce script exemple.sh)

[dominique@localhost Documents]$ ./exemple.sh
 Journal du Capitaine des PCi Labs : an 2010, semaine 36
 290�me �dition des LIDD : Liens Idiots Du Dimanche
[dominique@localhost Documents]$

Dernière modification par chepioq (Le 12/09/2010, à 20:26)


Tout est dans tout et réciproquement....

Hors ligne

#2910 Le 12/09/2010, à 20:31

sunkart

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

chepioq a écrit :

Dis nous ce que renvoie ta commande dans un terminal, ensuite avec un grep, awk ou cut on peut choisir ce que l'on veut afficher...

Voici le résultat quand il y a quelque chose en face :

portable@portable-laptop:~$ ping -q -c5 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.

--- 192.168.0.10 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.872/4.445/18.208/6.882 ms

Et le résultat quand il y a rien :

portable@portable-laptop:~$ ping -q -c5 192.168.0.12
PING 192.168.0.12 (192.168.0.12) 56(84) bytes of data.

--- 192.168.0.12 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4006ms
, pipe 3

Cyril

Hors ligne

#2911 Le 12/09/2010, à 22:37

kakulupia

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

@chepioq: J'ai modifié avec le script que tu as essayé, il marche niquel smile

Merci bcp pour ton aide! smile

Dernière modification par kakulupia (Le 12/09/2010, à 22:38)

Hors ligne

#2912 Le 13/09/2010, à 19:34

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

sunkart a écrit :
chepioq a écrit :

Dis nous ce que renvoie ta commande dans un terminal, ensuite avec un grep, awk ou cut on peut choisir ce que l'on veut afficher...

Voici le résultat quand il y a quelque chose en face :

portable@portable-laptop:~$ ping -q -c5 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.

--- 192.168.0.10 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.872/4.445/18.208/6.882 ms

Et le résultat quand il y a rien :

portable@portable-laptop:~$ ping -q -c5 192.168.0.12
PING 192.168.0.12 (192.168.0.12) 56(84) bytes of data.

--- 192.168.0.12 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4006ms
, pipe 3

Aprés quelques recherches sur le net (je suis un peu nul en programmation), Je suis parvenu à faire ce script, qui me renvois connecté ou déconnecté suivant l'état de ma connexion

connect.sh

#!/bin/bash

EXEC="ping -q -c3"
IP="192.168.0.10"

if $EXEC $IP | grep 100% &> /dev/null


then echo "déconnecté"
else echo "connecté"
fi

Dis moi si cela fonctionne chez toi.


Tout est dans tout et réciproquement....

Hors ligne

#2913 Le 13/09/2010, à 19:44

JB-home

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

chepioq a écrit :

Aprés quelques recherches sur le net (je suis un peu nul en programmation), Je suis parvenu à faire ce script, qui me renvois connecté ou déconnecté suivant l'état de ma connexion

connect.sh

#!/bin/bash

EXEC="ping -q -c3"
IP="192.168.0.10"

if $EXEC $IP | grep 100% &> /dev/null


then echo "déconnecté"
else echo "connecté"
fi

Dis moi si cela fonctionne chez toi.

voila comment je fait pour afficher ma connexion si le wifi est activé

${if_existing /proc/net/route wlan0}${color black}${wireless_essid wlan0}   ${color 740E0E}${execi 1800 wget -q -O - http://ip.tupeux.com |tail}      ${color black}↓${color 242424}${downspeed wlan0}    ${color black}↑${color 242424}${upspeed wlan0}${color}${else}${color red}wifi off${color}${endif}

si le wifi est déconnecté conky affiche wifi off, je pense que ça fonctionne aussi pour eth0

Hors ligne

#2914 Le 13/09/2010, à 19:52

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

z0rg> a écrit :
chepioq a écrit :

Aprés quelques recherches sur le net (je suis un peu nul en programmation), Je suis parvenu à faire ce script, qui me renvois connecté ou déconnecté suivant l'état de ma connexion

connect.sh

#!/bin/bash

EXEC="ping -q -c3"
IP="192.168.0.10"

if $EXEC $IP | grep 100% &> /dev/null


then echo "déconnecté"
else echo "connecté"
fi

Dis moi si cela fonctionne chez toi.

voila comment je fait pour afficher ma connexion si le wifi est activé

${if_existing /proc/net/route wlan0}${color black}${wireless_essid wlan0}   ${color 740E0E}${execi 1800 wget -q -O - http://ip.tupeux.com |tail}      ${color black}↓${color 242424}${downspeed wlan0}    ${color black}↑${color 242424}${upspeed wlan0}${color}${else}${color red}wifi off${color}${endif}

si le wifi est déconnecté conky affiche wifi off, je pense que ça fonctionne aussi pour eth0

Je connais cette commande, mais la demande de sunkart est de savoir si une ip est connecté sur le réseau, et non de savoir si son eth0 ou son wifi sont activés (voir post 2904)


Tout est dans tout et réciproquement....

Hors ligne

#2915 Le 13/09/2010, à 20:29

JB-home

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

oké autant pour moi tongue

Hors ligne

#2916 Le 13/09/2010, à 20:45

sunkart

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Exactement, et ça fonctionne très bien big_smile

Merci chepioq cool


Cyril

Hors ligne

#2917 Le 13/09/2010, à 23:45

diosylang

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonsoir tout le monde,

C'est juste un marquage pour pouvoir suivre.
Voilà que j'ai craqué sur conky dès la première vue et j'espère en construire un personnel pour ensuite le partager avec vous.
J'adore presque tous les conky publiés.

Salut
PS: je suis au stade installation (débutant)

Dernière modification par diosylang (Le 13/09/2010, à 23:49)


Portable HP Pavilion dv9000: Intel Core 2 Duo CPU T8100, 2.1 GHz, 3 Go de RAM, nvidia GeForce 8600M GS [Lucid]
Je suis liberé de windows gràce à GNU/Linux.

Hors ligne

#2918 Le 14/09/2010, à 17:46

Fenouille84

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

diosylang a écrit :

PS: je suis au stade installation (débutant)

Bon courage ! Et à bientôt pour partager ton premier conky wink


Ma page Deviant Art : conky inside ;-)
.
-- DropBox (online backup) : 2Go + 250 Mo pour vous et moi par parrainage --

Hors ligne

#2919 Le 15/09/2010, à 19:52

lilone972

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Nouveau conky alors je fais partager !
Je posterais les conkyrc quand j'aurais réglé quelque petit détails... ^^
conky2.th.png

Uploaded with ImageShack.us

Par contre je voulais intégrer mon client bittorent Deluge au conky mais j'ai appris par l'éditeur du script conkyDeluge que celui ci n'était plus supporté donc j'ai essayé avec Transmission malheureusement j'ai quelque problèmes avec Transmission-remote...

marvin@DeathstarUbuntu:~$ transmission-remote -l
Unexpected response: <h1>401: Unauthorized</h1>Unauthorized User

Si quelqu'un peut m'aider se serait cool... ^^

Dernière modification par lilone972 (Le 15/09/2010, à 19:53)

Hors ligne

#2920 Le 15/09/2010, à 21:02

kkwete

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

ton bureau est tout simplement magnifique!!!
La concordance des couleurs, les polices, la disposition...Joli travail!

Hors ligne

#2921 Le 15/09/2010, à 21:59

wlourf

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

@chepioq
Il y a quelques temps, j'utilisais Lua, pour afficher la lune sur un fond transparent. Bon j'ai découvert une méthode plus simple sur ubuntu.us, et je l'ai mise dans le script, sais pas si tu l'utilises toujours  :

#!/bin/bash
# ce script télécharge des images de la terre ou de la lune (si le premier paramètre est "moon "
# et les découpe en cercle 
# les paramètres sont les mêmes que ceux de cette page
#http://www.fourmilab.ch/earthview/expert.html
#version1.1, wlourf 14 sept. 2010
#http://u-scripts.blogspot.com/
#source pour découper l'image :http://wwww.ubuntuforums.org/showpost.php?p=9541241&postcount=13076


#1er paramètre : moon pour afficher la lune, si pas de paramètre, affiche la terre
# en sortie, fichier /tmp/earth/moon-out.png  ou /tmp/earth/earth-out.png

#===========début des paramètres===============
#dossier temporaire
dir="/tmp/earth"     
#dossier où sont stockés mask.png et overlay.png
dirmasks="/home/ll/conky/earth" 

if [[ "$1" == "moon" ]]; then
    Latitude=47.243055556        #number
    NorthSouth=n    #n/s
    Longitude=6.021944444        #number
    EastWest=e        #e/w
    Altitude=401725 #altitude in kilometers (max=401725)
    #___Image___
    Image=topo         #topo,albedo
    Size=100        #number (default=320)
    ShowNight=true     #true/false
    file1=$dir/get_moon.txt        #temp file for url
    file2=$dir/moon_image        #final image
    basename="moon"
else
    #___View___
    Latitude=47.243055556       #number
    NorthSouth=n    #n/s
    Longitude=6.021944444      #number
    EastWest=e          #e/w
    Altitude=35785     #altitude in kilometers (max=35785)
    #___Image___
    Image=live         #live,marble,nasa,topo,cloudy,ir,cweather,vapour_bg,vapour
    Size=100            #number (default=320)
    ShowNight=true     #true/false
    file1=$dir/get_earth.txt    #temp file for url
    file2=$dir/earth_image        #final image
    basename="earth"
fi

#===========fin des paramètres===============

base=http://www.fourmilab.ch

#mise en forme des paramètres
if [[ "$NorthSouth" == "s" ]]; then
    NorthSouth="South"
else
    NorthSouth="North"
fi
if [[ "$EastWest" == "e" ]]; then
    EastWest="East"
else
    EastWest="West"
fi

if [[ "$ShowNight" == true ]]; then
    DayNight=""
else
    DayNight="&daynight=d"
fi
if [[ "$1" == "moon" ]]; then
    case $Image in
        "topo")    Image="MoonTopo.evif";;
        *)        Image="Moon.evif";;
    esac
else
    case $Image in
        "marble")    Image="NASA500m.evif";;
        "nasa")        Image="nasa.evif";;
        "topo")        Image="NOAAtopo.evif";;
        "clouds")    Image="cloudy.bmp";;
        "ir")        Image="irsat.bmp";;
        "cweather")    Image="wx-cmap.bmp";;
        "vapour_bg")Image="vapour_bg.bmp";;
        "vapour")    Image="vapour.bmp";;
        *)            Image="learth.evif";;
    esac
fi

#get the url
mkdir -p $dir
cd $dir

wget -q http://www.fourmilab.ch/cgi-bin/Earth?lat=$Latitude\&ns=l$NorthSouth\&lon=$Longitude\&ew=$EastWest\&alt=$Altitude$DayNight\&img=$Image\&imgsize=$Size -O $file1

#extract the line of the image
url_image="$(cat $file1 | grep "<img src=" | awk -F'\"' '{print $2}' )"

if [[ "$url_image" == "" ]]; then
    echo "no url matched"
    exit
fi

#extract the link of the image and save the image
wget -q  $base$url_image -O $file2

#effet bombé commenté
#convert $file2 $dirmasks/overlay$Size.png -compose HardLight -composite $dirmasks/mask$Size.png -alpha off -compose CopyOpacity -composite $dir/$basename-out.png

#effet non bombé
convert $file2  $dirmasks/mask$Size.png -alpha off -compose CopyOpacity -composite $dir/$basename-out.png

exit

Il y a même un sympatique effet bombé à présent(sur la deuxième ligne)  :
141d7fb8a5386eeea796b8324b88d.png
Plus de détails ici :

Hors ligne

#2922 Le 15/09/2010, à 23:09

breakolami

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

Hé lilone972 tu vas te faire engueuler par ma fille si tu passes tes journées à faire des conky tongue

Surtout ne lui dis pas que c'est à cause de moi si tu es devenu accroc aux conky big_smile


Kubuntu 23.10 sur MSI Katana 17, Intel i7 12ème génération, 1 Nvme M.2 P5 500Go, 1 Nvme M.2 P2 500Go, 16Go de mémoire, Nvidia GeForce RTX 4060
https://www.youtube.com/@ChristopheBrand

Hors ligne

#2923 Le 16/09/2010, à 09:20

chepioq

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

@wlourf
Merci de l'info, mais je n'utilise plus ce script.
Je préfère utiliser ton script square_to_round.lua avec les images de la lune que je récupère sur le site static.die.net.


Tout est dans tout et réciproquement....

Hors ligne

#2924 Le 16/09/2010, à 12:18

wlourf

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

ok mais la commande "convert" qui tient sur une ligne dans le script  est équivalente au script square_to_round.lua.

a+

Hors ligne

#2925 Le 16/09/2010, à 13:01

lilone972

Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes

@breakolami
C'est bon maintenant que j'ai terminé celui là elle va plus m'engueuler... jusqu'au prochain! tongue

@kkwete
Merci pour le compliment!
Je post mes conkyrc si ca t'intéresse. Pour la police c'est "ethnocentric" dispo sur dafont.

conky2.th.png

ring.lua

--[[
Ring Meters by londonali1010 (2009)
 
This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
 
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
 
To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/rings-v1.2.1.lua
    lua_draw_hook_pre ring_stats
 
Changelog:
+ v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009)
+ v1.2 -- Added option for the ending angle of the rings (07.10.2009)
+ v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)
+ v1.0 -- Original release (28.09.2009)
]]
 
conky_background_color = 0x151515
conky_background_alpha = 0

ring_background_color = 0xA3A3A3
ring_background_alpha = 0.9
ring_foreground_color = 0x57CF85
ring_foreground_color2 = 0x3782BF
ring_foreground_color3 = 0xaa0000
ring_foreground_alpha = 1

settings_table = {
    {
        name='time',
        arg='%S',
        max=60,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=830, y=120,
        radius=90,
        thickness=12,
        start_angle=0,
        end_angle=360
    },
    {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=80,
        radius=45,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
    {
        name='cpu',
        arg='cpu5',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=80,
        radius=35,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
 {
        name='cpu',
        arg='cpu6',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=220,
        radius=35,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
    {
        name='cpu',
        arg='cpu2',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=220,
        radius=45,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
    {
        name='cpu',
        arg='cpu3',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=360,
        radius=45,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
    {
        name='cpu',
        arg='cpu7',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=360,
        radius=35,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
    {
        name='cpu',
        arg='cpu4',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=500,
        radius=45,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
     {
        name='cpu',
        arg='cpu0',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=100, y=500,
        radius=35,
        thickness=6,
        start_angle=-90,
        end_angle=180
    },
    }
 
require 'cairo'
 
function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
 
function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
 
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
 
    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)
 
    -- Draw background ring
 
    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
 
    -- Draw indicator ring
 
    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)        
end
 
function conky_ring_stats()
    local function setup_rings(cr,pt)
        local str=''
        local value=0
 
        str=string.format('${%s %s}',pt['name'],pt['arg'])
        str=conky_parse(str)
 
        value=tonumber(str)
        if value == nil then value = 0 end
        pct=value/pt['max']
 
        draw_ring(cr,pct,pt)
    end
 
    if conky_window==nil then return end
    local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
 
    local cr=cairo_create(cs)    
 
    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
 
    if update_num>5 then
        for i in pairs(settings_table) do
            setup_rings(cr,settings_table[i])
        end
    end
end

ring2.lua

--[[
Ring Meters by londonali1010 (2009)
 
This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
 
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
 
To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/rings-v1.2.1.lua
    lua_draw_hook_pre ring_stats
 
Changelog:
+ v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009)
+ v1.2 -- Added option for the ending angle of the rings (07.10.2009)
+ v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)
+ v1.0 -- Original release (28.09.2009)
]]
 
conky_background_color = 0x151515
conky_background_alpha = 0

ring_background_color = 0xA3A3A3
ring_background_alpha = 0.9
ring_foreground_color = 0x57CF85
ring_foreground_color2 = 0x3782BF
ring_foreground_color3 = 0xaa0000
ring_foreground_alpha = 1

settings_table = {
    {
        name='time',
        arg='%S',
        max=60,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=840, y=120,
        radius=90,
        thickness=12,
        start_angle=0,
        end_angle=360
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=1580, y=695,
        radius=45,
        thickness=6,
        start_angle=-180,
        end_angle=90
    },
    {
        name='fs_used_perc',
        arg='/media/STOCK_1/',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=1580, y=835,
        radius=45,
        thickness=6,
        start_angle=-180,
        end_angle=90
    },
    {
        name='upspeedf',
        arg='eth1',
        max=130,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=1580, y=555,
        radius=45,
        thickness=6,
        start_angle=-180,
        end_angle=90
    },
    {
        name='downspeedf',
        arg='eth1',
        max=530,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=1580, y=415,
        radius=45,
        thickness=6,
        start_angle=-180,
        end_angle=90
    },
    {
        name='execi 10 ~/.conky/amarok progress',
        arg='',
        max=100,
        bg_colour=ring_background_color,
        bg_alpha=ring_background_alpha,
        fg_colour=ring_foreground_color,
        fg_alpha=ring_foreground_alpha,
        x=840, y=120,
        radius=110,
        thickness=10,
        start_angle=-180,
        end_angle=180
    },
    }
 
require 'cairo'
 
function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
 
function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
 
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
 
    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)
 
    -- Draw background ring
 
    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
 
    -- Draw indicator ring
 
    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)        
end
 
function conky_ring_stats()
    local function setup_rings(cr,pt)
        local str=''
        local value=0
 
        str=string.format('${%s %s}',pt['name'],pt['arg'])
        str=conky_parse(str)
 
        value=tonumber(str)
        if value == nil then value = 0 end
        pct=value/pt['max']
 
        draw_ring(cr,pct,pt)
    end
 
    if conky_window==nil then return end
    local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
 
    local cr=cairo_create(cs)    
 
    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
 
    if update_num>5 then
        for i in pairs(settings_table) do
            setup_rings(cr,settings_table[i])
        end
    end
end

conkyrc

# -- Conky settings -- #
background yes
update_interval 1
 
cpu_avg_samples 2
net_avg_samples 2
 
override_utf8_locale yes
 
double_buffer yes
no_buffers yes
 
text_buffer_size 2048
imlib_cache_size 0

maximum_width 290
minimum_size 240 1
 
# -- Window specifications -- #
 
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
 
border_inner_margin 100
border_outer_margin 1
 

alignment top_left
gap_x 100
gap_y 436
 
# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
 
# -- Text settings -- #
use_xft yes
xftfont ethnocentric:size=10
xftalpha 0.4
 
uppercase no

#colors
#good blue 1994d1
#medium blue 083146
#dark blue 041e2c
#lime 86c113
color1 cdcdcd
color2 86c113
color3 1994d1
color4 aa0000
 
default_color EEEEEE
 
# -- Lua Load -- #
lua_load ~/Conky/ring.lua
lua_draw_hook_pre ring_stats
 
TEXT
${color #A3A3A3}${goto 150}${goto 250}Core 1  
${color #A3A3A3}${goto 100}${hr 2}${goto 200}   
${color #A3A3A3}${goto 150}${goto 162}CPU Temp: ${color #57CF85}${hwmon 0 temp 1}°C
${color #A3A3A3}${goto 150}${voffset 90}${goto 247}Core 2
${color #A3A3A3}${goto 100}${hr 2}${goto 200}
${color #A3A3A3}${goto 150}${goto 135}CPU Fan: ${color #57CF85}${hwmon 0 fan 1} RPM
${color #A3A3A3}${goto 150}${voffset 89}${goto 247}Core 3
${color #A3A3A3}${goto 100}${hr 2}${goto 200}
${color #A3A3A3}${goto 150}${goto 135}CPU Freq: ${color #57CF85}${freq_g}Ghz
${color #A3A3A3}${goto 150}${voffset 89}${goto 247}Core 4
${color #A3A3A3}${goto 100}${hr 2}${goto 200}
${color #A3A3A3}${goto 150}${goto 175}CG Temp: ${color #57CF85}${nvidia temp}°C

conkyrc2

# -- Conky settings -- #
background no
update_interval 1
 
cpu_avg_samples 2
net_avg_samples 2
 
override_utf8_locale yes
 
double_buffer yes
no_buffers yes
 
text_buffer_size 2048
imlib_cache_size 0

maximum_width 1480
minimum_size 320 10
 
# -- Window specifications -- #
 
own_window no
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
 
border_inner_margin 100
border_outer_margin 1
 

alignment top_left
gap_x 100
gap_y 100
 
# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
 
# -- Text settings -- #
use_xft yes
xftfont ethnocentric:size=10
xftalpha 0.4
 
uppercase no

#colors
#good blue 1994d1
#medium blue 083146
#dark blue 041e2c
#lime 86c113
color1 cdcdcd
color2 86c113
color3 1994d1
color4 aa0000
 
default_color EEEEEE
 
# -- Lua Load -- #
lua_load ~/Conky/ring3.lua
lua_draw_hook_pre ring_stats

TEXT
${color #A3A3A3}${goto 1360}${voffset 337}download 
${color #A3A3A3}${goto 1335}${hr 2} 
${color #A3A3A3}${goto 1360}eth1: ${color #57CF85}${downspeed eth1}
${color #A3A3A3}${goto 1360}${voffset 89}upload
${color #A3A3A3}${goto 1335}${hr 2}
${color #A3A3A3}${goto 1360}eth1: ${color #57CF85}${upspeed eth1}
${color #A3A3A3}${goto 1360}${voffset 88}ubuntu
${color #A3A3A3}${goto 1335}${hr 2}
${color #A3A3A3}${goto 1360}free: ${color #57CF85}${fs_free /}
${color #A3A3A3}${goto 1360}${voffset 90}stock 1
${color #A3A3A3}${goto 1335}${hr 2}
${color #A3A3A3}${goto 1360}free: ${color #57CF85}${if_mounted /media/STOCK_1}${fs_free /media/STOCK_1}${else} Non Monte $endif

conkyrc3

background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no
use_xft yes
xftfont Terminal Bitstream Vera Sans Mono:size=12
xftalpha 0.8
update_interval 1

own_window yes
own_window_type override
own_window_transparent yes


double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1

default_color white
default_shade_color black

gap_x 550
gap_y 700
alignment top_left
maximum_width 800
minimum_size 330 10

use_spacer yes
no_buffers yes
uppercase no


#ed141a 88bbff 20a619 e1470b
TEXT


${font ethnocentric:pixelsize=38}${color #57CF85}        DEATHSTAR
${font ethnocentric:pixelsize=20} ${color #A3A3A3}                 ${execi 86400 lsb_release -si} : ${execi 86400 lsb_release -sr} ${execi 86400 lsb_release -sc}$font

${font ethnocentric:pixelsize=15}    Local: ${color #57CF85}${addr eth1}${color}      ${color #A3A3A3}Adresse Ip:${color #57CF85}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}${color}

conkyamarok

background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no
use_xft yes
xftfont ethnocentric:size=9
xftalpha 0.8
update_interval 1

own_window yes
own_window_type override
own_window_transparent yes


double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1

default_color white
default_shade_color black

gap_x 600
gap_y 260
alignment top_left
maximum_width 480
minimum_size 0 0

use_spacer yes
no_buffers yes
uppercase no


TEXT
${color #A3A3A3}${if_running amarok}
${alignc}${execi 10 ~/.conky/amarok artist}
${alignc}${execi 10 ~/.conky/amarok title}
${alignc}"${execi 10 ~/.conky/amarok album}"
${alignc}${execi 10 ~/.conky/amarok year} - ${alignc}${execi 10 ~/.conky/amarok genre}${else}

${alignc}   $endif

conkyprocess

background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no
use_xft yes
xftfont ethnocentric:size=8
xftalpha 0.8
update_interval 1

own_window yes
own_window_type override
own_window_transparent yes


double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1

default_color black
default_shade_color black

gap_x 1170
gap_y 30
alignment top_left
maximum_width 500
minimum_size 330 10

use_spacer yes
no_buffers yes
uppercase no


#ed141a 88bbff 20a619 e1470b
TEXT
${color #A3A3A3}Processus             ${goto 200} PID      ${goto 300}%CPU    ${goto 420}%MEM
${hr}$color
${color #57CF85}
${top name 1} ${goto 200}${top pid 1}     ${goto 300}${top cpu 1}     ${goto 420}${top mem 1}
${top name 2} ${goto 200}${top pid 2}     ${goto 300}${top cpu 2}     ${goto 420}${top mem 2}
${top name 3} ${goto 200}${top pid 3}     ${goto 300}${top cpu 3}     ${goto 420}${top mem 3}
${top name 4} ${goto 200}${top pid 4}     ${goto 300}${top cpu 4}     ${goto 420}${top mem 4}
${top name 5} ${goto 200}${top pid 5}     ${goto 300}${top cpu 5}     ${goto 420}${top mem 5}
${top name 6} ${goto 200}${top pid 6}     ${goto 300}${top cpu 6}     ${goto 420}${top mem 6}
${top name 7} ${goto 200}${top pid 7}     ${goto 300}${top cpu 7}     ${goto 420}${top mem 7}

conkyvnstat

background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no
use_xft yes
xftfont ethnocentric:size=8
xftalpha 0.8
update_interval 1

own_window yes
own_window_type override
own_window_transparent yes


double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1

default_color black
default_shade_color black

gap_x 1170
gap_y 200
alignment top_left
maximum_width 500
minimum_size 460 10

use_spacer yes
no_buffers yes
uppercase no


#ed141a 88bbff 20a619 e1470b
TEXT
${color #A3A3A3}Net Stats             ${goto 200}Download ${goto 365}Upload
${hr}$color
${color #57CF85}
Aujourd'hui${alignc}${goto 200}${execi 300 vnstat --oneline | cut -d\; -f4}${alignr}${goto 365}${execi 300 vnstat --oneline | cut -d\; -f5}
Hier${alignc}${goto 200}${execi 300 vnstat | grep "yesterday" | awk '{print $2 $3}'}${alignr}${goto 365}${execi 300 vnstat | grep "yesterday" | awk '{print $5 $6}'}
Semaine${alignc}${goto 200}${execi 300 vnstat -w | grep "current week" | awk '{print $3 $4}'}${alignr}${goto 365}${execi 300 vnstat -w | grep "current week" | awk '{print $6 $7}'}
Mois${alignc}${goto 200}${execi 300 vnstat --oneline | cut -d\; -f9}${alignr}${goto 365}${execi 300 vnstat --oneline | cut -d\; -f10}
Général${alignc}${goto 200}${execi 300 vnstat --oneline | cut -d\; -f13}${alignr}${goto 365}${execi 300 vnstat --oneline | cut -d\; -f14}$color

Voila ^^

Mon ancien conky avec les conkyrc qui vont avec...

conky3final.th.png

liens conkyrc: http://forum.ubuntu-fr.org/viewtopic.ph … 6972&p=109

Hors ligne