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.

#1401 Le 28/04/2012, à 19:10

chepioq

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

dragao13 a écrit :

Salut à tous ...

Je découvre conky et je n'y connais pas grand chose mais j'apprécie beaucoup son apport ...

J'utilise celui ci :

http://img15.hostingpics.net/pics/634715Capturedu20120427123946.png

et j'aimerai un coup de main pour le modifier ...

Savez vous comment je peux ajouter un cpu2 (j'ai un dualcore) avec le cercle graphique à droite du cpu1 qui l'accompagne ainsi qu'un indicateur de /home (mon espace disk indiqué est pour /) avec le cercle graphique à droite de / .
Et tout en bas ajouter la connexion filaire (eth0).

Merci infiniment

Bonjour.
Pour ton deuxiéme core je mettrai dans ton conkyrc
${color FFFFFF}${goto 100}${voffset 35}${cpu cpu1}%
juste en dessous de la ligne de ton cpu0

Et pour ton home
${color FFFFFF}${goto 175}${voffset 23}${fs_used_perc /home}%
en dessous de la ligne ${color FFFFFF}${goto 100}${voffset 23}${fs_used_perc /}%

Tu devras peut-être ajuster les valeurs des goto, et peut-être aussi des voffset


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

Hors ligne

#1402 Le 28/04/2012, à 21:39

cherrak

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

Bonsoir a tous,

Bon ben voila, je me lance :
Bureau vide
Pour les fichiers ils sont disponibles sous forme d'un .zip mp moi si vous etes interesses.

A+

P.S.: desole pour les accents, je suis sous un clavier qwerty

#1403 Le 29/04/2012, à 01:05

dragao13

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

chepioq a écrit :
dragao13 a écrit :

Salut à tous ...

Je découvre conky et je n'y connais pas grand chose mais j'apprécie beaucoup son apport ...

J'utilise celui ci :

http://img15.hostingpics.net/pics/634715Capturedu20120427123946.png

et j'aimerai un coup de main pour le modifier ...

Savez vous comment je peux ajouter un cpu2 (j'ai un dualcore) avec le cercle graphique à droite du cpu1 qui l'accompagne ainsi qu'un indicateur de /home (mon espace disk indiqué est pour /) avec le cercle graphique à droite de / .
Et tout en bas ajouter la connexion filaire (eth0).

Merci infiniment

Bonjour.
Pour ton deuxiéme core je mettrai dans ton conkyrc
${color FFFFFF}${goto 100}${voffset 35}${cpu cpu1}%
juste en dessous de la ligne de ton cpu0

Et pour ton home
${color FFFFFF}${goto 175}${voffset 23}${fs_used_perc /home}%
en dessous de la ligne ${color FFFFFF}${goto 100}${voffset 23}${fs_used_perc /}%

Tu devras peut-être ajuster les valeurs des goto, et peut-être aussi des voffset

Merci grâce à ta réponse, j'ai compris le principe et du coup j'arrive à le changer à ma guise ...

mini_178847Capturedu20120503120914.png

Merci encore !

Dernière modification par dragao13 (Le 03/05/2012, à 11:20)


Macbook AIr 13 - OS X Yosemite
Toshiba A 200 - Ubuntu 14.04 LTS

Hors ligne

#1404 Le 03/05/2012, à 07:33

djipey

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

Bonjour.

J'ai un petit problème depuis quelques temps depuis que j'ai refait cette ligne dans mon conky:

${execpi 15 grep \/media\/ /etc/mtab | cut -d ' ' -f 2 | while read line ; do echo '$color' `basename $line `':  ${color2} ${fs_bar 8,75 '$line'}      ${fs_free '$line'}  / ${fs_size '$line'} (${fs_free_perc '$line'})%' ; done }

Elle est censée m'afficher tous les périphériques que je connecte à mon pc. Ça marche d'ailleurs très bien, sauf que cela crée des processus sh zombies, un toutes les 15 secondes. À la fin de la journée j'en ai parfois plusieurs centaines. Comme si je ne fermais pas une boucle ou ou une condition, je ne sais pas.

Est-ce que quelqu'un pourrait m'expliquer ce que je fais mal ?

Bien à vous.

Hors ligne

#1405 Le 05/05/2012, à 07:01

shamen456

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

Bonjour a tous...

un petit code lua bien interessant que j'ai trouvé sur crunchbang (#!) et qui permet d'ecrire un texte (ou toute autre info conky) sur une courbe [Code original de MrPeachy]

--[[
text on bezier curve by mr peachy 12/2011
credit to Daniel Pupius http://13thparallel.com/archive/bezier-curves/
for the bezier equations
also eXpander for the letter split function
]]
require 'cairo'

function conky_beztext()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################

--Title


t={
startx=50,--set the start point of the curve
starty=600,--^^
endx=580,--set the end point of the curve
endy=332,--^^
angle1=03,--this is the angle around the start point that controls the curve
length1=250,--see below for explaination of how these settings affect the curve
angle2=303,
length2=220,
color={0,0,0,.7},--this is the color of the text, red, green, blue, alpha
text=" "..conky_parse("${time %A %d %B %Y}").." ",
--font="URW Chancery L",
font="ChopinScript",
fsize=60,--font size
}--end of setup table


btext(t)--this calls the text drawing function
--to see how the settings above affect the curve set display to 1 and call the curve drawing function below
--if you want the curve set display to 0 and call function
--else comment out the next 3 lines
--local display=1--1=turn the setup display on,0=turn display off
--local color={1,1,0,1}--color of curve, r,g,b,a
--curvedraw(t,display)



t2={
startx=252,--set the start point of the curve
starty=600,--^^
endx=290,--set the end point of the curve
endy=370,--^^
angle1=45,--this is the angle around the start point that controls the curve
length1=150,--see below for explaination of how these settings affect the curve
angle2=125,
length2=100,
color={0,0,0,.7},--this is the color of the text, red, green, blue, alpha
text=""..conky_parse("${time %T}").." ",
--font="URW Chancery L",
font="ChopinScript",
fsize=40,--font size
}--end of setup table


btext(t2)--this calls the text drawing function
--to see how the settings above affect the curve set display to 1 and call the curve drawing function below
--if you want the curve set display to 0 and call function
--else comment out the next 3 lines
--local display=1--1=turn the setup display on,0=turn display off
--local color={1,1,0,1}--color of curve, r,g,b,a
--curvedraw(t2,display)


--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function

function btext(t)
--set variables
local startx=t.startx
local starty=t.starty
local endx=t.endx
local endy=t.endy
local angle1=t.angle1
local length1=t.length1
local angle2=t.angle2
local length2=t.length2
--set local functions
local function split_text (text_to_split, splitted_text)      
    for letter in text_to_split:gmatch(".") do
    table.insert(splitted_text, letter)
    end
return splitted_text
end
local function B1(t) return t*t*t end
local function B2(t) return 3*t*t*(1-t) end
local function B3(t) return 3*t*(1-t)*(1-t) end
local function B4(t) return (1-t)*(1-t)*(1-t) end
local function getBezier(percent,C1x,C1y,C2x,C2y,C3x,C3y,C4x,C4y)
local posx1 = C1x*B1(percent) + C2x*B2(percent) + C3x*B3(percent) + C4x*B4(percent);
local posy1 = C1y*B1(percent) + C2y*B2(percent) + C3y*B3(percent) + C4y*B4(percent);
local posx2 = C1x*B1(percent+0.01) + C2x*B2(percent+0.01) + C3x*B3(percent+0.01) + C4x*B4(percent+0.01);
local posy2 = C1y*B1(percent+0.01) + C2y*B2(percent+0.01) + C3y*B3(percent+0.01) + C4y*B4(percent+0.01);
local posx3 = C1x*B1(percent-0.01) + C2x*B2(percent-0.01) + C3x*B3(percent-0.01) + C4x*B4(percent-0.01);
local posy3 = C1y*B1(percent-0.01) + C2y*B2(percent-0.01) + C3y*B3(percent-0.01) + C4y*B4(percent-0.01);
return posx1,posy1,posx2,posy2,posx3,posy3
end
local function getangle(x1,y1,x2,y2)
local radians = math.atan((x2-x1)/(y2-y1));
local degrees = radians *  180 / math.pi;
return radians,degrees
end
--calculations below---------------------------------------
local rad=length1
local arc=((2*math.pi)/360)*(angle1)
local c1x=0+rad*(math.sin(arc))
local c1y=0-rad*(math.cos(arc))
local center1x=c1x+startx
local center1y=c1y+starty
local rad=length2
local arc=((2*math.pi)/360)*(angle2)
local c2x=0+rad*(math.sin(arc))
local c2y=0-rad*(math.cos(arc))
local center2x=c2x+endx
local center2y=c2y+endy
--end curve calculations----------------------------------
texttab={}
split_text (t.text,texttab)
for i=1,#texttab do
n=1-((i-1)/(#t.text-1))
--print (n)
x1,y1,x2,y2,x3,y3=getBezier(n,startx,starty,center1x,center1y,center2x,center2y,endx,endy)
--print ("x1="..x1,"y1="..y1,"x2="..x2,"y2="..y2)
if y2<y3 then
add=-90
else
add=90
end
cairo_select_font_face (cr, t.font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, t.fsize)
cairo_set_source_rgba (cr,t.color[1],t.color[2],t.color[3],t.color[4])
rad,deg=getangle(x2,y2,x3,y3)
cairo_move_to (cr,x1,y1)
local rot=(deg+add)*(math.pi/180)
cairo_rotate (cr,-rot)
cairo_show_text (cr,texttab[i])
cairo_stroke (cr)
cairo_rotate (cr,rot)
end
end--function btext

function curvedraw(t,display,color)
--set variables
local startx=t.startx
local starty=t.starty
local endx=t.endx
local endy=t.endy
local angle1=t.angle1
local length1=t.length1
local angle2=t.angle2
local length2=t.length2
cairo_set_source_rgba (cr,t.color[1],t.color[2],t.color[3],t.color[4])
--calculations below---------------------------------------
local rad=length1
local arc=((2*math.pi)/360)*(angle1)
local c1x=0+rad*(math.sin(arc))
local c1y=0-rad*(math.cos(arc))
local center1x=c1x+startx
local center1y=c1y+starty
local rad=length2
local arc=((2*math.pi)/360)*(angle2)
local c2x=0+rad*(math.sin(arc))
local c2y=0-rad*(math.cos(arc))
local center2x=c2x+endx
local center2y=c2y+endy
--end calculations----------------------------------
if display==1 then
cairo_set_line_width (cr,1)----------------------
cairo_set_source_rgba (cr,1,0,1,1)---------------
cairo_move_to (cr,startx,starty)-----------------
cairo_line_to (cr,center1x,center1y)-------------
cairo_stroke (cr)--------------------------------
cairo_set_source_rgba (cr,1,0,0,1)---------------
cairo_arc (cr,startx,starty,3,0,2*math.pi)-------
cairo_fill (cr)----------------------------------
cairo_set_source_rgba (cr,1,0,0,1)---------------
cairo_arc (cr,startx,starty,length1,0,2*math.pi)
cairo_stroke (cr)--------------------------------
cairo_set_source_rgba (cr,0,1,0,1)---------------
cairo_arc (cr,center1x,center1y,3,0,2*math.pi)---
cairo_fill (cr)----------------------------------
cairo_set_source_rgba (cr,1,0,1,1)---------------
cairo_move_to (cr,endx,endy)---------------------
cairo_line_to (cr,center2x,center2y)-------------
cairo_stroke (cr)--------------------------------
cairo_set_source_rgba (cr,0,1,1,1)---------------
cairo_arc (cr,endx,endy,3,0,2*math.pi)-----------
cairo_fill (cr)----------------------------------
cairo_arc (cr,endx,endy,length2,0,2*math.pi)-----
cairo_stroke (cr)--------------------------------
cairo_set_source_rgba (cr,1,1,0,1)---------------
cairo_arc (cr,center2x,center2y,3,0,2*math.pi)---
cairo_fill (cr)----------------------------------
end
--you can set text to 1 to see the actual cairo code for the curve
local text=0
if text==1 then
local function round(num, idp)
  return tonumber(string.format("%." .. (idp or 0) .. "f", num))
end
local c1x=round(center1x,2)
local c1y=round(center1y,2)
local c2x=round(center2x,2)
local c2y=round(center2y,2)
cairo_set_source_rgba (cr,1,1,0,1)
cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 10);
cairo_move_to (cr,startx+20,starty)
cairo_show_text (cr, "cairo_move_to (cr, " .. startx .. ", " .. starty .. ")")
cairo_move_to (cr,startx+20,starty+12)
cairo_show_text (cr, "cairo_curve_to (cr, " .. c1x .. ", " .. c1y .. ", " .. c2x .. ", " .. c2y .. ", " .. endx .. ", " .. endy .. ")")
cairo_stroke (cr)
end
--###############################################
--setup curve line width and color/alpha--------------------------
cairo_set_line_width (cr,1)
cairo_move_to (cr,startx,starty)
cairo_curve_to (cr,center1x,center1y,center2x,center2y,endx,endy)
cairo_stroke (cr)
-------------------------------------------------------------------
end--function curve

et voila ce que ça donne...Curved Text

...Bon conky a tous

Hors ligne

#1406 Le 05/05/2012, à 07:08

shamen456

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

...et encore une fournée...

vous trouverez à cette adresse (ma page deviantart) une nouvelle version des conkyarc (en version 'Orion' pour s'accorder au thème GTK du même nom...

ArcOrion

Bon conky a tous....

Hors ligne

#1407 Le 08/05/2012, à 11:04

LRDP

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

Bonjour,
Excusez-moi, je ne suis probablement pas sur le bon post, mais j'ai besoin d'un petit coup de pouce. J'ai un petit Conky qui ne m'affiche pas la température du CPU. J'ai essayé d'installer Lm-sensors, mais la version ne convient pas au Kernel (2.6.32-41) (Lucid). D'après le site de Lm-sensors, il convient d'installer i2c-2.10.5, qui nécessite le monteur d'archive mais je bute sur l'install qui, sur un terminal ou j'indique "make instal"l dans le répertoire de l'archive montée, m'indique qu'il n'y a pas de règle pour fabriquer la cible "install" et donc arrêt de l'installation. Pouvez-vous me souffler la soluce?
Merci!
J'oubliais de préciser la config qui peut être incompatible avec Lm-sensors: CPU AMD FX 6100 6coeurs, CM MSI 990FX, Watercooling Antec Kühler 920

Dernière modification par LRDP (Le 08/05/2012, à 12:06)


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#1408 Le 09/05/2012, à 10:12

carpediem

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

@LRDP

installe hddtemp et fait un essai


"Carpe diem quam minimum credula postero"
(Cueille le jour présent, en te fiant le moins possible au lendemain.)
HORACE

Hors ligne

#1409 Le 09/05/2012, à 10:34

ljere

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

@djipey
quand tu lance cette commande
${execpi 15 grep \/media\/ /etc/mtab | cut -d ' ' -f 2 | while read line ; do echo '$color' `basename $line `':  ${color2}
conky lance un grep toute les 15 sec comme tu le demandes je crois que execp lui crée et détruit à chaque intervalle
@carpediem
il me semble que hhtemp ne fonctionne que pour les disques dur

Dernière modification par ljere (Le 09/05/2012, à 10:35)


ancien PC Toshiba satellite_c670d-11 / Linux Mint 21 Vanessa
Nouveau PC ASUS TUF GAMING A17 GPU RTX 4070 CPU AMD Ryzen 9 7940HS w/ Radeon 780M Graphics / Linux Mint 21.2 Victoria / Kernel: 6.4.8-1-liquorix / Desktop: Cinnamon

Hors ligne

#1410 Le 09/05/2012, à 16:18

JemsF

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

Bonjour à tous !

Je suis "tout content"; c'est mon 1er post de linuxien.
je me suis mis à l'informatique à cause du boulot (donc hélas sous windows) et maintenant que c'est un outil omniprésent, je fais tout pour passer à linux. J'ai enfin un poste personnel principal sous 12.04.
Ça c'est pour la présentation.

Comme je m'y suis mis, je suis tombé sur l'outil de personnalisation conky...et j'adore.
Félicitations, à tous les modèles de créa qui figurent sur le forum !
Je suis parti d'un script tout fait le conky_grey que j'ai remanié à ma convenance.
Pour la partie conky, pas de problème bien que je n'ai jamais fait de ligne de code.
Par contre j'ai passé 4 jours non-stop sur la partie cairo et là je bloque.
En fait je comprends pas la structure de ce type de fichier et malgré les tutaux et les multiples exemples, je n'arrive pas à mes fins.
Voilà ce que ça donne:

Desktop

La partie gauge CPU etc, j'obtiens ce que je voulais (faut juste que je les recale).
Par contre, la montre avec la date je bloque sévère.
Je voudrais 3 petits disques (heure, minutes, secondes) en mode pie-chart (je n'arrive pas à faire passer le fill par le centre) et un grand ring sans animation qui entoure la date.
Je souhaite que le background (bg) soit légèrement plus épais que le foreground (fg) mais j'ai pas non plus réussi à lui implémenté un paramètre de radius spécifique.

Mon code conky:

background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 10
gap_y 80
minimum_size 300 500
maximum_width 500
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
alignment tr

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
uppercase no

default_color FFFFFF
color1 DDDDDD
color2 AAAAAA
color3 888888
color4 BF4C25
color5 EFD129

lua_load ~/.conky/conky.lua
lua_draw_hook_post main

#${voffset 35}
#${goto 95}${color3}${font ubuntu:size=32}${time %e}${color1}${voffset 0}${offset -60}${font ubuntu:size=10}${time %A}
#${goto 85}${color2}${voffset -2}${font ubuntu:size=9}${time %b}${voffset -2} ${color3}${font ubuntu:size=12}${time %Y}${font}
#
#${voffset 70}

TEXT
${voffset 46}
${goto 18}${color2}${font ubuntu:size=16}${time %H}${goto 198}${time %M}
${goto 92}${color3}${font ubuntu:size=14}${time %A}
${goto 92}${color1}${font ubuntu:size=20}${time %e}${color3}${font ubuntu:size=10}${time %b}
${voffset 70}${goto 107}${color3}${font ubuntu:size=14}${time %S}

${voffset 102}
${goto 150}${font Ubuntu:size=16,weight:bold}${color3}CPU 
${goto 150}${voffset -10}${font Ubuntu:size=9,weight:normal}${color4}${cpu 0} ${color3}% Used

${voffset 70}
${goto 150}${font Ubuntu:size=16,weight:bold}${color3}RAM 
${goto 150}${voffset -10}${font Ubuntu:size=9,weight:normal}${color4}${mem}${color3} Used

${voffset 68}
${goto 150}${font Ubuntu:size=16,weight:bold}${color3}HDD
${goto 150}${voffset -10}${font Ubuntu:size=9,weight:normal}${color4}${fs_free}  ${color3}Free

${voffset 60}
${goto 150}${font Ubuntu:size=16,weight:bold}${color3}NET
${goto 161}${voffset 16}${font Ubuntu:size=9,weight:normal}${color1}${if_up wlan0}Wifi 
${goto 120}${voffset 6}${font Ubuntu:size=9,weight:normal}$color3 Ip:${color2}${alignr}${addr wlan0} ${endif}
${goto 120}${font Ubuntu:size=9,weight:normal}$color3 Down:${color4}${alignr}${downspeed wlan0}$color3/s
${goto 120}${font Ubuntu:size=9,weight:normal}$color3 Up:${color4}${alignr}${upspeed wlan0}$color3/s
${goto 150}${voffset 16}${font Ubuntu:size=9,weight:normal}${color1}${if_up eth0}Ethernet
${goto 120}${voffset 6}${font Ubuntu:size=9,weight:normal}$color3 Ip:${color2}${alignr}${addr eth0} ${endif}
${goto 120}${font Ubuntu:size=9,weight:normal}$color3 Down:${color4}${alignr}${downspeed eth0}$color3/s
${goto 120}${font Ubuntu:size=9,weight:normal}$color3 Up:${color4}${alignr}${upspeed eth0}$color3/s

Mon code Lua:

--==============================================================================
--                                 conky_grey.lua
--
--  author  : SLK
--  version : v2011062101
--  license : Distributed under the terms of GNU GPL version 2 or later
--
--==============================================================================

require 'cairo'

--------------------------------------------------------------------------------
--                                                                    clock DATA
-- HOURS
clock_h = {
    {
    name='time',                   arg='%H',                    max_value=12,
    x=30,                          y=72,
    graph_radius=22,
    graph_thickness=6,
    graph_unit_angle=30,           graph_unit_thickness=6,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.2,
    graph_fg_colour=0xBF4C25,      graph_fg_alpha=0.6,
    txt_radius=0,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.0,
    graduation_radius=0,
    graduation_thickness=10,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.2,
    },
}
-- MINUTES
clock_m = {
    {
    name='time',                   arg='%M',                    max_value=60,
    x=210,                         y=72,
    graph_radius=22,
    graph_thickness=6,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.2,
    graph_fg_colour=0xBF4C25,      graph_fg_alpha=0.6,
    txt_radius=0,
    txt_weight=0,                  txt_size=0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.0,
    graduation_radius=0,
    graduation_thickness=10,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.2,
    },
}
-- SECONDS
clock_s = {
    {
    name='time',                   arg='%S',                    max_value=60,
    x=120,                         y=120,
    graph_radius=64,
    graph_thickness=12,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.2,
    graph_fg_colour=0xBF4C25,      graph_fg_alpha=0.5,
    txt_radius=0,
    txt_weight=0,                  txt_size=0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.0,
    graduation_radius=0,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=120,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}

--------------------------------------------------------------------------------
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu1',                  max_value=100,
    x=144,                          y=360,
    graph_radius=45,
    graph_thickness=3,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xEF5A29,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.5,
    txt_radius=58,
    txt_weight=1,                  txt_size=0.0,
    txt_fg_colour=0xEF5A29,        txt_fg_alpha=0.5,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu2',                  max_value=100,
    x=144,                          y=360,
    graph_radius=39,
    graph_thickness=3,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xEF5A29,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.5,
    txt_radius=0,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xEF5A29,        txt_fg_alpha=0.3,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu3',                  max_value=100,
    x=144,                          y=360,
    graph_radius=33,
    graph_thickness=3,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xEF5A29,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.5,
    txt_radius=0,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xEF5A29,        txt_fg_alpha=0.3,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu4',                  max_value=100,
    x=144,                          y=360,
    graph_radius=27,
    graph_thickness=3,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xEF5A29,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.5,
    txt_radius=10,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xEF5A29,        txt_fg_alpha=0.3,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='memperc',                arg='mem',                      max_value=100,
    x=144,                          y=500,
    graph_radius=36,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,   
    graph_fg_colour=0xEF5A29,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.5,
    txt_radius=54,
    txt_weight=1,                  txt_size=14.0,
    txt_fg_colour=0xEF5A29,        txt_fg_alpha=0.5,
    graduation_radius=25,
    graduation_thickness=0,        graduation_mark_thickness=4,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='fs_used_perc',           arg='/root/',                max_value=100,
    x=144,                          y=636,
    graph_radius=36,
    graph_thickness=10,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xEF5A29,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.5,
    txt_radius=54,
    txt_weight=1,                  txt_size=14.0,
    txt_fg_colour=0xEF5A29,        txt_fg_alpha=0.5,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
}

-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha'] 

    -- background ring
    cairo_arc(display, x, y, graph_radius , 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360

    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = value % (max_value + 1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc

    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)

    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end
    
    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
    for i in pairs(clock_m) do
        load_clock_rings(display, clock_m[i])
    end
    for i in pairs(clock_s) do
        load_clock_rings(display, clock_s[i])
    end
end

-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end
    
    for i in pairs(gauge) do
        load_gauge_rings(display, gauge[i])
    end
end

-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    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 display = cairo_create(cs)
    
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
    
    if update_num > 5 then
        go_clock_rings(display)
        go_gauge_rings(display)
    end
    
    cairo_surface_destroy(cs)
    cairo_destroy(display)
end

Voilà, j'ai pas trop de demander de l'aide mais si quelqu'un de charitable à un instant pour jetter un oeil, ce serait cool.
A+ Jems


Vive le libre

Hors ligne

#1411 Le 09/05/2012, à 19:15

LRDP

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

@carpediem
Merci pour la suggestion, mais HDDTemp semble ne gérer que la température des disques durs, alors que c'est celle du CPU qui m'importe. Les disques durs sont entre 27 et 35°, d'après HDDTemp.
Merci en tout cas


Retour à Ubuntu Maté 20.04.6.
Config: maxi-tour avec 8 HD internes dont 2 SSD, 45 To de capacité
CM MSI B450, Ryzen5-1600, 32 Go de RAM, Nvidia Gforce Gtx 550Ti

Hors ligne

#1412 Le 14/05/2012, à 08:48

Kolibry

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

EDIT : Problème résolu, je ne lançais pas le conky comme il faut smile Je mettais le chemin du dossier et non du conkyrc...

Merci smile

Dernière modification par Kolibry (Le 14/05/2012, à 09:27)


Samsung N150 Plus - 10,1" -  Intel Atom N450 1,6 Ghz - 2 Go RAM - Disque dur SSD 32 Go - Carte Crystal HD Broadcom 900715 -
Manjaro Linux
Xfce, environnement de bureau léger

Hors ligne

#1413 Le 14/05/2012, à 09:15

Didier-T

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

Kolibry a écrit :

Salut tout le monde,

Jé debute sur conky et ait un mal fou à faire marcher ceux qui ne sont pas intégrés d'emblée sur ma distribution... A chaque fois, peu importe le conky (pidgin, transmission, météo...), ça me renvoie :

conky -c /home/kalika/.conky/conkypidgin
Conky: invalid configuration file '/home/kalika/.conky/conkypidgin'

Conky: desktop window (1200003) is subwindow of root window (aa)
Conky: window type - desktop
Conky: drawing to created window (0x2400001)
Conky: drawing to single buffer

Pourtant; dans le conkyrc, double buffer est bien sur YES :

# conky configuration
# edited by kaivalagi

# set to yes if you want Conky to be forked in the background
background no

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Terminus:size=9

# Text alpha when using Xft
xftalpha 0.8

# Update interval in seconds
update_interval 1.0

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 300 5
maximum_width 300

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
draw_graph_borders yes

# Stippled borders?
stippled_borders 0

# border margins
border_margin 0

# border width
border_width 0

# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color white

# own window options
own_window        yes
own_window_transparent    yes
own_window_type        override
own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager

# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
#alignment bottom_left
alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 0

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer yes

# colours
color1 white
# light blue
color2 6892C6
# orange
color3 E77320
# green

Une âme charitable pour m'aider?


Bonjour,
Déjà tu peut te rassurer ton conky se lance bien, il est juste caché sous l'image de ton fond d'ecran.

tu peut essayer de modifier dans le conky, la ligne suivante :
own_window_type        override
en
own_window_type        normal

own_window_type        desktop

Hors ligne

#1414 Le 14/05/2012, à 22:16

sam7

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

merci pour cette astuce smile (ça m'arrive aussi d'avoir de temps à autre ce problème)


sam7 @ sweetux.org = "Faire connaître & promouvoir la culture libre"
& @ gafam.fr = "Faire connaître & promouvoir les alternatives aux GAFAMs"

Hors ligne

#1415 Le 17/05/2012, à 08:41

superBOB

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

Salut

Voici une partie de mon conky

$nodename - $sysname $kernel on $machine

Depuis la MAJ à 12.04, ça donne ce résultat:

(null) (null) "(null)"

Merci pour votre aide.

Hors ligne

#1416 Le 17/05/2012, à 09:06

Didier-T

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

superBOB a écrit :

Salut

Voici une partie de mon conky

$nodename - $sysname $kernel on $machine

Depuis la MAJ à 12.04, ça donne ce résultat:

(null) (null) "(null)"

Merci pour votre aide.

peut être en refaisant l'installation de conky-all
je te propose de faire ceci
en terminal

sudo apt-get remove --purge conky*
sudo apt-get install conky-all

ton installation conky sera refaite au propre, sa devrait régler les bugs (dans le pire des cas sa ne changera rien)

P.S. : n'oublie pas de redémarrer ta machine, pour appliquer les changements

Hors ligne

#1417 Le 17/05/2012, à 12:35

cherrak

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

Didier-T a écrit :

peut être en refaisant l'installation de conky-all
je te propose de faire ceci
en terminal

sudo apt-get remove --purge conky*
sudo apt-get install conky-all

Je pensais que le purge supprimait aussi les fichiers de configuration (d'apres la doc) donc ca devrait aussi supprimer son conkyrc, il vaut mieux faire une sauvegarde au cas ou.

#1418 Le 17/05/2012, à 12:46

Didier-T

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

cherrak a écrit :
Didier-T a écrit :

peut être en refaisant l'installation de conky-all
je te propose de faire ceci
en terminal

sudo apt-get remove --purge conky*
sudo apt-get install conky-all

Je pensais que le purge supprimait aussi les fichiers de configuration (d'apres la doc) donc ca devrait aussi supprimer son conkyrc, il vaut mieux faire une sauvegarde au cas ou.

Sa ne devrais pas toucher aux fichiers créé par l'utilisateur, juste les fichier de configuration.
Mais tu as raison ont ne sait jamais

Hors ligne

#1419 Le 17/05/2012, à 21:44

superBOB

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

Salut
Ca n'a pas supprimé les fichiers de config mais ça n'a pas non plus résolu le problème sad

Je poste mon conky complet.

background        no
update_interval        1.0
double_buffer        yes

use_xft            yes
override_utf8_locale
xftfont            Sans:size=8
xftalpha        0.8

own_window        yes
own_window_transparent    yes
#own_window_type        override
own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager
#on_bottom        yes

minimum_size        280 5
draw_shades        no
draw_outline        no
draw_borders        no
draw_graph_borders    yes
stippled_borders    0
border_inner_margin        3
border_width        0

default_color        white
default_shade_color    black
default_outline_color    black

alignment top_left
gap_x            6
gap_y            48

no_buffers        yes

######

TEXT

$nodename - $sysname $kernel on $machine

${color #e49c16}Uptime:$color $uptime ${color #FFFFFF}
${color #e49c16}CPU Utilisé :${color #FFFFFF} $cpu% ${color #ffc11f}${cpubar}
${color white}${cpugraph ffc11f 8b4b0b}
${color #e49c16}Mémoire RAM :
${color #FFFFFF} $mem/$memmax - $memperc% ${color #ffc11f}${membar}
${color #e49c16}Utilisation du Swap :
${color #FFFFFF} $swap/$swapmax - $swapperc% ${color #ffc11f}${swapbar}
${color #e49c16}Processus : $color $processes   ${color #e49c16}En cours : $color $running_processes

$color$stippled_hr

${color #e49c16}Espace Disque Libre :
     ${color #FFFFFF}Root (${fs_size /}) :${color #FFFFFF}${alignc}${fs_free_perc /}${alignc}% ${color #ffc11f}${fs_bar /}
     ${color #FFFFFF}/home (${fs_size /home}) :${color #FFFFFF}${alignc}${fs_free_perc /home}${alignc}% ${color #ffc11f}${fs_bar /home}
#     ${color #FFFFFF}DD2 (${fs_size /media/Disque2}) :${color #FFFFFF}${alignc}${fs_free_perc /media/Disque2}${alignc}% ${color #ffc11f}${fs_bar /media/Disque2}$color
#    ${color #FFFFFF}DD Ext ${if_mounted /media/DISQUE DUR EXTERNE}(${fs_size /media/DISQUE DUR EXTERNE}) :${color #FFFFFF}${alignc}${fs_free_perc /media/DISQUE DUR EXTERNE}${alignc}% ${color #ffc11f}${fs_bar /media/DISQUE DUR EXTERNE}$color$else : Not connected ${endif}
#     ${color #FFFFFF}DD Ext ${if_mounted /media/disk-1}(${fs_size /media/disk-1}) :${color #FFFFFF}${alignc}${fs_free_perc /media/disk-1}${alignc}% ${color #ffc11f}${fs_bar /media/disk-1}$color$else : Not connected ${endif}

$stippled_hr

Et voici le résultat

capturedu20120517224132.png

Uploaded with ImageShack.us

Hors ligne

#1420 Le 17/05/2012, à 23:01

CerdLXDE

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

Beaucoup de talent par ici, je passe pour un abrutis...

@superBOB

Au moins t'as un minimum de résultat, car de mon côté en copiant le conky de A à Z et en suivant les instructions de la doc j’obtiens cette merveille:

1151957547.png


Ben que dire?...

Hors ligne

#1421 Le 18/05/2012, à 05:20

Didier-T

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

CerdLXDE a écrit :

Beaucoup de talent par ici, je passe pour un abrutis...

@superBOB

Au moins t'as un minimum de résultat, car de mon côté en copiant le conky de A à Z et en suivant les instructions de la doc j’obtiens cette merveille:

http://data.imagup.com/10/1151957547.png

A mon avis tu lance ton conky de la manière suivante
conky

conky nom du fichier

il faut
conky -c nom du fichier

Hors ligne

#1422 Le 18/05/2012, à 05:28

Didier-T

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

superBOB a écrit :

Salut
Ca n'a pas supprimé les fichiers de config mais ça n'a pas non plus résolu le problème sad

Je poste mon conky complet.

background        no
update_interval        1.0
double_buffer        yes

use_xft            yes
override_utf8_locale
xftfont            Sans:size=8
xftalpha        0.8

own_window        yes
own_window_transparent    yes
#own_window_type        override
own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager
#on_bottom        yes

minimum_size        280 5
draw_shades        no
draw_outline        no
draw_borders        no
draw_graph_borders    yes
stippled_borders    0
border_inner_margin        3
border_width        0

default_color        white
default_shade_color    black
default_outline_color    black

alignment top_left
gap_x            6
gap_y            48

no_buffers        yes

######

TEXT

$nodename - $sysname $kernel on $machine

${color #e49c16}Uptime:$color $uptime ${color #FFFFFF}
${color #e49c16}CPU Utilisé :${color #FFFFFF} $cpu% ${color #ffc11f}${cpubar}
${color white}${cpugraph ffc11f 8b4b0b}
${color #e49c16}Mémoire RAM :
${color #FFFFFF} $mem/$memmax - $memperc% ${color #ffc11f}${membar}
${color #e49c16}Utilisation du Swap :
${color #FFFFFF} $swap/$swapmax - $swapperc% ${color #ffc11f}${swapbar}
${color #e49c16}Processus : $color $processes   ${color #e49c16}En cours : $color $running_processes

$color$stippled_hr

${color #e49c16}Espace Disque Libre :
     ${color #FFFFFF}Root (${fs_size /}) :${color #FFFFFF}${alignc}${fs_free_perc /}${alignc}% ${color #ffc11f}${fs_bar /}
     ${color #FFFFFF}/home (${fs_size /home}) :${color #FFFFFF}${alignc}${fs_free_perc /home}${alignc}% ${color #ffc11f}${fs_bar /home}
#     ${color #FFFFFF}DD2 (${fs_size /media/Disque2}) :${color #FFFFFF}${alignc}${fs_free_perc /media/Disque2}${alignc}% ${color #ffc11f}${fs_bar /media/Disque2}$color
#    ${color #FFFFFF}DD Ext ${if_mounted /media/DISQUE DUR EXTERNE}(${fs_size /media/DISQUE DUR EXTERNE}) :${color #FFFFFF}${alignc}${fs_free_perc /media/DISQUE DUR EXTERNE}${alignc}% ${color #ffc11f}${fs_bar /media/DISQUE DUR EXTERNE}$color$else : Not connected ${endif}
#     ${color #FFFFFF}DD Ext ${if_mounted /media/disk-1}(${fs_size /media/disk-1}) :${color #FFFFFF}${alignc}${fs_free_perc /media/disk-1}${alignc}% ${color #ffc11f}${fs_bar /media/disk-1}$color$else : Not connected ${endif}

$stippled_hr

Et voici le résultat

http://img850.imageshack.us/img850/3331/capturedu20120517224132.png

Uploaded with ImageShack.us

excuse moi, mais ton script ne correspond pas à ce qu'il y a sur ta capture d'écran, tu devrais vérifier.

Hors ligne

#1423 Le 18/05/2012, à 13:58

enebre

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

Bonjour superBOB,

J'ai essayé ton conky, mais je ne trouve pas la partie info lan/wan sur mon écran.
Y a t il quelque chose qui manque ou a activer dans le script du conky ?
C'est d'ailleurs pas du tout le résultat de l'image de ton post ci dessus.

Dernière modification par enebre (Le 18/05/2012, à 14:00)

Hors ligne

#1424 Le 18/05/2012, à 19:32

passe-partout

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

Salut!

Je fais face à un petit problème lorsque je renseigne les lignes pour la température de mon cpu dans mon conkyrc :
par exemple pour une ligne:

${color #FF6600}CPU core 1 :${color #FFFFFF} ${cpu cpu1}% ${color #FF6600}${cpubar cpu1}
${color #FF6600}Temperature : ${color white}${hwmon 1 temp 2} C ${offset 5}${color white}${cpugraph cpu1 12,125 ffc11f 8b4b0b}

J'utilise donc hwmon 1 (en fait: /sys/class/hwmon/hwmon 1). Le petit soucis, c'est que c'est pas forcément hwmon 1 à tous les démarrage de mon ordi.
Parfois c'est hwmon 0 et ça fait planter mon conky.
Comment je peux faire pour que ce soit tout le temps le même? Ou que puis je utliser comme paramètre pour que ce soit toujours vrai?

Dernière modification par passe-partout (Le 18/05/2012, à 19:33)

Hors ligne

#1425 Le 19/05/2012, à 07:14

shamen456

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

Bonjour à tous...

voici un premier essais d'ecriture d'un code lua (bien loin des prouesses de nos experts...) pour calculer et afficher un compte a rebours...

--[[Countdown.lua by shamen456 (forum.ubuntu-fr.org)
calcul du temps restant (en jours, hr, min, sec) jusqu'a une certaine date a determiner par 'endday' ci-dessous
calculate remaining time untill a determined date (endday)

appeller les fonctions dans conky avec ${lua functionname} pour afficher les valeurs
call lua functions in conky with ${lua functionname}

functionname :
    today --- time code for actual time
    endday --- time code for end date of the countdown
    remain --- time code for the difference between today and endday
    startD --- start date in the form (dd mmm yyyy)
    endD --- end date in the form (dd mmm yyyy)
    totalD --- total amount of days between start and end
    remainD --- total remaining full days
    remainD1 --- total remaining days, included remaining hours of current day (=remainD+1)
    remainH --- remaining hours for current day
    remainM --- remaining minutes for current hour
    remainS --- remaining seconds for current minute
    elapsD --- elapsed days since start date
    percelapsD --- percentage elapsed
    percremainD --- percentage remaining
]]

require 'cairo'

function conky_countdown()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))


    local today=os.time()
    local startday=os.time{year=2012, month=5, day=11, hour=8}
    local endday=os.time{year=2012, month=5, day=19, hour=7, min=00}
    local totaltime=endday-startday
    local totaldays=math.floor(totaltime/86400)
    local elapsedtime=today-startday
    local remain=endday-today
    local heure=os.date("%H",today)
    local minute=os.date("%M",today)
    local elapseddays=math.floor(elapsedtime/86400)
    local remaining=endday-today
    local percelapsed=(elapsedtime*100)/totaltime
    local percremain=(remaining*100)/totaltime

if remain > 0 then

    
     remdays=math.floor(remaining/86400)
     remhours=math.floor((remaining-(remdays*86400))/3600)
     remmin=math.floor((remaining-(remdays*86400)-(remhours*3600))/60)
     remsec=remaining-(remdays*86400)-(remhours*3600)-(remmin*60)
else

    remaining=0    
    percelapsed =100
    percremain = 0
    remdays = 0
    remhours = 0
    remmin = 0
    remsec = 0
    
end

function conky_today()
    return today
end

function conky_endday()
    return endday
end

function conky_remain()
    return remain
end

function conky_startD()
    local startDay=os.date("%d %b %Y",startday)
    return startDay
end

function conky_endD()
    local endDay=os.date("%d %b %Y",endday)
    return endDay
end

function conky_totalD()
    return totaldays
end


function conky_remainD()
    return remdays-1
end

function conky_remainD1()
    return remdays
end

function conky_remainH()
    return remhours
end

function conky_remainM()
    return remmin
end

function conky_remainS()
    return remsec
end


function conky_elapsD()
    return elapseddays
end

function conky_percelapsD()
    return percelapsed
end

function conky_percremainD()
    return percremain
end

cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end

en l’intégrant dans des rings de wlourf ça donne ceci:
countdown

le zip avec les fichiers nécessaires se trouve ici

Hors ligne