Postez ici vos trucs & astuces.

conky control (voyager) sous manjaro/arch

#1Messageil y a 11 ans

salut! :salut:
je viens de tomber là-dessus chez nos cousins de Archbang;pas encore testé,je vous livre juste le lien :siffle

http://bbs.archbang.org/viewtopic.php?id=3017

.je le traduirai si besoin(j'ai pas trop de temps pour les trads en ce moment (60 heures/semaines payées 39...quel beau métier,cuisinier :tetu! )
@+
cordialement,tout ça...
fanchig

conky control (voyager) sous manjaro/arch

#2Messageil y a 11 ans

pour avoir roulé sous voyager pendant pas mal de temps je peux dire que c'est pas mal du tout !
par contre j'attendrais leur nouveau module entièrement revisité pour la sortie 13.04

conky control (voyager) sous manjaro/arch

#3Messageil y a 11 ans

je suis actuellement en train de tester voyager 12.10...c'est franchement pas mal,mais il faudrait que je trouve un moyen de calmer un peu les processeurs...40 à 50% sur chacun des 4 avec chromium et youtube,ça fait un peu trop :gsourire:
pour en revenir au sujet,je compte bien tester ça,car finalement,j'aime bien ce genre de gadget :clap

conky control (voyager) sous manjaro/arch

#4Messageil y a 11 ans

moi j'ai tourner dessus sur ma machine de travail et la gestion du proc et Ram sont top ! :)
Pour une distro basé sur ubuntu c'est vraiment bien !

conky control (voyager) sous manjaro/arch

#5Messageil y a 11 ans

J'obtiens ça, mais ensuite je ne sais pas quoi en faire (les conky est moi.... :gsourire: )

Image

conky control (voyager) sous manjaro/arch

#6Messageil y a 11 ans

salut! :salut:
tu n'as plus qu'à choisir un conky (ou plusieurs)dans la liste pour qu'il's) s'affiche(nt) sur ton bureau.tu peux aussi les faire disparaitre via ce menu si tu veux pas le faire en console.

conky control (voyager) sous manjaro/arch

#7Messageil y a 11 ans

Oui, il m'affiche qqch en haut de l'écran, mais en tout petit. :sourire: En plus, j'ai un fond bleu, donc c'est pas terriblement lisible.

Ensuite, il râle sur proc/net/route qui est inexistant. Pas moyen de le stopper.

conky control (voyager) sous manjaro/arch

#8Messageil y a 11 ans

aie!...
comme je le disais plus haut,j'ai testé ça sur Voyager,pas encore sur manjaro...désolé :saispas:

conky control (voyager) sous manjaro/arch

#9Messageil y a 11 ans

Il m'a rien cassé, au moins. :sourire: Le précédent essai m'avait viré tout le paramétrage Xfce.. :rigole:

conky control (voyager) sous manjaro/arch

#10Messageil y a 11 ans

content qu'il n'y ait pas de dégats!
curieusement,j'hésite un peu à me lançer... :siffle

conky control (voyager) sous manjaro/arch

#11Messageil y a 11 ans

Je l’utilise depuis quelques temps déjà et rien à signaler

Courage pour le taf, je sais ce que c 'est (même métier)

conky control (voyager) sous manjaro/arch

#13Messageil y a 11 ans

le tuto Archbang propose de l'installer via AUR, mais je vous signale que sous Manjaro, il est dans les dépots addon; et je sais pas pour vous mais chez moi (0.8.2 Xfce), il était installé par défaut...

conky control (voyager) sous manjaro/arch

#14Messageil y a 11 ans

Je suis pourtant en Xfce, mais 0.8.3 -> ???

conky control (voyager) sous manjaro/arch

#15Messageil y a 11 ans

je viens de vérifier en lançant une 0.8.2 dans VBox et effectivement, conky-control est installé par défaut (j'avais un doute vu que je l'avais enlevé car je trouve Conky un peu gourmand en CPU).
je n'utilise pas les isos 0.8.3: ça fait 3 installations que je tente qui foirent avec cette version, du coup j'installe avec la 0.8.2 et tant pis pour la grosse mise à jour qui suit...

conky control (voyager) sous manjaro/arch

#16Messageil y a 11 ans

Salut,

Dans le même ordre d'idée, j'ai un petit script pour switcher alternativement avec une "single" touche entre ça:

Image

et ça:

Image

#!/bin/bash

killall conky
if [ -e "/home/fassil/.conkyrc" ]
then
rm ~/.conkyrc
conky --config=/etc/conky/conky.conf

else
cp /home/.conkyrc ~/
conky
fi


Penser à changer le user ligne 4, if/then comprends pas ~ ?

Y'a donc la config raccourcis (.conkyrc) à créer/copier dans /home et le conky "avec des vrais morceaux de lua dedans" :clindoeil: qui doit déjà être dans /etc/conky/conf si vous l'avez choisi avec conky-control (le mien est un peu "tuné")

A enregistrer dans /usr/bin/ avec les droits qui vont bien et a appeler avec F12/ou autre suivant le desktop (rc.xml, omni -> rac, etc...)

Et sous e17 créer le conky.destop dans /usr/share/applications pour pouvoir l'ajouter au démarrage:

[Desktop Entry]
Name=conky
Comment=Start conky
Exec=/usr/bin/conky
Icon=false
NoDisplay=true
Terminal=false
Type=Application
Categories=
StartupNotify=true


PS: quand prêtant ma babasse au coin d'un bar, ça hurle que ça ne sait pas ou cliquer pour facebooker, je n'ai qu'a dire tape F12...

conky control (voyager) sous manjaro/arch

#17Messageil y a 11 ans

J'aime beaucoup ton premier, mais tout ce que j'obtiens, c'est ça :

Image

Quand je dis que je ne suis pas doué... :rigole:

conky control (voyager) sous manjaro/arch

#18Messageil y a 11 ans

Si tu colles un clock_rings.lua comme ça:

--[[
Clock Rings by Linux Mint (2011) reEdited by despot77

This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua 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/clock_rings.lua
    lua_draw_hook_pre clock_rings
   
Changelog:
+ v1.0 -- Original release (30.09.2009)
   v1.1p -- Jpope edit londonali1010 (05.10.2009)
*v 2011mint -- reEdit despot77 (18.02.2011)
]]

settings_table = {
    {
        -- Edit this table to customise your rings.
        -- You can create more rings simply by adding more elements to settings_table.
        -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
        name='time',
        -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
        arg='%I.%M',
        -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
        max=12,
        -- "bg_colour" is the colour of the base ring.
        bg_colour=0xffffff,
        -- "bg_alpha" is the alpha value of the base ring.
        bg_alpha=0.1,
        -- "fg_colour" is the colour of the indicator part of the ring.
        fg_colour=0xFF6600,
        -- "fg_alpha" is the alpha value of the indicator part of the ring.
        fg_alpha=0.2,
        -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
        x=100, y=150,
        -- "radius" is the radius of the ring.
        radius=50,
        -- "thickness" is the thickness of the ring, centred around the radius.
        thickness=5,
        -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
        start_angle=0,
        -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle.
        end_angle=360
    },
    {
        name='time',
        arg='%M.%S',
        max=60,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0xFF6600,
        fg_alpha=0.8,
        x=100, y=150,
        radius=56,
        thickness=5,
        start_angle=0,
        end_angle=360
    },
    {
        name='time',
        arg='%S',
        max=60,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0xFF6600,
        fg_alpha=1,
        x=100, y=150,
        radius=62,
        thickness=5,
        start_angle=0,
        end_angle=360
    },
    {
        name='time',
        arg='%d',
        max=31,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0xFF6600,
        fg_alpha=0.8,
        x=100, y=150,
        radius=70,
        thickness=5,
        start_angle=-90,
        end_angle=90
    },
    {
        name='time',
        arg='%m',
        max=12,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0xFF6600,
        fg_alpha=1,
        x=100, y=150,
        radius=76,
        thickness=5,
        start_angle=-90,
        end_angle=90
    },
    {
        name='cpu',
        arg='cpu0',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.5,
        fg_colour=0xFF6600,
        fg_alpha=0.9,
        x=50, y=300,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.5,
        fg_colour=0xFF6600,
        fg_alpha=0.9,
        x=75, y=350,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=175
    },
    {
        name='swapperc',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.5,
        fg_colour=0xFF6600,
        fg_alpha=0.9,
        x=100, y=400,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=165
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.5,
        fg_colour=0xFF6600,
        fg_alpha=0.9,
        x=125, y=450,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=175
    },
        {
        name='downspeedf',
        arg='eth0',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.5,
        fg_colour=0x339900,
        fg_alpha=0.9,
        x=150, y=500,
        radius=25,
        thickness=4,
        start_angle=-90,
        end_angle=180
    },
        {
        name='upspeedf',
        arg='eth0',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0xff6600,
        fg_alpha=0.8,
        x=150, y=500,
        radius=20,
        thickness=4,
        start_angle=-90,
        end_angle=180
    },
}

-- Use these settings to define the origin and extent of your clock.

clock_r=65

-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.

clock_x=100
clock_y=150

show_seconds=true

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 draw_clock_hands(cr,xc,yc)
    local secs,mins,hours,secs_arc,mins_arc,hours_arc
    local xh,yh,xm,ym,xs,ys
   
    secs=os.date("%S")   
    mins=os.date("%M")
    hours=os.date("%I")
       
    secs_arc=(2*math.pi/60)*secs
    mins_arc=(2*math.pi/60)*mins+secs_arc/60
    hours_arc=(2*math.pi/12)*hours+mins_arc/12
       
    -- Draw hour hand
   
    xh=xc+0.7*clock_r*math.sin(hours_arc)
    yh=yc-0.7*clock_r*math.cos(hours_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xh,yh)
   
    cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    cairo_set_line_width(cr,5)
    cairo_set_source_rgba(cr,1.0,1.0,1.0,1.0)
    cairo_stroke(cr)
   
    -- Draw minute hand
   
    xm=xc+clock_r*math.sin(mins_arc)
    ym=yc-clock_r*math.cos(mins_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xm,ym)
   
    cairo_set_line_width(cr,3)
    cairo_stroke(cr)
   
    -- Draw seconds hand
   
    if show_seconds then
        xs=xc+clock_r*math.sin(secs_arc)
        ys=yc-clock_r*math.cos(secs_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xs,ys)
   
        cairo_set_line_width(cr,1)
        cairo_stroke(cr)
    end
end

function conky_clock_rings()
    local function setup_rings(cr,pt)
        local str=''
        local value=1
       
        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
   
    -- Check that Conky has been running for at least 5s

    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>1 then
        for i in pairs(settings_table) do
            setup_rings(cr,settings_table[i])
        end
    end
   
    draw_clock_hands(cr,clock_x,clock_y)
end


et un conky.conf comme ça voir + loin:


dans /etc/conky avec les .png de manjaro (logo5, manjaro-logo et manjaro) et celui qui correspond a ton desktop (xfce ?), ça doit marcher...

Edit: suivant la résolution de ton écran, faudra pt'être retoucher gap_x/y dans conky.conf
Dernière modification par fassilil y a 11 ans, modifié au total 3 fois.

conky control (voyager) sous manjaro/arch

#19Messageil y a 11 ans

Il doit me manquer qqch :

conky: aucun processus trouvé
cp: impossible d'évaluer « /home/.conkyrc »: Aucun fichier ou dossier de ce type
Conky: /etc/conky/conky.conf: 1: no such configuration: '--[['
Conky: /etc/conky/conky.conf: 2: no such configuration: 'Clock'
Conky: /etc/conky/conky.conf: 4: no such configuration: 'This'
Conky: /etc/conky/conky.conf: 6: no such configuration: 'IMPORTANT:'
Conky: /etc/conky/conky.conf: 7: no such configuration: 'ate'
Conky: /etc/conky/conky.conf: 9: no such configuration: 'To'
Conky: llua_load: cannot open /home/pat/scripts/clock_rings.lua: No such file or directory
(...)

conky control (voyager) sous manjaro/arch

#20Messageil y a 11 ans

Tu es sur mon script ou sur conky-control, là ?
Répondre