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.

#2101 Le 18/05/2010, à 08:19

chepioq

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

Bonjour,
J'ai fait une modification dans le code du .conkyrc de mon conky_soleil... (une simplification, et maintenant cela fonctionne aussi bien pour l'heure d'hiver comme pour l'heure d'été...)
Voir page 75 http://forum.ubuntu-fr.org/viewtopic.ph … 5#p3404545, post #1869


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

Hors ligne

#2102 Le 18/05/2010, à 12:13

bece

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

Merci, mais comment fait-on pour avoir lua ?
Parce que je ne sais pas comment on l'installe ?
[edit]Par les dépots j'ai installé lua50 mais je n'arrive toujours pas à afficher les anneaux (en utilisant les fichier du premier post de la page 81)

Dernière modification par bece (Le 18/05/2010, à 12:24)


"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2103 Le 18/05/2010, à 12:50

Ownies

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

Bonjour,

Ces questions ont surement déjà été posées, mais je n'ai ni le temps, ni la patience de lire 2XX pages :s

Alors voilà, je souhait afficher sur mon conky mes téléchargements de Vuze, ainsi que les messages qui sont dans mes boîtes mail, j'ai trouvé un conkyrc pour Gmail, mais pas pour orange.fr ou pour hotmail.

Et j'ai aussi un petit souçi avec Hddtemp

${color2}Disque Dur : $alignr$color+${hddtemp /dev/sda}°C

Avec ceci conky m'affiche +N/A°C alors que lorsque je fais la commande dans mon terminal il me donne bien la température (je suis obligé de la faire en SUDO cela viens peut-être de sa :s )

Voilà si vous aviez les réponses smile

PS: je cherche aussi a afficher la jaquette de l'album qui est en lécture dans rythmbox, mais je ne sais pas comment faire :s

Dernière modification par Ownies (Le 18/05/2010, à 12:51)

Hors ligne

#2104 Le 18/05/2010, à 13:11

Muy_Bien

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

Salut
alor pour bece install le paquet conky-all et tape conky -v pour voir si lua apparait. Si oui c'est bon ! Tu as juste à donner le bon chemin du script a charger dans le conkyrc ...
pour Ownies, regarde juste les 2 pages avant pour le probléme de hddtemp. Il y a une commande à lancer avant de pouvoir lancer hddtemp en user ... mais je m'en rappelle plus sad.
Pour rythmbox c'est dans la doc ici

Dernière modification par Muy_Bien (Le 18/05/2010, à 13:12)


Windows est un système d'exploitation de l'homme par l'ordinateur.
Linux, c'est le contraire ... [Brunod]

Hors ligne

#2105 Le 18/05/2010, à 13:20

bece

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

Oui, j'ai réussit à les afficher ces anneaux par contre, les anneaux fonctionnent parfaitement pour la température du processeur et la RAM, mais ils clignotent pour les disques durs ?
Voici le conky et le lua :

#Réglages système
  cpu_avg_samples 1            #Nb d'échantillons pour calculer la moyenne d'utilisation CPU
  net_avg_samples 2            #Nb d'échantillons pour calculer la moyenne d'utilisation CPU

#Mémoire
  double_buffer yes            #Éviter le clignotement
  no_buffers yes            #Soustraire les mémoires tampons de la mémoire utilisée
  text_buffer_size 1024            #Taille du cache pour le texte

#Affichage
  out_to_console no            #Affiche le texte sur la sortie standard
  update_interval 1            #Taux de rafraîchissement de la fenêtre (s)

#Fenêtre conky
  alignment top_left            #Alignement
 #---
  minimum_size 65 10            #Taille minimum (px) ; largeur / hauteur
  maximum_width 65            #Largeur maximum (px)
 #---
  gap_x 10                #Écart avec le bord gauche / droit
  gap_y 60                #Écart avec le bord haut / bas
 #---
  draw_shades no            #Afficher les ombres
  draw_outline no            #Afficher les contours de fenêtre
  draw_borders no            #Afficher des contours autour des blocs de texte
  border_width 1            #Largeur du contour
  border_inner_margin 1            #Largeur des marges
 #---
  own_window yes            #Utiliser sa propre fenêtre
  own_window_type override        #Type de fenêtre ; normal / override / desktop
  own_window_transparent yes        #Pseudo transparence

#Mise en forme
  use_xft yes                #Utiliser Xft (polices lissées etc)
  xftalpha .1                #Utiliser Xft
  override_utf8_locale yes         #Force l'UTF8
  uppercase no                #Tout le texte en majuscule
  use_spacer left            #Ajoute des espaces après certains objets (qu'avec des polices fixes)
 #---
  xftfont saxMono:size=9         #Police par défaut
 #---
  stippled_borders 5            #Taille des pointillés

#Couleurs
  default_color FFFFFF             #Couleur par défaut
  default_shade_color 333333        #Couleur des ombres
  default_outline_color black        #Couleur des contours
 #---
  color1 606060                #Gris
  color2 101010                #Near black
 #---
  short_units yes            #Unités courtes
  pad_percents 2            #Unité à 2 décimales

#Lua Load
  lua_load ~/Documents/Scripts/anneau.lua
  lua_draw_hook_pre ring_stats


TEXT
${color1}${voffset 33}Core1${voffset -15}${offset -14}CPU${voffset 15}
 ${cpu cpu1} %
${voffset 53}Core2${voffset -15}${offset -14}CPU${voffset 15}
 ${cpu cpu2} %
${voffset 53}RAM  ${voffset -15}${offset -14}MEM${voffset 15}
 ${memperc} %
${voffset 53}DDr ${voffset -15}${offset -14}HDD${voffset 15}
${hddtemp /dev/sda}°C
${voffset 53}root ${voffset -15}${offset -14}HDD${voffset 15}
 ${fs_free /}
${voffset 53}home ${voffset -15}${offset -14}HDD${voffset 15}
 ${fs_free /home}

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.lua
    lua_draw_hook_pre ring_stats

Changelog:
+ 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)
]]

settings_table = {
    {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=35,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='platform',
        arg='coretemp.0 temp 1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=35,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
    {
        name='cpu',
        arg='cpu2',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=114,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='platform',
        arg='coretemp.1 temp 1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=114,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=193,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='swapperc',
        arg='',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=193,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
    {
        name='hddtemp',
        arg='/dev/sda',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=272,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=351,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='fs_used_perc',
        arg='/home',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x000000,
        fg_alpha=0.8,
        x=36, y=430,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
}

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)
        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

Et voici l'affichage de la console quand je lance conky :

conky -c ~/Documents/Scripts/conkyrc_gauche
Conky: desktop window (a0) is root window
Conky: window type - override
Conky: drawing to created window (0x1200001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_ring_stats execution failed: /home/bece/Documents/Scripts/anneau.lua:186: attempt to perform arithmetic on local 'value' (a nil value)
Conky: llua_do_call: function conky_ring_stats execution failed: /home/bece/Documents/Scripts/anneau.lua:186: attempt to perform arithmetic on local 'value' (a nil value)
^CConky: received SIGINT or SIGTERM to terminate. bye!

[edit] J'ai regardé, à la ligne 186 c'est une division, il doit donc surement faire une division par zéro ou un truc dans le genre. A mon avis cela viendrait même de la RAM qui dans le conkyrc est traduit par ${memperc} alors que lua attend ${%s %s} il manquerait donc un argument :s
Mais pourtant à l'affichage, c'est les 3 derniers anneaux (soit la température de /dev/sda et la place de / et de /home) qui ne s'affiche pas correctement. hmm
Tiens j'ai trouvé le pourquoi du clignotement smile :
Il manquait cette ligne if value==nil then value=0 end dans la fonction setup_rings (cr, pt)

Par contre la modification apporté par wlourf (ici) ne fonctionne pas :
mini_100518025435661140.png

[edit]J'ai une autre question peut être bête : que sont les demis cercles qui apparaissent dans les anneaux du cpu et de la ram ?

Dernière modification par bece (Le 18/05/2010, à 17:13)


"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2106 Le 18/05/2010, à 17:41

Tenshy

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

pour les CPU le demi cercle au centre représente la température, et pour la RAM il représente la Swap utilisée

Hors ligne

#2107 Le 18/05/2010, à 17:50

bece

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

Oui, c'est ce que j'étais en train de lire dans le lua smile
J'essaye de le modifier pour mes besoins mais dur dur, j'essaye d'afficher un cercle pour la batterie, mais ça passe pas.

Ca y est j'ai quasiment finis mon conky, il me manque plus que le problème du hddtemp qui s'obstine à préférer la valeure A/N (même s'il affiche de temps en temps la valeure exacte).
Au niveau de l'affichage tout semble normal (sauf donc l'hddtemp) mais en console, j'ai ce message :

Conky: i2c failed to parse arguments
Conky: i2c failed to parse arguments
Conky: i2c failed to parse arguments

Le Conky :

#Réglages système
  cpu_avg_samples 1            #Nb d'échantillons pour calculer la moyenne d'utilisation CPU
  net_avg_samples 2            #Nb d'échantillons pour calculer la moyenne d'utilisation CPU

#Mémoire
  double_buffer yes            #Éviter le clignotement
  no_buffers yes            #Soustraire les mémoires tampons de la mémoire utilisée
  text_buffer_size 1024            #Taille du cache pour le texte

#Affichage
  out_to_console no            #Affiche le texte sur la sortie standard
  update_interval 1            #Taux de rafraîchissement de la fenêtre (s)

#Fenêtre conky
  alignment top_left            #Alignement
 #---
  minimum_size 65 10            #Taille minimum (px) ; largeur / hauteur
  maximum_width 120            #Largeur maximum (px)
 #---
  gap_x 10                #Écart avec le bord gauche / droit
  gap_y 10                #Écart avec le bord haut / bas
 #---
  draw_shades no            #Afficher les ombres
  draw_outline no            #Afficher les contours de fenêtre
  draw_borders no            #Afficher des contours autour des blocs de texte
  border_width 1            #Largeur du contour
  border_inner_margin 1            #Largeur des marges
 #---
  own_window yes            #Utiliser sa propre fenêtre
  own_window_type override        #Type de fenêtre ; normal / override / desktop
  own_window_transparent yes        #Pseudo transparence

#Mise en forme
  use_xft yes                #Utiliser Xft (polices lissées etc)
  xftalpha .1                #Utiliser Xft
  override_utf8_locale yes         #Force l'UTF8
  uppercase no                #Tout le texte en majuscule
  use_spacer left            #Ajoute des espaces après certains objets (qu'avec des polices fixes)
 #---
  xftfont Schoolboy Text:size=7         #Police par défaut
 #---
  stippled_borders 5            #Taille des pointillés

#Couleurs
  default_color FFFFFF             #Couleur par défaut
  default_shade_color 333333        #Couleur des ombres
  default_outline_color black        #Couleur des contours
 #---
  color1 606060                #Gris
  color2 101010                #Near black
 #---
  short_units yes            #Unités courtes
  pad_percents 2            #Unité à 2 décimales

#Lua Load
  lua_load ~/Documents/Scripts/anneau.lua
  lua_draw_hook_pre ring_stats


TEXT
${color1}${voffset 33}Core1${voffset -15}${offset -1}CPU${voffset 15}
 ${cpu cpu1} %
${voffset 49}Core2${voffset -15}${offset -3}CPU${voffset 15}
 ${cpu cpu2} %
${voffset 49}RAM  ${voffset -15}${offset -3}MEM${voffset 15}
 ${memperc} %
${voffset 49}sda ${voffset -15}${offset 7}HDD${voffset 15}
${hddtemp /dev/sda}°C
${voffset 49}root ${voffset -15}${offset 0}HDD${voffset 15}
 ${fs_free /}
${voffset 49}home ${voffset -15}${offset -1}HDD${voffset 15}
 ${fs_free /home}
${voffset 49}Bat ${voffset -15}${offset 4}BAT${voffset 15}
 ${battery_percent BAT1} %

${font Schoolboy Text:size=9}${time %A, %d %B %Y}
${time %H h %M}

Et le 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.lua
    lua_draw_hook_pre ring_stats

Changelog:
+ 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)
]]

settings_table = {
    {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=35,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='platform',
        arg='coretemp.0 temp 1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=35,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
    {
        name='cpu',
        arg='cpu2',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=114,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='platform',
        arg='coretemp.1 temp 1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=114,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=193,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='swapperc',
        arg='',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=193,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
    {
        name='hddtemp',
        arg='/dev/sda',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=272,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=351,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='fs_used_perc',
        arg='/home',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=430,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
    {
        name='platform',
        arg='/home/Images',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=430,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
    {
        name='battery_percent',
        arg='BAT1',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.2,
        fg_colour=0x606060,
        fg_alpha=0.8,
        x=36, y=510,
        radius=30,
        thickness=5,
        start_angle=270,
        end_angle=570
    },
}

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)

        if pt['name'] == "hddtemp" then 
            if str=="N/A" then
                value=lastValue
            else
                value=tonumber(str)
                lastValue=value
            end
        else
            value=tonumber(str)
        end

        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

Dernière modification par bece (Le 18/05/2010, à 18:19)


"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2108 Le 18/05/2010, à 18:46

JB-home

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

Ca y est j'ai quasiment finis mon conky, il me manque plus que le problème du hddtemp qui s'obstine à préférer la valeure A/N (même s'il affiche de temps en temps la valeure exacte).

Pour ça, wlourf nous à sorti une correction, va voir page 83 post n°2067 wink

Dernière modification par z0rg> (Le 18/05/2010, à 18:48)

Hors ligne

#2109 Le 18/05/2010, à 19:45

bece

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

Non, je l'ai mis, mais ça ne fonctionne toujours pas.


"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2110 Le 18/05/2010, à 20:01

JB-home

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

bece a écrit :

Non, je l'ai mis, mais ça ne fonctionne toujours pas.

tu l'as peut être mal "mit"

je te passe le mien :

--[[
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.lua
    lua_draw_hook_pre ring_stats

Changelog:
+ 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)
]]

settings_table = {
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x740E0E,
        fg_alpha=0.8,
        x=36, y=35,
        radius=30,
        thickness=5,
        start_angle=220,
        end_angle=570
    },
    {
        name='fs_used_perc',
        arg='/mnt/HDD-74Go',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x740E0E,
        fg_alpha=0.8,
        x=175, y=35,
        radius=30,
        thickness=5,
        start_angle=220,
        end_angle=570
    },
    {
        name='hddtemp',
        arg='/dev/sda',
        max=100,
        bg_colour=0x606060,
        bg_alpha=0.6,
        fg_colour=0x740E0E,
        fg_alpha=0.8,
        x=36, y=35,
        radius=23,
        thickness=5,
        start_angle=270,
        end_angle=450
    },
}

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()

       if lastValue==nil then lastValue = 0 end



   local function setup_rings(cr,pt)

       local str=''

       local value=0



       str=string.format('${%s %s}',pt['name'],pt['arg'])

       str=conky_parse(str)

               if pt['name'] == "hddtemp" then

                       if str=="N/A" then

                               value=lastValue

                       else

                       value=tonumber(str)

                       lastValue=value

                   end

               else

                       value=tonumber(str)

               end

       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

ringclign.png
Hddtemp est le demi-cercle

Dernière modification par z0rg> (Le 18/05/2010, à 20:03)

Hors ligne

#2111 Le 18/05/2010, à 20:59

bece

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

En faîte c'est pas l'anneau qui ne fonctionne pas, c'est juste qui affiche N/A au lieu de la température (l'anneau est correct). J'ai essayé ton script mais ça ne donne pas mieux.
A mon avis les erreurs que j'ai citées au dessus doivent y être pour quelque chose.
Cette erreur :

Conky: i2c failed to parse arguments

Sinon, je trouve que lua c'est excellent ("sa roxx sa maman" d'avoir des anneaux sur le côté cool ). Quand j'avais fait mon premier conky il y a 2 ou 3 mois je n'avais pas osé m'aventurer dans le script lua, mais j'aurais du smile

Dernière modification par bece (Le 18/05/2010, à 21:10)


"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2112 Le 18/05/2010, à 21:56

wlourf

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

salut,

Mais que te reournes conky avec ça (sans passer par le script Lua) :

${hddtemp /dev/sda}

Hors ligne

#2113 Le 18/05/2010, à 22:16

bece

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

Il me sort 36 sans erreur à la console.


"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2114 Le 18/05/2010, à 22:31

wlourf

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

remplace ta fonction conky_ring_stats par celle-ci et envoi moi ce qui s'affiche dans la console (en MP si tu veux pas encombrer le forum en attendant de trouver la solution )

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)

        if pt['name'] == "hddtemp" then 
            print (conky_parse('${updates}'),str)
            if str=="N/A" then
                value=lastValue
            else
                value=tonumber(str)
                lastValue=value
            end
        else
            value=tonumber(str)
        end

        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

Dernière modification par wlourf (Le 18/05/2010, à 22:32)

Hors ligne

#2115 Le 18/05/2010, à 22:44

bece

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

Merci de te pencher sur mon problème. On continue donc par mp.


"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2116 Le 18/05/2010, à 23:49

bece

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

Bien puisqu'il semblerait que cela ne soit pas mon lua qui soit en cause mais mon conkyrc, je le poste donc :

#Réglages système
  cpu_avg_samples 1            #Nb d'échantillons pour calculer la moyenne d'utilisation CPU
  net_avg_samples 2            #Nb d'échantillons pour calculer la moyenne d'utilisation CPU

#Mémoire
  double_buffer yes            #Éviter le clignotement
  no_buffers yes            #Soustraire les mémoires tampons de la mémoire utilisée
  text_buffer_size 1024            #Taille du cache pour le texte

#Affichage
  out_to_console no            #Affiche le texte sur la sortie standard
  update_interval 1            #Taux de rafraîchissement de la fenêtre (s)

#Fenêtre conky
  alignment top_left            #Alignement
 #---
  minimum_size 65 10            #Taille minimum (px) ; largeur / hauteur
  maximum_width 120            #Largeur maximum (px)
 #---
  gap_x 10                #Écart avec le bord gauche / droit
  gap_y 10                #Écart avec le bord haut / bas
 #---
  draw_shades no            #Afficher les ombres
  draw_outline no            #Afficher les contours de fenêtre
  draw_borders no            #Afficher des contours autour des blocs de texte
  border_width 1            #Largeur du contour
  border_inner_margin 1            #Largeur des marges
 #---
  own_window yes            #Utiliser sa propre fenêtre
  own_window_type normal        #Type de fenêtre ; normal / override / desktop
  own_window_transparent yes        #Pseudo transparence
  own_window_argb_visual yes        #Vrai transparence =)
  own_window_hints undecorated      #Aucune idée, surement non décoré^^

#Mise en forme
  use_xft yes                #Utiliser Xft (polices lissées etc)
  xftalpha .1                #Utiliser Xft
  override_utf8_locale yes         #Force l'UTF8
  uppercase no                #Tout le texte en majuscule
  use_spacer left            #Ajoute des espaces après certains objets (qu'avec des polices fixes)
 #---
  xftfont Schoolboy Text:size=7         #Police par défaut
 #---
  stippled_borders 5            #Taille des pointillés

#Couleurs
  default_color FFFFFF             #Couleur par défaut
  default_shade_color 333333        #Couleur des ombres
  default_outline_color black        #Couleur des contours
 #---
  color1 606060                #Gris
  color2 101010                #Near black
 #---
  short_units yes            #Unités courtes
  pad_percents 2            #Unité à 2 décimales

#Lua Load
  lua_load ~/Documents/Scripts/anneau.lua
  lua_draw_hook_pre ring_stats


TEXT
${color1}${voffset 33}Core1${voffset -15}${offset -1}CPU${voffset 15}
 ${cpu cpu1} %
${voffset 49}Core2${voffset -15}${offset -3}CPU${voffset 15}
 ${cpu cpu2} %
${voffset 49}RAM  ${voffset -15}${offset -3}MEM${voffset 15}
 ${memperc} %
${voffset 49}sda ${voffset -15}${offset 7}HDD${voffset 15}
${hddtemp /dev/sda}°C
${voffset 49}root ${voffset -15}${offset 0}HDD${voffset 15}
 ${fs_free /}
${voffset 49}home ${voffset -15}${offset -1}HDD${voffset 15}
 ${fs_free /home}
${voffset 49}Batterie ${voffset -15}${offset -17}BAT${voffset 15}
 ${battery_percent BAT1} %

${font Schoolboy Text:size=9}${time %A, %d %B %Y}
${time %H h %M}

"L'informatique, c'est l'art de passer 15 jours à gagner 5 millisecondes"

Hors ligne

#2117 Le 19/05/2010, à 09:31

breakolami

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

Ca peut vous intéresser

http://www.tux-planet.fr/un-theme-conky-pour-ubuntu-lucid-lynx/


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

#2118 Le 19/05/2010, à 10:41

Muy_Bien

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

Trés bon site wink
mais le conky est à l'opposé de ce que j'aime : discret et integré dans le reste ...


Windows est un système d'exploitation de l'homme par l'ordinateur.
Linux, c'est le contraire ... [Brunod]

Hors ligne

#2119 Le 19/05/2010, à 13:00

Tenshy

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

et pour ceux que ca intéressent, il existe aussi une version pour Arch Linux (toujours sur tux-planet)

Hors ligne

#2120 Le 20/05/2010, à 10:11

Muy_Bien

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

Salut !
est ce que l'un d'entre vous saurait comment réaliser le même effet qu'ici ?
Il m'a dit qu'il avait utilisé la fonction pixmap de conky mais je n'ai rien trouvé à ce propos ...


Windows est un système d'exploitation de l'homme par l'ordinateur.
Linux, c'est le contraire ... [Brunod]

Hors ligne

#2121 Le 20/05/2010, à 18:01

French Viking

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

Hop, voici mon conky grandement basé sur l'excellent conky-colors (http://gnome-look.org/content/show.php/CONKY-colors?content=92328) et auquel j'ai modifié certaines choses.

capture1x.th.jpg

Hors ligne

#2122 Le 21/05/2010, à 09:39

RegisBurin

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

Ennuyeuse mâtinée de chômeur = refonte de conky !

captureconky20100521.th.png

# — 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

# — 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 0
border_outer_margin 0
minimum_size 1670 220
#maximum_width 240
alignment tl
gap_x 1685
gap_y 5

# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

#Polices--------------------------
use_xft yes
xftfont Neuropolitical:size=12
xftalpha 0.5
override_utf8_locale yes

uppercase no

#Couleurs-------------------------
color1 8c8c8c
color2 4CB2FF
color3 896161
color4 A45353
color5 782C2C

# — Lua Load — #
    lua_load ~/.config/conky/clock_rings.lua
    lua_draw_hook_pre clock_rings

TEXT
${goto 170}${color1}Cpu I${goto 225}${cpubar cpu1 10,156} ${font Neuropolitical:size=10}${color2}${cpu cpu1}%${voffset -1}${font}${goto 430}${color1}Ram: ${membar 10,160} ${font Neuropolitical:size=10}${color2}${memperc}%${font Neuropolitical:size=16}${color1}${goto 750}Regis sur Apodio ${color2}${kernel} ${color1}depuis ${color2}${voffset -2}${font Minisystem:size=16}${uptime}${voffset -2}${font Neuropolitical:size=10}${color1}${goto 1325}System : ${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /} >0}0${else}p${endif}${if_match ${fs_used_perc /} >10}0${else}p${endif}${if_match ${fs_used_perc /} >20}0${else}p${endif}${if_match ${fs_used_perc /} >30}0${else}p${endif}${if_match ${fs_used_perc /} >40}0${else}p${endif}${if_match ${fs_used_perc /} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /} >90}${color5}0${else}${color5}p${endif}${voffset -2}${font Neuropolitical:size=10}${alignr 10}${color2}${fs_free_perc /}% libres
${goto 187}${font}${voffset -8}${color1}Cpu II${goto 245}${voffset 1}${cpubar cpu2 10,136} ${font Neuropolitical:size=10}${color2}${cpu cpu2}%${voffset -1}${font}${goto 430}${color1}Swap: ${swapbar 10,58}${goto 574}${font Neuropolitical:size=10}Update: ${voffset -2}${color2}${font Minisystem:size=12}${execi 3600 aptitude search "~U" | wc -l | tail}${voffset 5}${font Neuropolitical:size=10}${color1}${goto 1340}${offset -1}Home : ${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /home} >0}0${else}p${endif}${if_match ${fs_used_perc /home} >10}0${else}p${endif}${if_match ${fs_used_perc /home} >20}0${else}p${endif}${if_match ${fs_used_perc /home} >30}0${else}p${endif}${if_match ${fs_used_perc /home} >40}0${else}p${endif}${if_match ${fs_used_perc /home} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /home} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /home} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /home} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /home} >90}${color5}0${else}${color5}p${endif}${voffset -2}${font Neuropolitical:size=10}${alignr 10}${color2}${fs_free_perc /home}% libres
${voffset 2}${color1}${goto 1294}Documents : ${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /media/Documents} >0}0${else}p${endif}${if_match ${fs_used_perc /media/Documents} >10}0${else}p${endif}${if_match ${fs_used_perc /media/Documents} >20}0${else}p${endif}${if_match ${fs_used_perc /media/Documents} >30}0${else}p${endif}${if_match ${fs_used_perc /media/Documents} >40}0${else}p${endif}${if_match ${fs_used_perc /media/Documents} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /media/Documents} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/Documents} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/Documents} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /media/Documents} >90}${color5}0${else}${color5}p${endif}${voffset -2}${font Neuropolitical:size=10}${alignr 10}${color2}${fs_free_perc /media/Documents}% libres
${voffset 2}${color1}${goto 1329}Projets : ${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /media/projets} >0}0${else}p${endif}${if_match ${fs_used_perc /media/projets} >10}0${else}p${endif}${if_match ${fs_used_perc /media/projets} >20}0${else}p${endif}${if_match ${fs_used_perc /media/projets} >30}0${else}p${endif}${if_match ${fs_used_perc /media/projets} >40}0${else}p${endif}${if_match ${fs_used_perc /media/projets} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /media/projets} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/projets} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/projets} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /media/projets} >90}${color5}0${else}${color5}p${endif}${voffset -2}${font Neuropolitical:size=10}${alignr 10}${color2}${fs_free_perc /media/projets}% libres
${offset 220}${font Minisystem:size=100}${voffset -60}${time %k:%M:%S}
${color1}${font Minisystem:size=32}${voffset -210}${goto 755}${time %A} ${time %d} ${time %b} ${time %Y}

Edit: la clock LUA => ici

Dernière modification par RegisBurin (Le 21/05/2010, à 09:41)


Config (M-AUDIO Delta44/Wacom CTH661-Phone ZTE OpenC-FFOS2.1) | BabyBox[WIP]
Moi sur le web / Moi, IRL mais sur le web / Ma maison sur le web

Hors ligne

#2123 Le 21/05/2010, à 17:48

r0main

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

Voilà mon conky :

201005211824591440x900.th.png

Inspiré par : http://gnome-look.org/content/show.php?content=124144
Police blocs espace disque : http://www.urbanfonts.com/dingbats/FnT_BasicShapes1.htm
Fond d'écran : http://eg-art.deviantart.com/art/EgFox-Lucid-Lynx-K-HD-2010-162683010
Séries : C'est l'historique des "découvertes" de flexget (http://flexget.com/)
Nolife : http://forum.nolife-tv.com/showpost.php?p=395533&postcount=380

Et voici le conkyrc :

# Tipo de letra por defecto.
use_xft yes
xftfont Droid Sans:size=9
override_utf8_locale yes

# Configuracion de rendimiento.
update_interval 1
total_run_times 0
double_buffer yes
no_buffers yes
net_avg_samples 2
text_buffer_size 1240

# Ejecutarlo en su propia ventana en lugar de usar el escritorio.
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Borde.
draw_borders no
border_margin 1

# Color por defecto del fondo de la ventana
own_window_colour 393834

# Color por defecto.
default_color B7B2AD
#default_color EFEEED

# Dibuja marco.
draw_shades no

# Colores de trabajo.
color0 DD3A21
color1 8c8c8c
color2 4CB2FF
color3 896161
color4 A45353
color5 782C2C

# Dimensiones mnimas.
minimum_size 1440 152

# Posicion de Conky.
alignment bottom_left
gap_x 0
gap_y 0

draw_graph_borders no

# Texto
TEXT
${image ~/.conkytheme/pix/frame_1440x180.png -p 0,0}
${voffset 20}${font Droid Sans:style=Bold:size=12}${color0}${goto 150}Système${goto 290}Processus${goto 480}Disques${goto 670}Réseau${goto 860}Séries${goto 1160}Nolife${font}${color}
${voffset 6}${goto 150}${if_match ${execi 360 aptitude search "~U" | wc -l | tail} ==0}Système à jour${else}${if_match ${execi 360 aptitude search "~U" | wc -l | tail} ==1}1 mise à jour dispo${else}${execi 360 aptitude search "~U" | wc -l | tail} mises à jour dispo${endif}${endif}${goto 290}Nom:${goto 390}CPU:${goto 426}MEM:${goto 480}Système:${goto 550}${fs_free /} / ${fs_size /}${goto 670}Download: ${goto 750}${if_existing /proc/net/route eth0}${downspeedgraph eth0 10,40 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9} ${downspeed eth0}${font}${else}${if_existing /proc/net/route wlan0}${downspeedgraph wlan0 10,40 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9} ${downspeed wlan0}${font}${endif}${endif}${goto 860}${execi 3600 cat .flexget/flexget.log | grep Downloading | cut -c 70-116 | uniq | tail -1}${goto 1160}${execi 60 pynoair --nb-start-display 0 --nb-end-display 0 --output-format "%D - %d" --no-display-extra --leveltypes 100}
${goto 150}Batterie: ${goto 205}${if_existing /proc/acpi/ac_adapter/AC0/state off-line}${battery_time}${else}Sur secteur${endif}${goto 290}${top name 1}${goto 380}${top cpu 1}${goto 420}${top mem 1}${goto 480}${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /} >0}0${else}p${endif}${if_match ${fs_used_perc /} >10}0${else}p${endif}${if_match ${fs_used_perc /} >20}0${else}p${endif}${if_match ${fs_used_perc /} >30}0${else}p${endif}${if_match ${fs_used_perc /} >40}0${else}p${endif}${if_match ${fs_used_perc /} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /} >90}${color5}0${else}${color5}p${endif}${color}${font}${goto 670}Upload: ${goto 750}${if_existing /proc/net/route eth0}${upspeedgraph eth0 10,40 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9} ${upspeed eth0}${font}${else}${if_existing /proc/net/route wlan0}${upspeedgraph wlan0 10,40 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9} ${upspeed wlan0}${font}${endif}${endif}${goto 860}${execi 3600 cat .flexget/flexget.log | grep Downloading | cut -c 70-116 | uniq | tail -2 | head -1}${goto 1160}${execi 60 pynoair --nb-start-display 1 --nb-end-display 1 --output-format "%D - %d" --no-display-extra --leveltypes 100}
${goto 20}DD: ${goto 83}${execi 4 hddtemp /dev/sda | cut -c24-26}${goto 97}.0 ºC${goto 150}Uptime: ${goto 205}${uptime}${goto 290}${top name 2}${goto 380}${top cpu 2}${goto 420}${top mem 2}${goto 480}Utilisateur:${goto 550}${fs_free /home} / ${fs_size /home}${goto 670}Téléchargé: ${goto 750}${if_existing /proc/net/route eth0}${totaldown eth0}${else}${if_existing /proc/net/route wlan0}${totaldown wlan0}${endif}${endif}${goto 860}${execi 3600 cat .flexget/flexget.log | grep Downloading | cut -c 70-116 | uniq | tail -3 | head -1}${goto 1160}${execi 60 pynoair --nb-start-display 2 --nb-end-display 2 --output-format "%D - %d" --no-display-extra --leveltypes 100}
${goto 20}CPU: ${goto 75}${execi 4 sensors | grep -A 0 'temp1' | cut -c14-18 | sed -e "s/+/  /"} ºC${goto 150}RAM: ${goto 205}${memgauge 10,30}${font Droid Sans:style=Bold:size=9}${goto 244}$memperc%${font}${goto 290}${top name 3}${goto 380}${top cpu 3}${goto 420}${top mem 3}${goto 480}${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /home} >0}0${else}p${endif}${if_match ${fs_used_perc /home} >10}0${else}p${endif}${if_match ${fs_used_perc /home} >20}0${else}p${endif}${if_match ${fs_used_perc /home} >30}0${else}p${endif}${if_match ${fs_used_perc /home} >40}0${else}p${endif}${if_match ${fs_used_perc /home} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /home} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /home} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /home} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /home} >90}${color5}0${else}${color5}p${endif}${color}${font}${goto 670}Envoyé: ${goto 750}${if_existing /proc/net/route eth0}${totalup eth0}${else}${if_existing /proc/net/route wlan0}${totalup wlan0}${endif}${endif}${goto 860}${execi 3600 cat .flexget/flexget.log | grep Downloading | cut -c 70-116 | uniq | tail -4 | head -1}${goto 1160}${execi 60 pynoair --nb-start-display 3 --nb-end-display 3 --output-format "%D - %d" --no-display-extra --leveltypes 100}
${goto 20}Core 1: ${goto 75}${execi 4 sensors | grep -A 0 'Core 0' | cut -c14-18 | sed -e "s/+/  /"} ºC${goto 150}Core 1: ${goto 205}${cpugauge cpu0 10,30}${font Droid Sans:style=Bold:size=9}${goto 244}${cpu cpu0}%${font}${goto 290}${top name 4}${goto 380}${top cpu 4}${goto 420}${top mem 4}${goto 480}${if_mounted /media/DDExterne(1To)}DD 1To:${goto 550}${fs_free /media/DDExterne(1To)} / ${fs_size /media/DDExterne(1To)}${else}${if_mounted /media/DDExterne(500Go)}DD 500Go:${goto 550}${fs_free /media/DDExterne(500Go)} / ${fs_size /media/DDExterne(500Go)}${else}DD 1To:${goto 550}Déconnecté${endif}${endif}${goto 670}Ip Locale: ${goto 750}${if_existing /proc/net/route eth0}${addr eth0}${else}${if_existing /proc/net/route wlan0}${addr wlan0}${endif}${endif}${goto 860}${execi 3600 cat .flexget/flexget.log | grep Downloading | cut -c 70-116 | uniq | tail -5 | head -1}${goto 1160}${execi 60 pynoair --nb-start-display 4 --nb-end-display 4 --output-format "%D - %d" --no-display-extra --leveltypes 100}
${goto 20}Core 2: ${goto 75}${execi 4 sensors | grep -A 0 'Core 1' | cut -c14-18 | sed -e "s/+/  /"} ºC${goto 150}Core 2: ${goto 205}${cpugauge cpu1 10,30}${font Droid Sans:style=Bold:size=9}${goto 244}${cpu cpu1}%${font}${goto 290}${top name 5}${goto 380}${top cpu 5}${goto 420}${top mem 5}${goto 480}${if_mounted /media/DDExterne(1To)}${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /media/DDExterne(1To)} >0}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >10}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >20}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >30}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >40}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /media/DDExterne(1To)} >90}${color5}0${else}${color5}p${endif}${color}${font}${else}${if_mounted /media/DDExterne(500Go)}${voffset -2}${font fnt_basicshapes1: size=8}${if_match ${fs_used_perc /media/DDExterne(500Go)} >0}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >10}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >20}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >30}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >40}0${else}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >50}${color3}0${else}${color3}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >60}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >70}${color4}0${else}${color4}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >80}${color5}0${else}${color5}p${endif}${if_match ${fs_used_perc /media/DDExterne(500Go)} >90}${color5}0${else}${color5}p${endif}${color}${font}${else}DD 500Go:${goto 550}Déconnecté${endif}${endif}${goto 670}Ip Publique: ${goto 750}${execi 10456 wget -qO- whatismyip.org}${goto 860}${execi 3600 cat .flexget/flexget.log | grep Downloading | cut -c 70-116 | uniq | tail -6 | head -1}${goto 1160}${execi 60 pynoair --nb-start-display 5 --nb-end-display 5 --output-format "%D - %d" --no-display-extra --leveltypes 100}

Hors ligne

#2124 Le 24/05/2010, à 13:49

Podz.

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

Salut,
Comment faire apparaitre la vitesse du ventilateur ?
Sachant que dans sys/bus/i2c/devices j'ai 3 dossiers : i2c-0, i2c-1, i2c-2

Hors ligne

#2125 Le 24/05/2010, à 20:01

wlourf

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

Podz. a écrit :

Salut,
Comment faire apparaitre la vitesse du ventilateur ?
Sachant que dans sys/bus/i2c/devices j'ai 3 dossiers : i2c-0, i2c-1, i2c-2

Salut,

As-tu essayé avec sensors ? Par exemple :

${exec sensors | grep 'CPU Fan' | cut -c13-16}

Hors ligne