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.

#976 Le 23/11/2009, à 11:45

Mattorre

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

Mon nouveau conky.

screenshotti.th.png

Si vous voulez le code d'un des conky dites le moi smile.


Cooler Master Cosmos RC-1000, Corsair CMPSU-650TX, Intel Core 2 Duo E8400 (2x3 GHz), LG Flatron W2452T, Corsair Dominato - 2 x 2 Go DDR2 PC 8500,  SAMSUNG Spin Point F1 2 x 500 Go (Raid 0), SAMSUNG Spin Point F1 1To, ATI Radeon HD4850 (CrossFire), Enceinte Inspire T7700, Logitech Illuminated & VX Revolution, Windows Seven 64bit & Ubuntu 9.04 64bit

Hors ligne

#977 Le 23/11/2009, à 12:55

wido

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

@Mattorre tu as oublié de flouter ton ip roll

Hors ligne

#978 Le 23/11/2009, à 14:38

Mattorre

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

IP local tongue


Cooler Master Cosmos RC-1000, Corsair CMPSU-650TX, Intel Core 2 Duo E8400 (2x3 GHz), LG Flatron W2452T, Corsair Dominato - 2 x 2 Go DDR2 PC 8500,  SAMSUNG Spin Point F1 2 x 500 Go (Raid 0), SAMSUNG Spin Point F1 1To, ATI Radeon HD4850 (CrossFire), Enceinte Inspire T7700, Logitech Illuminated & VX Revolution, Windows Seven 64bit & Ubuntu 9.04 64bit

Hors ligne

#979 Le 23/11/2009, à 17:58

[D]uplicity-[C]orp

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

Mattorre a écrit :

Mon nouveau conky.

http://img7.imageshack.us/img7/5484/screenshotti.th.png

Si vous voulez le code d'un des conky dites le moi smile.

Un ptit voffset - sur tes || permettrais d'avoir un meilleur rendu (plus net, moin decalé vers le bas) mtn ca reste qu'un détail. smile


Laptop - Sony Vaio - 15,4pouce - Debian Testing (Squeeze) AMD64 - 4Go Ram - Openbox = Work, Surf, P2P, ...
Desktop - Other - 24pouce -  Windows XP PRO x64 - 1Go Ram = Abode Photoshop CS4 & Movie.
Virtualbox - Linux Host - Windows XP PRO - 2Go Ram = Abode Photoshop CS4.
Music = Quod Libet - Movie = Mpc with Vlc. (Windows)

Hors ligne

#980 Le 23/11/2009, à 21:21

Dr. TUx

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

EDIT: Question poster dans un nouveau sujet

Dernière modification par Dr. TUx (Le 23/11/2009, à 21:44)

Hors ligne

#981 Le 23/11/2009, à 21:41

wido

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

@Dr. TUx, colle la partie en question sur le forum.

Hors ligne

#982 Le 24/11/2009, à 02:50

Jikan

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

Allez, voici le mien, fortement inspiré du travail de searchOne :

desktop01.resized.jpg

conkyrc :

# Total number of times for Conky to update before quitting. 0 = forever 
total_run_times 0

# Print text to stdout
out_to_console no

# Buffer management, avoid blinking
double_buffer yes
no_buffers yes
text_buffer_size 2048
imlib_cache_size 0

# refresh rate
update_interval 1

# samples for rate average
cpu_avg_samples 4
net_avg_samples 2

# size and position
alignment tl
minimum_size 1680 10
gap_y 20

# shading and framming
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_width 1

# should Conky fork in the background
background yes

# window type
own_window yes
own_window_type override # normal / override / desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky

#font management
use_xft yes
xftalpha 0.2
override_utf8_locale yes # force UTF8

# font face
xftfont Fixed:size=9#OCR A Std:size=8
uppercase no

# Adds spaces to keep things from moving about.
# Works only with fixed width fonts
use_spacer none

# Colors
default_color FFFFFF
default_shade_color 333333
default_outline_color black

# — Lua Load — #
lua_load ~/.conky/rings.lua
lua_draw_hook_pre ring_stats

TEXT
${voffset -35}
${voffset 55}${goto 900}${diskiograph 70,400 FFFF00 FF0000 -t}${voffset -55}
${voffset 45}${goto 173}${color 1E90FF}${swapbar 3,1382}${color}${voffset -45}
${voffset -5}${goto 235}${color 0066FF}${font Blazed:size=30}${execi 86400 cat /etc/lsb-release|grep ID|cut -d= -f2} ${execi 86400 cat /etc/lsb-release|grep REL|cut -d= -f2} ${execi 86400 cat /etc/lsb-release|grep NAME|cut -d= -f2} $machine${color}${font}${voffset 5}
${voffset -55}${font NEUROPOL:size=10}
${goto 82}${color 1E90FF}RAM: ${memperc}%
${goto 82}${color FF0000}Core 0: ${cpu cpu0}%
${goto 82}${color FF0000}Core  1 : ${cpu cpu1}%
${goto 82}${color FFFF00}Home: ${fs_used_perc /home}%
${goto 82}${color 00FF00}Root: ${fs_used_perc /}%${color}${font}
${voffset -52}${goto 1562}${color 0066FF}${font ALolitaScorned:size=20}${time %H:%M:%S}${color}${font}${voffset 52}
${voffset -70}
${goto 240}${color 0066FF}${font whiterabbit:size=12}${exec whoami}@$nodename${goto 580}SYS.....${goto 655}${color white}+${exec sensors | grep 'Sys Temp:    +' | awk '{print $3}'| cut -c2-3}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C
${goto 240}Kernel: ${kernel}${goto 580}CPU.....${goto 655}${color white}+${exec sensors | grep 'CPU Temp:    +' | awk '{print $3}'| cut -c2-3}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C
${goto 240}${exec xdpyinfo | grep "version:"}${goto 580}Core 0..${goto 655}${color white}+${exec sensors | grep 'Core 0:      +' | awk '{print $3}'| cut -c2-3}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C
${goto 240}Desktop: ${desktop_number} - ${desktop}${goto 580}Core 1..${goto 655}${color white}+${exec sensors | grep 'Core 1:      +' | awk '{print $3}'| cut -c2-3}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C
${goto 240}${exec /lib/libc.so.6 | grep "GNU C Library" | awk '{print $4" "$8}' | sed 's/(\|)//g' | cut -c1-13}${goto 580}GPU.....${goto 655}${color white}+${nvidia temp}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C${voffset 5}${goto 1526}${font whiterabbit:Bold:size=11}Uptime: ${uptime}${voffset -5}${font whiterabbit:size=12}
${goto 240}${exec gcc --version | grep "gcc" | awk '{print $1" "$4}'}${goto 580}HDD1....${goto 655}${color white}+${hddtemp /dev/sda}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C
${goto 580}HDD2....${goto 655}${color white}+${hddtemp /dev/sdb}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C
${goto 580}HDD3....${goto 655}${color white}+${hddtemp /dev/sdc}${color 0066FF}${font Zekton:size=8}°${font}${font whiterabbit:size=12}C
${goto 580}CPU Fan......${goto 700}${color white}${exec sensors | grep 'CPU Fan:    ' | awk '{print $3}'| cut -c1-4}${color 0066FF}tpm
${goto 580}Chassis Fan..${goto 700}${color white}${exec sensors | grep 'Aux Fan:    ' | awk '{print $3}'| cut -c1-4}${color 0066FF}tpm${font}
${voffset -160}${goto 535}${font weather:size=120}y${font}${color}${voffset 160}
${voffset 70}
${voffset -220}
${goto 240}${color 0066FF}${font littleinsect:size=36}Nom${goto 370}Temps${goto 450}CPU${goto 500}Mem${goto 550}PID${goto 650}Top Mem${goto 755}%Mem${goto 1100}${font whiterabbit:size=14}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -c2- | sed 's/ [:space:]* //g' | sed 's/\(.*\) \(.*\) \(.*\) \(.*\) \(.*\) \(.*\)/\1 \2 \3 \4 \5\6/'}${goto 1130}${voffset 20}Core 0: ${freq 1}MHz${goto 1350}Core 1: ${freq 2}MHz${voffset -20}${goto 1210}${voffset 40}Overclocking: +${exec ~/.conky/oc}%${voffset -40}${font Zekton:size=8}
${color red}${goto 240}${top name 1}   ${goto 375}${top time 1}${goto 450}${top cpu 1}${goto 500}${top mem_res 1} ${goto 550}${top pid 1}${goto 680}${top_mem name 1}${goto 780}${top_mem mem 1}${color}
${goto 240}${top name 2}   ${goto 375}${top time 2}${goto 450}${top cpu 2}${goto 500}${top mem_res 2}${color} ${goto 550}${top pid 2}${goto 680}${top_mem name 2}${goto 780}${top_mem mem 2}
${goto 240}${top name 3}   ${goto 375}${top time 3}${goto 450}${top cpu 3}${goto 500}${top mem_res 3}${color} ${goto 550}${top pid 3}${goto 680}${top_mem name 3}${goto 780}${top_mem mem 3}
${goto 240}${top name 4}   ${goto 375}${top time 4}${goto 450}${top cpu 4}${goto 500}${top mem_res 4}${color} ${goto 550}${top pid 4}${goto 680}${top_mem name 4}${goto 780}${top_mem mem 4}
${goto 240}${top name 5}   ${goto 375}${top time 5}${goto 450}${top cpu 5}${goto 500}${top mem_res 5}${color} ${goto 550}${top pid 5}${goto 680}${top_mem name 5}${goto 780}${top_mem mem 5}
${goto 240}${top name 6}   ${goto 375}${top time 6}${goto 450}${top cpu 6}${goto 500}${top mem_res 6}${color} ${goto 550}${top pid 6}${goto 680}${top_mem name 6}${goto 780}${top_mem mem 6}
${goto 240}${top name 7}   ${goto 375}${top time 7}${goto 450}${top cpu 7}${goto 500}${top mem_res 7}${color} ${goto 550}${top pid 7}${goto 680}${top_mem name 7}${goto 780}${top_mem mem 7}
${goto 240}${top name 8}   ${goto 375}${top time 8}${goto 450}${top cpu 8}${goto 500}${top mem_res 8}${color} ${goto 550}${top pid 8}${goto 680}${top_mem name 8}${goto 780}${top_mem mem 8}
${goto 240}${top name 9}   ${goto 375}${top time 9}${goto 450}${top cpu 9}${goto 500}${top mem_res 9}${color} ${goto 550}${top pid 9}${goto 680}${top_mem name 9}${goto 780}${top_mem mem 9}
${goto 240}${top name 10}   ${goto 375}${top time 10}${goto 450}${top cpu 10}${goto 500}${top mem_res 10}${color} ${goto 550}${top pid 10}${goto 680}${top_mem name 10}${goto 780}${top_mem mem 10}
${voffset 220}
${voffset -595}
${goto 890}${font Comiccity:size=12}${color 0066FF}${if_existing /proc/net/route eth0}LAN: ${addrs eth0}${endif}${goto 1050}WAN:${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}${color}
${voffset 5}${goto 920}${if_existing /proc/net/route eth0}${font Webdings:size=18}${color red}7${font Comiccity:size=14}${upspeedf eth0} Ko/s${goto 1050}Total: ${totalup eth0}${endif}${font}${color}
${goto 800}${upspeedgraph eth0 35,500 FFCCCC FF0000}
${goto 920}${if_existing /proc/net/route eth0}${font Webdings:size=18}${color green}8${font Comiccity:size=14}${downspeedf eth0} Ko/s${goto 1050}Total: ${totaldown eth0}${endif}${font}${color}
${goto 800}${downspeedgraph eth0 35,500 00FF99 006600}${font}${voffset -5}
${voffset 595}
${voffset -858}
${voffset 5}${color 0066FF}${goto 1390}${font spacepatrol:size=14}${time %A}${voffset -5}
${goto 1318}${font spacepatrol:size=18}${time %_d %B %Y}${color}
${font Bitstream Vera Sans Mono:style=bold:size=10}
${voffset -30}${execpi 60 DJS=`date +%_d`; cal -m | sed '1d' | sed '/./!d' | sed 's/$/                     /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${goto 1330} /' | sed /" $DJS "/s/" $DJS "/" "'${color orange}'"$DJS"'${color}'" "/}${voffset 30}
${voffset 858}
${voffset -750}${color 0066FF}${font Raslani Kavaliar Kaiser:size=40}${goto 1225}by Jikan${font}${color}${voffset 750}
${voffset -1765}

les cercles :

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

Changelog:
+ 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 = {
    {
        -- 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='cpu',
        -- "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='cpu0',
        -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
        max=100,
        -- "bg_colour" is the colour of the base ring.
        bg_colour=0xCDCDC1,
        -- "bg_alpha" is the alpha value of the base ring.
        bg_alpha=0.5,
        -- "fg_colour" is the colour of the indicator part of the ring.
        fg_colour=0xFF0000,
        -- "fg_alpha" is the alpha value of the indicator part of the ring.
        fg_alpha=0.8,
        -- "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=120, y=120,
        -- "radius" is the radius of the ring.
        radius=81,
        -- "thickness" is the thickness of the ring, centred around the radius.
        thickness=10,
        -- "angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
        angle=90
    },
    {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=0xCDCDC1,
        bg_alpha=0.5,
        fg_colour=0xFF0000,
        fg_alpha=0.8,
        x=120, y=120,
        radius=93,
        thickness=10,
        angle=90
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x1E90FF,
        fg_alpha=0.5,
        x=120, y=120,
        radius=102.5,
        thickness=5,
        angle=90
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.1,
        fg_colour=0x00FF00,
        fg_alpha=0.5,
        x=120, y=120,
        radius=58,
        thickness=10,
        angle=90
    },
    {
        name='fs_used_perc',
        arg='/home',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0xFFFF00,
        fg_alpha=1,
        x=120, y=120,
        radius=70,
        thickness=10,
        angle=90
    },
    {
        name='time',
        arg='+%S',
        max=60,
        bg_colour=0xE3E3E3,
        bg_alpha=0.1,
        fg_colour=0xFFFF00,
        fg_alpha=0.7,
        x=1600, y=120,
        radius=70,
        thickness=4,
        angle=0
    },
    {
        name='time',
        arg='+%M',
        max=60,
        bg_colour=0xE3E3E3,
        bg_alpha=0.1,
        fg_colour=0x00CD00,
        fg_alpha=0.7,
        x=1600, y=120,
        radius=64,
        thickness=7,
        angle=0
    },
    {
        name='time',
        arg='+%H',
        max=24,
        bg_colour=0xE3E3E3,
        bg_alpha=0.1,
        fg_colour=0xffffff,
        fg_alpha=0.7,
        x=1600, y=120,
        radius=52,
        thickness=14,
        angle=0
    },

}

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(t, pt)
    if conky_window==nil then return end
    local w,h=conky_window.width,conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual,w,h)

    cr=cairo_create(cs)

    local xc,yc,ring_r,ring_w,angle=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

    local angle_0=angle*(2*math.pi/360)-math.pi/2
    local t_arc=t*2*math.pi

    -- Draw background ring

    cairo_arc(cr,xc,yc,ring_r,0,2*math.pi)
    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)        

    cairo_destroy(cr)
    cr = nil
end

function conky_cairo_cleanup()
    cairo_surface_destroy(cs)
    cs = nil
end

function conky_ring_stats()
    local function setup_rings(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(pct,pt)
    end

    -- Check that Conky has been running for at least 5s

    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)

    if update_num>5 then
        for i in pairs(settings_table) do
            setup_rings(settings_table[i])
        end
    end
end

les ports

# Total number of times for Conky to update before quitting. 0 = forever 
total_run_times 0

# Print text to stdout
out_to_console no

# Buffer management, avoid blinking
double_buffer yes
no_buffers yes
text_buffer_size 2048
imlib_cache_size 0

# refresh rate
update_interval 1

# samples for rate average
cpu_avg_samples 4
net_avg_samples 2

# size and position
alignment bl
minimum_size 600 10
gap_y 10

# shading and framming
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_width 1

# should Conky fork in the background
background yes

# window type
own_window yes
own_window_type override # normal / override / desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky

#font management
use_xft yes
xftalpha 0.2
override_utf8_locale yes # force UTF8

# font face
xftfont Fixed:size=9#OCR A Std:size=8
uppercase no

# Adds spaces to keep things from moving about.
# Works only with fixed width fonts
use_spacer none

# Colors
default_color FFFFFF
default_shade_color 333333
default_outline_color black

TEXT
${voffset -40}
${goto 240}${color 0066FF}${font littleinsect:size=36}Ports${font}${hr 1,300}
${goto 240}${font whiterabbit:size=12}${voffset 3}Ouverts : ${color white}${tcp_portmon 1 65535 count}${goto 360}${color 0066FF}Entrants : ${color white}${tcp_portmon 1 32767 count}${goto 485}${color 0066FF}Sortants : ${color white}${tcp_portmon 32768 61000 count}${voffset -3}
${goto 240}${color 0066FF}${hr 1,300}${font}${goto 600} ${color white}${font Zekton:size=8}
${goto 240}${tcp_portmon 1 65535 rhost 0}${goto 540}${tcp_portmon 1 65535 lservice 0}
${goto 240}${tcp_portmon 1 65535 rhost 1}${goto 540}${tcp_portmon 1 65535 lservice 1}
${goto 240}${tcp_portmon 1 65535 rhost 2}${goto 540}${tcp_portmon 1 65535 lservice 2}
${goto 240}${tcp_portmon 1 65535 rhost 3}${goto 540}${tcp_portmon 1 65535 lservice 3}
${goto 240}${tcp_portmon 1 65535 rhost 4}${goto 540}${tcp_portmon 1 65535 lservice 4}
${goto 240}${tcp_portmon 1 65535 rhost 5}${goto 540}${tcp_portmon 1 65535 lservice 5}
${goto 240}${tcp_portmon 1 65535 rhost 6}${goto 540}${tcp_portmon 1 65535 lservice 6}
${goto 240}${tcp_portmon 1 65535 rhost 7}${goto 540}${tcp_portmon 1 65535 lservice 7}
${goto 240}${tcp_portmon 1 65535 rhost 8}${goto 540}${tcp_portmon 1 65535 lservice 8}
${goto 240}${tcp_portmon 1 65535 rhost 9}${goto 540}${tcp_portmon 1 65535 lservice 9}
${goto 240}${tcp_portmon 1 65535 rhost 10}${goto 540}${tcp_portmon 1 65535 lservice 10}
${goto 240}${tcp_portmon 1 65535 rhost 11}${goto 540}${tcp_portmon 1 65535 lservice 11}
${goto 240}${tcp_portmon 1 65535 rhost 12}${goto 540}${tcp_portmon 1 65535 lservice 12}
${goto 240}${tcp_portmon 1 65535 rhost 13}${goto 540}${tcp_portmon 1 65535 lservice 13}
${goto 240}${tcp_portmon 1 65535 rhost 14}${goto 540}${tcp_portmon 1 65535 lservice 14}
${goto 240}${tcp_portmon 1 65535 rhost 15}${goto 540}${tcp_portmon 1 65535 lservice 15}
${goto 240}${tcp_portmon 1 65535 rhost 16}${goto 540}${tcp_portmon 1 65535 lservice 16}
${goto 240}${tcp_portmon 1 65535 rhost 17}${goto 540}${tcp_portmon 1 65535 lservice 17}
${goto 240}${tcp_portmon 1 65535 rhost 18}${goto 540}${tcp_portmon 1 65535 lservice 18}
${goto 240}${tcp_portmon 1 65535 rhost 19}${goto 540}${tcp_portmon 1 65535 lservice 19}
${goto 240}${tcp_portmon 1 65535 rhost 20}${goto 540}${tcp_portmon 1 65535 lservice 20}
${goto 240}${tcp_portmon 1 65535 rhost 21}${goto 540}${tcp_portmon 1 65535 lservice 21}
${goto 240}${tcp_portmon 1 65535 rhost 22}${goto 540}${tcp_portmon 1 65535 lservice 22}
${goto 240}${tcp_portmon 1 65535 rhost 23}${goto 540}${tcp_portmon 1 65535 lservice 23}

et le petit script pour calculer le % d'oc :

#!/bin/bash

FREQ=`cat /proc/cpuinfo | grep "MHz" -m1 | awk '{ print $4 }' | awk -F. '{ print $1 }'`
OC=$((220000/$FREQ))
echo $OC

exit 0

et enfin le lanceur :

#!/bin/bash

if pidof conky | grep [0-9] > /dev/null
    then
        killall conky &&
        sleep 30 &&
        conky -d -c ~/.conky/conkyrc &&
	conky -d -c ~/.conky/conkyrc-ports &
    else
        conky -d -c ~/.conky/conkyrc &&
	conky -d -c ~/.conky/conkyrc-ports &
fi

exit 0

done

Et accessoirement, j'ai un problème : comme au fil des heures conky grignote la RAM, j'ai fait un cron pour le relancer toutes les 4 heures.
Mais, impossible de le faire fonctionner ! Le cron tue conky, mais je n'ai jamais réussi à le faire relancer...
Exemple d'une des nombreuses commandes que j'ai testé :

0 0-23/4 * * * killall conky && sleep 10 && conky -d -c ~/.conky/conkyrc && conky -d -c ~/.conky/conkyrc-ports &

j'ai aussi essayé de lui faire lancer juste conky, un script fait pour lancer conky, etc... Sans succès :'(

Dernière modification par Jikan (Le 24/11/2009, à 16:18)


La vérité, c'est que tu es mou et paresseux. Tout le portrait de mon oncle Émile : celui-là, il ne passait jamais au soleil parce que ça le fatiguait de traîner son ombre.
http://jikan.fr

Hors ligne

#983 Le 24/11/2009, à 16:58

wido

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

Question pertinente:
Peut-t-on créer un fond opaque sous conky? un peu comme sous tint2

Hors ligne

#984 Le 24/11/2009, à 20:09

Dr. TUx

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

Voila mon petit Conky pour mon eeepc

conkyd.th.png

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
use_xft yes
on_bottom yes
xftfont bauhaus:pixelsize=12
xftalpha 0.8
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
double_buffer yes
minimum_size 280 5
draw_shades no
draw_outline no
draw_borders no
stippled_borders 8
border_margin 4
border_width 1
default_color #4582B5
default_shade_color black
default_outline_color black
alignment top_right
gap_x 8
gap_y 50
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
uppercase no
use_spacer no


TEXT
${color white}Bonjour John
${color white}Nous sommes le : ${time %A %d %B %Y} - ${time %H:%M:%S}

${color #e49c16}Ordinateur ${hr}
${color #e49c16}Uptime:$color $uptime ${color #FFFFFF}
${color #e49c16}CPU Utilise :${color #FFFFFF} $cpu% ${color #ffc11f}${cpubar}
${color #e49c16}CPU : Freq ${color #FFFFFF} ${freq} MHz  ${color #e49c16}Temp :${color #FFFFFF} ${hwmon 0 temp 1} c°  ${color #e49c16}Fan :${color #FFFFFF} ${hwmon 1 fan 1} Rpm
${color white}${cpugraph ffc11f 8b4b0b}
${color #e49c16}Memoire 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 #FFFFFF}En cour : $color $running_processes

${color #e49c16}Résau ${hr}
${color #FFFFFF}IP Locale ${addr wlan0} - IP Publique ${texeci 3600 wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1}
${color #e49c16}Download :${color white} ${downspeed wlan0} k/s${color white} ${offset 80}${color #e49c16}Upload:${color white} ${upspeed wlan0} k/s
${color #FFFFFF}${downspeedgraph wlan0 32,165 8b4b0b ffc11f} ${color #FFFFFF}${upspeedgraph wlan0 32,165 ffc11f 8b4b0b}

${color #e49c16}Disque ${hr}
${color #FFFFFF}Root: ${color #FFFFFF}${fs_free /}/${fs_size /} ${color #ffc11f}${fs_bar /}

Seul petit problème je n'arrive pas a avoir le fréquence du CPU en temps réel

Hors ligne

#985 Le 24/11/2009, à 21:34

[D]uplicity-[C]orp

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

wido a écrit :

Question pertinente:
Peut-t-on créer un fond opaque sous conky? un peu comme sous tint2

Ce code si non ?? Il permet de mettre un fond opaque de la couleur de ton choix.

own_window_colour

Laptop - Sony Vaio - 15,4pouce - Debian Testing (Squeeze) AMD64 - 4Go Ram - Openbox = Work, Surf, P2P, ...
Desktop - Other - 24pouce -  Windows XP PRO x64 - 1Go Ram = Abode Photoshop CS4 & Movie.
Virtualbox - Linux Host - Windows XP PRO - 2Go Ram = Abode Photoshop CS4.
Music = Quod Libet - Movie = Mpc with Vlc. (Windows)

Hors ligne

#986 Le 24/11/2009, à 22:32

wido

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

J'ai tout sauf de l'opacité

EDIT: sois il faut passer par compiz: http://ubuntuforums.org/showthread.php?t=1154948
sois par un script LUA avec une dépendance à cairo: http://conky.linux-hardcore.com/?page_id=3002

Dans tous les cas je cherche un moyen plus KISS wink

Dernière modification par wido (Le 24/11/2009, à 22:48)

Hors ligne

#987 Le 24/11/2009, à 22:42

chepioq

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

wido a écrit :

Question pertinente:
Peut-t-on créer un fond opaque sous conky? un peu comme sous tint2

Peut-être que ceci peut t'aider: http://conky.linux-hardcore.com/?page_id=3116


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

Hors ligne

#988 Le 24/11/2009, à 23:07

Levi59

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

Dr. TUx a écrit :

Voila mon petit Conky pour mon eeepc

http://img517.imageshack.us/img517/9063/conkyd.th.png

Un peu envahissant je trouve mais sympa dans les couleurs ^^

Hors ligne

#989 Le 24/11/2009, à 23:18

Boiz

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

Bonsoir à tous !

Petit soucis d'affichage pour ma part avec mon conkyForecast.template :

${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=45}[--datatype=WF]${font}
${voffset -50}${font Weather:size=40}y${font}  ${voffset -38}${font Arial Black:size=26}[--datatype=HT]${font}
${voffset 2}
${voffset 0}${goto 13}[--datatype=DW --startday=1 --shortweekday] ${goto 59}[--datatype=DW --startday=2 --shortweekday] ${goto 105}[--datatype=DW --startday=3 --shortweekday] ${goto 150}[--datatype=DW --startday=4 --shortweekday]
${voffset 0}${font ConkyWeather:size=28}[--datatype=WF --startday=1 --endday=4 --spaces=1]${font}
${voffset 0}${goto 8}[--datatype=HT --startday=1 --hideunits --centeredwidth=3]/[--datatype=LT --startday=1 --hideunits --centeredwidth=3] ${goto 53}[--datatype=HT --startday=2 --hideunits --centeredwidth=3]/[--datatype=LT --startday=2 --hideunits --centeredwidth=3] ${goto 98}[--datatype=HT --startday=3 --hideunits --centeredwidth=3]/[--datatype=LT --startday=3 --hideunits --centeredwidth=3] ${goto 145}[--datatype=HT --startday=4 --hideunits --centeredwidth=3]/[--datatype=LT --startday=4 --hideunits --centeredwidth=3]
${voffset -10}

conkyx.th.png

Vous pouvez remarquer qu'en bas du conky, les abréviations des jours et les températures ne sont pas alignés avec les nuages..

Comment y remédier s'il vous plaît ??

#990 Le 24/11/2009, à 23:34

wido

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

j'aurais bien voulu avoir la même chose que ça:
http://farm4.static.flickr.com/3276/302 … beb4_b.jpg

Hors ligne

#991 Le 24/11/2009, à 23:40

[D]uplicity-[C]orp

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

wido a écrit :

J'ai tout sauf de l'opacité

EDIT: sois il faut passer par compiz: http://ubuntuforums.org/showthread.php?t=1154948
sois par un script LUA avec une dépendance à cairo: http://conky.linux-hardcore.com/?page_id=3002

Dans tous les cas je cherche un moyen plus KISS wink

Ok, tu as mal formulé ta question pour moi, car entre opaque et opacité "variable" y a un pont. smile
Opaque veux dire couleur pleine pour moi.

Mtn je comprend ce que tu veus faire. Je voulais aussi le faire, pour ainsi suivre Tint2.
Pour l'opacité variable, j'ai regardé les codes dispo mais rien a faire pour le moment ce n'est pas possible de le faire nativement je pense.

Donc j'ai tranché. Tint2 et Conky opaque comme ca plus de problème pour mes différents wallpaper.


Tout a fait d'acc pour la philo KISS. wink


Ps: Te reste la soluce conkyimage. Crée sous gimp une image avec ton opacité souhaité.
Ca reste KISS. tongue

Dernière modification par [D]uplicity-[C]orp (Le 24/11/2009, à 23:42)


Laptop - Sony Vaio - 15,4pouce - Debian Testing (Squeeze) AMD64 - 4Go Ram - Openbox = Work, Surf, P2P, ...
Desktop - Other - 24pouce -  Windows XP PRO x64 - 1Go Ram = Abode Photoshop CS4 & Movie.
Virtualbox - Linux Host - Windows XP PRO - 2Go Ram = Abode Photoshop CS4.
Music = Quod Libet - Movie = Mpc with Vlc. (Windows)

Hors ligne

#992 Le 24/11/2009, à 23:46

Boiz

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

wido a écrit :

j'aurais bien voulu avoir la même chose que ça:
http://farm4.static.flickr.com/3276/302 … beb4_b.jpg

c'est largement faisable en utilisant conky-colors
http://gnome-look.org/content/show.php?content=92328&forumpage=17

#993 Le 25/11/2009, à 00:20

wido

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

Merci pour le lien wink
[ronchon]conky-colors ce n'est juste que plusieurs scripts en python qui m'aide pas du tout et non exploitable[/ronchon]
[astuce]
Je pense que l'astuce est déjà connu, on peut utiliser sous openbox, conky comme une fenêtre, dès que l'on n'en veut plus on clique sur la petite croix et le tour est joué

ce qui faut:

own_window_type normal
own_window_hints skip_taskbar,skip_pager
own_window_title Conky #Titre de la fenêtre

et sous openbox, éditez votre menu et faites un:

conky -d -c ~/.conky/.conkyrc

.conkyrc étant votre fichier de configuration.
voir:http://img694.imageshack.us/img694/1769 … 0x1024.png
[/astuce]

Dernière modification par wido (Le 25/11/2009, à 00:24)

Hors ligne

#994 Le 25/11/2009, à 01:21

[D]uplicity-[C]orp

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

wido a écrit :

Merci pour le lien wink
[ronchon]conky-colors ce n'est juste que plusieurs scripts en python qui m'aide pas du tout et non exploitable[/ronchon]
[astuce]
Je pense que l'astuce est déjà connu, on peut utiliser sous openbox, conky comme une fenêtre, dès que l'on n'en veut plus on clique sur la petite croix et le tour est joué

ce qui faut:

own_window_type normal
own_window_hints skip_taskbar,skip_pager
own_window_title Conky #Titre de la fenêtre

et sous openbox, éditez votre menu et faites un:

conky -d -c ~/.conky/.conkyrc

.conkyrc étant votre fichier de configuration.
voir:http://img694.imageshack.us/img694/1769 … 0x1024.png
[/astuce]

Dieu que c'est laid. yikes
Avis perso bien-sur.. big_smile
Ou est ta fameuse opacité ?? Je ne vois pas le lien avec ton post de départ. roll
Ou ai-je zappé un post important ??? tongue


Laptop - Sony Vaio - 15,4pouce - Debian Testing (Squeeze) AMD64 - 4Go Ram - Openbox = Work, Surf, P2P, ...
Desktop - Other - 24pouce -  Windows XP PRO x64 - 1Go Ram = Abode Photoshop CS4 & Movie.
Virtualbox - Linux Host - Windows XP PRO - 2Go Ram = Abode Photoshop CS4.
Music = Quod Libet - Movie = Mpc with Vlc. (Windows)

Hors ligne

#995 Le 25/11/2009, à 10:02

wido

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

Pour te répondre, je n'ai pas encore trouvé ce que je cherche, l'astuce est pour ceux qui désire fermer conky sans passer par le terminal (killall conky) ou ceux qui en ont marre de voir des chiffres par tout.

Hors ligne

#996 Le 25/11/2009, à 14:49

Boiz

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

Boiz a écrit :

Bonsoir à tous !

Petit soucis d'affichage pour ma part avec mon conkyForecast.template :

${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=45}[--datatype=WF]${font}
${voffset -50}${font Weather:size=40}y${font}  ${voffset -38}${font Arial Black:size=26}[--datatype=HT]${font}
${voffset 2}
${voffset 0}${goto 13}[--datatype=DW --startday=1 --shortweekday] ${goto 59}[--datatype=DW --startday=2 --shortweekday] ${goto 105}[--datatype=DW --startday=3 --shortweekday] ${goto 150}[--datatype=DW --startday=4 --shortweekday]
${voffset 0}${font ConkyWeather:size=28}[--datatype=WF --startday=1 --endday=4 --spaces=1]${font}
${voffset 0}${goto 8}[--datatype=HT --startday=1 --hideunits --centeredwidth=3]/[--datatype=LT --startday=1 --hideunits --centeredwidth=3] ${goto 53}[--datatype=HT --startday=2 --hideunits --centeredwidth=3]/[--datatype=LT --startday=2 --hideunits --centeredwidth=3] ${goto 98}[--datatype=HT --startday=3 --hideunits --centeredwidth=3]/[--datatype=LT --startday=3 --hideunits --centeredwidth=3] ${goto 145}[--datatype=HT --startday=4 --hideunits --centeredwidth=3]/[--datatype=LT --startday=4 --hideunits --centeredwidth=3]
${voffset -10}

http://img692.imageshack.us/img692/5797/conkyx.th.png

Vous pouvez remarquer qu'en bas du conky, les abréviations des jours et les températures ne sont pas alignés avec les nuages..

Comment y remédier s'il vous plaît ??

UP ! Quelqu'un a-t'il une idée ??

#997 Le 25/11/2009, à 15:51

RegisBurin

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

Vous pouvez remarquer qu'en bas du conky, les abréviations des jours et les températures ne sont pas alignés avec les nuages..

Comment y remédier s'il vous plaît ??

Impossible de te donner précisément les valeurs à modifier mais... joues avec les {goto} et {offset}

- Fais une copie de ce conkyrc
- Modifies un des {goto} ou {offset} et voies ce qu'il se passe...

Alors au début, tu galère, puis au bout d'un moment, tu commence à comprendre comment tout ça s'organise, et tu peux enfin faire ce que tu veux

Dsl de pas pouvoir te donner d'aide en "valeurs" (car c'est dépendant de la taille d'écran, résolution, placement du conky, etc...) mais conky c'est que ça au niveau mise en page: Du tatonnement

Quand même quelques pistes et conseils:
{goto x} place la variable qui suit à x pixels du bord gauche (c'est un placement "absolu")
{offset x} place la variable qui suit à x pixels à gauche de la variable qui précède (c'est un placement "relatif")
{voffset x} place la variable qui suit à x pixels vers le haut par rapport à la variable qui précède (c'est un placement "relatif")

Tu peux aussi donner des valeurs négatives à x (permet un placement relatif/absolu vers la droite/le bas

Dans ton cas, 2 solutions.
Réduire les {goto} des nuages (pour les ramener vers la gauche)
ou
Augmenter les {goto} des jours/Températures (pour les ramener vers la droite)

Espérant que tu ais saisi... Je te promet que c'est un "monde de merde" les 15 premières minutes, mais une fois que tu as saisi, ça permet de TOUT faire (en terme de mise en page...) voir même des chevauchements...

Dernière modification par RegisBurin (Le 25/11/2009, à 15:54)


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

#998 Le 25/11/2009, à 17:02

Boiz

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

RegisBurin a écrit :

Vous pouvez remarquer qu'en bas du conky, les abréviations des jours et les températures ne sont pas alignés avec les nuages..

Comment y remédier s'il vous plaît ??

Impossible de te donner précisément les valeurs à modifier mais... joues avec les {goto} et {offset}

- Fais une copie de ce conkyrc
- Modifies un des {goto} ou {offset} et voies ce qu'il se passe...

Alors au début, tu galère, puis au bout d'un moment, tu commence à comprendre comment tout ça s'organise, et tu peux enfin faire ce que tu veux

Dsl de pas pouvoir te donner d'aide en "valeurs" (car c'est dépendant de la taille d'écran, résolution, placement du conky, etc...) mais conky c'est que ça au niveau mise en page: Du tatonnement

Quand même quelques pistes et conseils:
{goto x} place la variable qui suit à x pixels du bord gauche (c'est un placement "absolu")
{offset x} place la variable qui suit à x pixels à gauche de la variable qui précède (c'est un placement "relatif")
{voffset x} place la variable qui suit à x pixels vers le haut par rapport à la variable qui précède (c'est un placement "relatif")

Tu peux aussi donner des valeurs négatives à x (permet un placement relatif/absolu vers la droite/le bas

Dans ton cas, 2 solutions.
Réduire les {goto} des nuages (pour les ramener vers la gauche)
ou
Augmenter les {goto} des jours/Températures (pour les ramener vers la droite)

Espérant que tu ais saisi... Je te promet que c'est un "monde de merde" les 15 premières minutes, mais une fois que tu as saisi, ça permet de TOUT faire (en terme de mise en page...) voir même des chevauchements...

Merci pour ta réponse ! J'utilise conky depuis 4-5 mois et je peux pas m'empêcher d'y toucher !
Je vais donc toucher aux gotos, je poste mon screen ensuite !

Mercii!

#999 Le 25/11/2009, à 17:11

RegisBurin

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

De rien...

Je me suis vu, au bout d'un moment, pour m'organiser, dessiner mon conky sur une feuille de papier... Ou j'ai dessiné tous les éléments sous forme de boite (avec leur taille x,y)... Il y avait des cotes partout, mais au final ça m'a bien aidé de le poser sur papier...

Incroyable, mais vrai


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

#1000 Le 25/11/2009, à 17:57

JB-home

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

tueur d'arbre

Hors ligne