logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#26 01-11-2009 10:33:45

damien
Modo / Rédacteur Wiki
Distrib. : Gentoo & Debian 12
(G)UI : Xfce4
Inscription : 22-09-2008
Site Web

Re : Conky

Voici mon nouveau conky

091101103927789867.png

Et voici le code du fichier .conkyrc

use_xft yes
background no
xftfont DejaVuSans:size=8
xftalpha 0.8
update_interval 1.0
total_run_times 0
own_window yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
double_buffer yes
minimum_size 280 900
maximum_width 308
draw_shades no
draw_outline no
draw_borders no
stippled_borders 8
border_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color 2C4B68
alignment top_left
gap_x 960
gap_y 30
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
uppercase no
use_spacer none

TEXT

Système
$nodename linux-$kernel${alignr}${time %T}
Uptime: $uptime - Charge: $loadavg
Fréquence CPU: $freq_dyn_g Maximum:$freq_g
Utilisation Core 1: ${cpu cpu1}% ${cpubar cpu1}
Utilisation Core 2: ${cpu cpu2}% ${cpubar cpu2}
${cpugraph cpu2 32,150 2C4B68 5C9CD9} ${cpugraph cpu1 32,150 2C4B68 5C9CD9}
Mémoire: $mem/$memmax - $memperc% ${membar}
Swap : $swap/$swapmax - $swapperc% ${swapbar}
Processus: $processes Running: $running_processes

Réseau (Gigabit - eth1): ${alignr}#IP: ${addr eth1}
Descendant: ${downspeed eth1} ko/s${offset 25}Montant:${upspeed eth1} ko/s
${downspeedgraph eth1 32,150 2C4B68 5C9CD9} ${upspeedgraph eth1 32,150 2C4B68 5C9CD9}

nVidia Geforce 7950 GT:
Fréquences GPU: ${execi 10 nvclock -i | grep "GPU clock" | grep '[0-9][0-9][0-9].[0-9]' -o}MHz / RAM:${execi 300 nvclock -i | grep "Clock" | grep '[0-9][0-9][0-9].[0-9]' -o}MHz
Température GPU: ${execi 10 nvclock -T | grep "temperature" | grep '[0-9][0-9]' -o}°C

${color}Noms              PID     CPU%   MEM%
${color}Utilisation CPU
${color #ddaa00} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}

${color}Utilisation Mémoire
${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}

Systèmes de fichiers:
/ ${fs_used /}/${fs_size /} ${fs_bar /}
/home ${fs_used /home/}/${fs_size /home/} ${fs_bar /home/}
/usr ${fs_used /usr/}/${fs_size /usr/} ${fs_bar /usr/}
/opt ${fs_used /opt/}/${fs_size /opt/} ${fs_bar /opt/}
/var ${fs_used /var/}/${fs_size /var/} ${fs_bar /var/}
#sauvegarde ${fs_used /media/sauvegarde/}/${fs_size /media/sauvegarde/} ${fs_bar /media/sauvegarde/}
${color}${execi 120 ~/.conky/meteo.sh FRXX0274}Météo a ${execi 120 ~/.conky/meteo2.sh "Ville"}

${color}Aujourd'hui : ${execi 120 ~/.conky/meteo2.sh "Température aujourd'hui"}  ${font weather:size=40}${voffset -18}${execi 120 ~/.conky/meteo2.sh "Conditions aujourd'hui"}${font}${voffset -11}
Vent : ${execi 120 ~/.conky/meteo2.sh "Vent aujourd'hui"}
Lever du soleil : ${execi 120 ~/.conky/meteo2.sh "Lever du soleil"}
Coucher du soleil : ${execi 120 ~/.conky/meteo2.sh "Coucher du soleil"}
Demain : ${execi 120 ~/.conky/meteo2.sh "Température demain"}  ${font weather:size=32}${voffset -10}${execi 120 ~/.conky/meteo2.sh "Conditions demain"}${font}
${if_running amarokapp}
${color}AmaroK${color white}
${alignc}${execi 10 ~/.conky/amarok artist}
${alignc}${execi 10 ~/.conky/amarok title}
${execibar 1 ~/.conky/amarok progress}
${alignc}"${execi 10 ~/.conky/amarok album}"
${alignc}${execi 10 ~/.conky/amarok year} - ${color white}${alignc}${execi 10 ~/.conky/amarok genre}
$endif
${if_running rhythmbox}
Rythmbox
${hr 1}











${alignr}${exec rhythmbox-client --print-playing-format "%ta - %at"}
${alignr}${exec rhythmbox-client --print-playing-format "%tn - %tt"}
$endif


Position de cid
X=1085
Y=705
Taille 180x180


signature.jpg

Hors ligne

#27 01-11-2009 11:13:16

llapingachos
Membre
Lieu : Toulouse
Distrib. : Unstable > Testing > Experimental
Noyau : 2.6.31-5.slh.2-sidux-686
(G)UI : Openbox
Inscription : 19-09-2009

Re : Conky

lol a écrit :

Et encore un jeu de mot débile...

Conky ch'tadore !


Mouarf ! wink


GNU/Linux is user friendly, it's just selective about who its friends are.

Hors ligne

#28 11-12-2009 18:19:05

n3os
Modérateur
Lieu : /Debian/Home/neos
Distrib. : Sid
Noyau : 2.6.35
(G)UI : e17
Inscription : 14-07-2007

Re : Conky

yop

Pour les intéréssés, j'ai recompilé conky sous sid 64 bits en ajoutant le support nvidia et imlib2.
imlib2 permet d'intégré une image en fond de conky. Exemple chez moi une barre glossy en fond de conky.

4b227ebf.png

le .deb de conky conky_1.7.1.1-1_amd64.deb

Hors ligne

#29 11-12-2009 18:30:28

smolski
quasi...modo
Lieu : AIN
Distrib. : backports (buster) 10
Noyau : Linux 4.19.0-8-amd64
(G)UI : gnome
Inscription : 21-10-2008

Re : Conky

Connnn... ky qu'a encore laissé sortir le chat ?
La balle est au centre... Avis aux de lagomorphes mal léchés ! wink

Super neos !

Yop !

Dernière modification par smolski (11-12-2009 18:34:58)


saque eud dun (patois chtimi : fonce dedans)

Hors ligne

#30 02-06-2014 10:12:51

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Conky

Coucou,
1401699854.png
Voilà un morceau de conkyrc pour une tranche de Clementine.  big_smile

background yes

use_xft yes
xftalpha 0.8
xftfont Bitstream Vera Sans Mono:size=8

own_window yes
own_window_class conky
own_window_argb_visual yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
own_window_transparent yes

double_buffer yes
no_buffers yes


minimum_size 356 700

alignment tr

override_utf8_locale yes

default_color slategrey

TEXT

${if_running clementine}${color lightgrey}Clementine ${execi 2 python ~/.conky/scripts/clementine.py -z}
${if_empty ${execi 2 python ~/.conky/scripts/clementine.py -z | grep arrêté}}
   ${voffset 220}${execi 2 python ~/.conky/scripts/clementine.py -a}
   ${color}Titre : ${color lightgrey}${execi 2 python ~/.conky/scripts/clementine.py -t}
   ${color}Album : ${color lightgrey}${execi 2 python ~/.conky/scripts/clementine.py -l}
   ${color}Année : ${color lightgrey}${execi 2 python ~/.conky/scripts/clementine.py -y}
   ${color}Débit : ${color lightgrey}${execi 2 python ~/.conky/scripts/clementine.py -b} kbit/s
${execi 2 python ~/.conky/scripts/clementine.py -c /tmp/cover.jpg}${image /tmp/cover.jpg -p 22,272 -s 200x200 -n}${endif}${endif}


Et le script clementine.py dérivé de anowplaying.py

#!/usr/bin/env python2
#-*- coding: utf-8 -*-


import dbus, optparse, shutil, commands

if __name__ == '__main__':
    '''Check if clementine is running'''
    output = commands.getoutput('ps -A')
    if 'clementine' not in output:
        raise SystemExit

    '''Get system bus'''
    bus = dbus.SessionBus()
    clementine = bus.get_object('org.mpris.clementine', '/Player')
    #print ("Introspection data:\n")
    #print clementine.Introspect()
    #print "\nSatut:\n"

    stat = clementine.GetStatus()
    #print stat[0]
    clementinedict = clementine.GetMetadata()

    '''Set up the command line parser'''
    usage = 'usage: %prog [options]'
    parser = optparse.OptionParser(usage=usage)
    parser.add_option('-a', '--artist', action='store_true', help='artist name')
    parser.add_option('-t', '--title', action='store_true', help='title of the track')
    parser.add_option('-l', '--album', action='store_true', help='album name')
    parser.add_option('-g', '--genre', action='store_true', help='genre of the current track')
    parser.add_option('-y', '--year', action='store_true', help='year of the track')
    parser.add_option('-m', '--mtime', action='store_true', help='time of the track')
    parser.add_option('-r', '--rtime', action='store_true', help='remaining time for the track')
    parser.add_option('-e', '--etime', action='store_true', help='elapsed time for the track')
    parser.add_option('-p', '--progress', action='store_true', help='progress of the track')
    parser.add_option('-n', '--track', action='store_true', help='track number')
    parser.add_option('-b', '--bitrate', action='store_true', help='bitrate of the track')
    parser.add_option('-s', '--sample', action='store_true', help='sample rate of the track')
    parser.add_option('-c', '--cover', metavar='filename', help='copy cover art to destination file')
    parser.add_option('-z', '--status', action='store_true', help='player status')

    '''Get the parser options printed'''
    (opts, args) = parser.parse_args()
    if opts.artist and clementinedict.has_key('artist') :
        print clementinedict['artist']
    if opts.title and clementinedict.has_key('title'):
        print clementinedict['title']
    if opts.album and clementinedict.has_key('album'):
        print clementinedict['album']
    if opts.genre and clementinedict.has_key('genre'):
        print clementinedict['genre']
    if opts.year and clementinedict.has_key('year'):
        print clementinedict['year']
    if opts.track and clementinedict.has_key('tracknumber'):
        print clementinedict['tracknumber']
    if opts.bitrate and clementinedict.has_key('audio-bitrate'):
        print clementinedict['audio-bitrate']
    if opts.sample :
        print clementinedict['audio-samplerate']
    if opts.status :
        if stat[0]==2:
        print 'arrêté'
        elif stat[0]==1:
            print 'en pause'
        else:
            print ""

    '''Manage time stuff'''
    cpos = mt = mtime = etime = rtime = progress = None
    if (opts.etime or opts.rtime or opts.mtime or opts.progress) and clementinedict.has_key('mtime'):
        cpos = clementine.PositionGet()/1000
        mt = clementinedict['mtime']/1000
        mtime = str(mt/60)+":"+str(mt%60) if mt%60>9 else str(mt/60)+":0"+str(mt%60)
        etime = str(cpos/60)+":"+str(cpos%60) if cpos%60>9 else str(cpos/60)+":0"+str(cpos%60)
        rtime = str((mt-cpos)/60)+":"+str((mt-cpos)%60) if (mt-cpos)%60>9 else str((mt-cpos)/60)+":0"+str((mt-cpos)%60)
        progress= float(cpos)/float(mt)*100
    if opts.etime and etime is not None:
        print etime
    if opts.rtime and rtime is not None:
        print rtime
    if opts.mtime and mtime is not None:
        print mtime
    if opts.progress and progress is not None:
        print progress

    if opts.cover :
        cover = clementinedict['arturl']
        if cover != "" :
            try :
                shutil.copyfile(cover.replace('file://', ''), opts.cover)
                print ""
            except Exception, e:
                print e
                print ""
        else :
            print ""
 

Bonne écoute.   cool


I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#31 02-06-2014 14:25:47

mksmn
Membre
Lieu : Ile de France
Distrib. : Debian GNU/Linux Stable (Bookworm)
Noyau : Noyau Linux 6.1.0-xx-amd64
(G)UI : Xfce Desktop 4.18
Inscription : 30-06-2008

Re : Conky

salut,

ça c'est du pur son !

Debian, c'est bien!
(De retour sous Debian, soyez cool.)

Hors ligne

#32 02-06-2014 16:55:46

Anonyme
Invité

Re : Conky

mksmn a écrit :


ça c'est du pur son !



+1

#33 02-06-2014 16:57:18

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Conky

Malin, vous m'avez forcé à lancer ma playlist IM ==> plusieurs heures.  lol

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#34 02-06-2014 19:31:43

unit
Membre
Lieu : Dans le grand nord
Distrib. : Bullseye
Noyau : Linux debian 5.10.0-10-amd64
(G)UI : Xfce 4.16.2
Inscription : 11-03-2010

Re : Conky

Merci pour le script, avant j'utilisais conkyclementine mais ça me prenais pas de ram.
Je vais essayer ton srcipt pour voir.:D

Exige beaucoup de toi-même et attends peu des autres. Ainsi beaucoup d'ennuis te seront épargnés.
Confucius.

Hors ligne

#35 02-06-2014 21:53:39

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Conky

L'ensemble de mes conkys, dont fait partie celui-ci, me prend moins de 10 Mo.  smile

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#36 06-06-2014 17:58:51

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Conky

Salut,

Vous souhaitez garder un œil rivé en permanence sur un fofo fou fou fou ?
Conky est là pour vous.  big_smile
1402077442.png
Il vous suffit de récupérer l'adresse du flux dans le lien Flux atom de la discussion
de changer &type=atom en &type=rss et d'indiquer à Conky de vous l'afficher :

background yes
update_interval 1.0

use_xft yes
xftalpha 0.8
xftfont Bitstream Vera Sans Mono:size=8

own_window yes
own_window_class conky
own_window_argb_visual yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
own_window_transparent yes

double_buffer yes
no_buffers yes

minimum_size 356 350
maximum_width 356

alignment mr

override_utf8_locale yes

default_color slategrey
 
TEXT
${color lightgrey}Flux

${if_up eth0}${color}Debian-Facile${color lightgrey}
${rss https://debian-facile.org/extern.php?action=feed&type=rss 5 item_titles 7}

Et le tour est joué.  big_smile


I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#37 06-06-2014 18:40:33

Anonyme-8
Invité

Re : Conky

J'utilise Brief ou Sage comme extension pour lire les flux RSS mais ça peut être utile pour le travail, voir les résultats de sports etc.

Par contre, je ne vois pas trop l'interet d'actualiser le flux toutes les minutes, toutes les 5 minutes c'est déjà bien.

#38 06-06-2014 19:02:16

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Conky

Tu as raison, j'ai édité pour passer à 5 mn.  smile

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

#39 06-06-2014 19:57:46

Anonyme-8
Invité

Re : Conky

ça fait suite suite à la discussion de sogalpunx sur Informatique, Internet et écologie?

#40 06-06-2014 22:31:14

paskal
autobahn
Lieu : ailleurs
Inscription : 14-06-2011
Site Web

Re : Conky

Je ne le voyais pas comme ça mais, effectivement, éviter de lancer un navigateur pour charger toute une page,
ça peut représenter une économie de bande passante, de CPU etc.  smile

I'd love to change the world
But I don't know what to do
So I'll leave it up to you...

logo-sur-fond.png

Hors ligne

Pied de page des forums