Vos Conky
Postez ici vos conkys ou des petits bouts et demandes d'aide.
Discussions Libres

loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
Reprise du message précédent
.gif)
Suite et fin pour radiotray
le conkyrc :
Code TEXT :
background yes use_xft yes xftfont URW Chancery L:style=Bold:size=11 xftalpha 1 update_interval 1.0 total_run_times 0 own_window yes own_window_transparent yes #own_window_color 000000 own_window_argb_visual yes #own_window_argb_value 0 own_window_type normal own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky double_buffer yes minimum_size 250 250 maximum_width 250 text_buffer_size 2048 draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color white default_outline_color white alignment top_right gap_x 0 gap_y 600 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale yes imlib_cache_size 0 # Fonctionne uniquement avec les polices Fixes #use_spacer yes # Taille des pointillés stippled_borders 5 # Couleurs default_color FFFFFF #blanc default_shade_color 333333 default_outline_color black color1 ffffff # color2 e8e8e8 # color3 6495ee # color4 cacaca # color5 e7e7e7 # color6 red lua_load ~/.conky/draw_bg/draw_bg.lua lua_load ~/.conky/conky-meteo/meteo_lua_2/scripts/meteo2.lua TEXT ${voffset -30}${font URW Chancery L:style=Bold:size=20}${alignc}Radiotray ${font} Radio : ${alignc}${font URW Chancery L:style=Bold:size=12}${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}$font ${alignc}${voffset 50}En ce moment : ${font URW Chancery L:style=Bold:size=10}${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w40 } ${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w40 > ~/.conky/radiotray/artiste_titre.txt} ${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "RTL"}${lua fDrawImage ~/.conky/radiotray/logos/rtl.png 100 50 50 50}${else} ${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "HOTMIX80"}${lua fDrawImage ~/.conky/radiotray/logos/hotmix-80.png 100 50 50 50}${else} ${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "MAXI80"}${lua fDrawImage ~/.conky/radiotray/logos/maxi80.png 100 50 50 50}${else} ${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "RTL2"}${lua fDrawImage ~/.conky/radiotray/logos/rtl2.png 100 50 50 50}${else} ${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "MAGNUM LA RADIO"}${lua fDrawImage ~/.conky/radiotray/logos/magnumradio.png 40 50 150 50}${else} ${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "LOUNGERADIO"}${lua fDrawImage ~/.conky/radiotray/logos/image.png 100 50 50 50}${else} ${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "RFM"}${lua fDrawImage ~/.conky/radiotray/logos/rfm.png 100 50 50 50}${endif} ${endif}${endif}${endif}${endif}${endif}${endif} ${execi 10 ~/.conky/radiotray/pochette.sh} ${lua fDrawImage ~/.conky/radiotray/pochette.png 80 150 100 100} ${voffset -1000}
le pochette.sh(@ mettre dans le dossier radiotray):
Code TEXT :
#bin/bash titre=$(head -1 ~/.conky/radiotray/artiste_titre.txt) lienMiniature=$(wget -U'Googlebot-Image/1.0' -qO - "www.google.fr/search?q=$titre&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!') wget -qO miniatureGoogleImage $lienMiniature convert ~/miniatureGoogleImage ~/.conky/radiotray/pochette.png

.gif)
Édité par loutch Le 08/07/2015 à 23h38
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
les Conky est trop sympas,je vais poster mine
Edition Adrien.D ven. août 7 07:35:53 CEST 2015 : Suppression des pubs
Édité par poppy062 Le 07/08/2015 à 05h33

loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
.gif)
Un simple
Code TEXT :
background yes use_xft yes xftfont URW Chancery L:style=Bold:size=10 xftalpha 1 update_interval 1.0 total_run_times 0 own_window yes own_window_transparent yes own_window_argb_visual yes own_window_type normal own_window_hints undecorated,below,skip_taskbar,skip_pager double_buffer yes minimum_size 700 50 maximum_width 700 text_buffer_size 2048 draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color ffffff default_outline_color black alignment top_left gap_x 50 gap_y 780 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale yes # Fonctionne uniquement avec les polices Fixes #use_spacer yes imlib_cache_size 0 uppercase no TEXT ${voffset 20}${color EAEAEA}${font GE Inspira:pixelsize=120}${time %H:%M}${font}${voffset -84}${offset 10}${color FFA300}${font GE Inspira:pixelsize=42}${time %d} ${voffset -15}${color EAEAEA}${font GE Inspira:pixelsize=22}${time %B} ${time %Y}${font}${voffset 24}${font GE Inspira:pixelsize=58}${offset -148}${time %A}${font} ${voffset 10}${offset 12}${font Ubuntu:pixelsize=12}${color FFA300}HD ${offset 9}$color${fs_free /} / ${fs_size /}${offset 30}${color FFA300}RAM ${offset 9}$color$mem / $memmax${offset 30}${color FFA300}CPU ${offset 9}$color${cpu cpu0}% ${voffset 70}

.gif)
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX

Adrien.D Membre non connecté
-
- Voir le profil du membre Adrien.D
- Inscrit le : 30/05/2011
- Site internet
- Groupes :

J'aime bien

Config : PC Fixe : X470 GAMING PRO- AMD Ryzen 5 2600X - 16Go RAM - Radeon RX 560 (Pilote libre) - Gentoo Linux - GNOME Desktop - Kernel 5.10 LTS
Ancien Webmaster de MageiaLinuxOnline. Les remplaçants assurent !
Ancien Webmaster de MageiaLinuxOnline. Les remplaçants assurent !


loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX

loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
.gif)
Un petit avec du lua genre équalizer :
Code :
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 400 250
maximum_width 400
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
default_outline_color black
alignment tl
gap_x 20
gap_y 60
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes {color 87C9FF}
imlib_cache_size 0
uppercase no
lua_load ~/.conky/dna/lua/conky_eq.lua
lua_draw_hook_pre main_bars
TEXT
${voffset 20} ${goto 8}cpu ${goto 40}temp ${goto 77}carte ${goto 110}ram ${goto 144}home ${goto 182}root ${goto 215}down ${goto 256}up ${goto 287}wifi ${goto 318}disque
${goto 9}${cpu cpu0}% ${goto 40}${exec expr `cat /sys/class/hwmon/hwmon2/temp1_input` / 1000}°C ${goto 77}${acpitemp} C ${goto 110}${memperc}% ${goto 144}${fs_used_perc /home}% ${goto 182}${fs_free_perc}% ${goto 218}${downspeedf wlp2s0} ${goto 254}${upspeedf wlp2s0} ${goto 289}${wireless_link_qual_perc wlp2s0}% ${goto 320}${execi 120 hddtemp -n /dev/sda} °C
le lua :
Code :
--[[ Equalizer modified by plusdm 2012
Parameters are :
3 parameters are mandatory
name - the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"
arg - the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"
arg can be a numerical value if name=""
max - the maximum value the above variable can reach, for example, for {$cpu cpu0}, just write max=100
Optional parameters:
x,y - coordinates of the starting point of the bar, default = middle of the conky window
cap - end of cap line, possibles values are r,b,s (for round, butt, square), default="b"
http://www.cairographics.org/samples/set_line_cap/
angle - angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)
set to 90 for an horizontal bar
skew_x - skew bar around x axis, default = 0
skew_y - skew bar around y axis, default = 0
blocks - number of blocks to display for a bar (values >0) , default= 10
height - height of a block, default=10 pixels
width - width of a block, default=20 pixels
space - space between 2 blocks, default=2 pixels
angle_bar - this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0
radius - for cicular bars, internal radius, default=0
with radius, parameter width has no more effect.
Colours below are defined into braces {colour in hexadecimal, alpha}
fg_colour - colour of a block ON, default= {0x00FF00,1}
bg_colour - colour of a block OFF, default = {0x00FF00,0.5}
alarm - threshold, values after this threshold will use alarm_colour colour , default=max
alarm_colour - colour of a block greater than alarm, default=fg_colour
smooth - (true or false), create a gradient from fg_colour to bg_colour, default=false
mid_colour - colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}
for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add
3 colurs to gradient created by fg_colour and alarm_colour, default=no mid_colour
led_effect - add LED effects to each block, default=no led_effect
if smooth=true, led_effect is not used
possibles values : "r","a","e" for radial, parallelel, perdendicular to the bar (just try!)
led_effect has to be used with theses colours :
fg_led - middle colour of a block ON, default = fg_colour
bg_led - middle colour of a block OFF, default = bg_colour
alarm_led - middle colour of a block > ALARM, default = alarm_colour
reflection parameters, not available for circular bars
reflection_alpha - add a reflection effect (values from 0 to 1) default = 0 = no reflection
other values = starting opacity
reflection_scale - scale of the reflection (default = 1 = height of text)
reflection_length - length of reflection, define where the opacity will be set to zero
calues from 0 to 1, default =1
reflection - position of reflection, relative to a vertical bar, default="b"
possibles values are : "b","t","l","r" for bottom, top, left, right
draw_me - if set to false, text is not drawn (default = true or 1)
it can be used with a conky string, if the string returns 1, the text is drawn :
example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation version 3 (GPLv3)
]]
require 'cairo'
----------------START OF PARAMETERS ----------
function conky_main_bars()
local bars_settings={
{
name="cpu",
arg="cpu",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=5,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="exec",
arg="exec expr `cat /sys/class/hwmon/hwmon2/temp1_input` / 1000",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=40,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="hwmon",
arg="1 temp 1",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=75,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="memperc",
arg="memperc",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=110,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="fs_used_perc",
arg="/home",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=145,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="fs_used_perc",
arg="/",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=180,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="downspeedf",
arg="wlp2s0",
max=350,
alarm=160,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=215,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="upspeedf",
arg="wlp2s0",
max=100,
alarm=200,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=250,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="wireless_link_qual_perc",
arg="wlp2s0",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xffffffcc,0.80},
x=285,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
mid_colour={{0.5,0xfffff,0.60}}
},
{
name="execi",
arg="120 hddtemp -n /dev/sda",
max=100,
alarm=80,
bg_colour={0xfffff,0.08},
fg_colour={0x6699cc,0.80},
alarm_colour={0xfffffcc,0.80},
x=320,y=45,
blocks=5,
height=4,width=25,
angle=360,
smooth=true,
cap="r",
skew_y=0,
space=4,
reflection=4,
mid_colour={{0.5,0xfffff,0.60}}
},
}
-----------END OF PARAMETERS--------------
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)
--prevent segmentation error when reading cpu state
if tonumber(conky_parse('${updates}'))>3 then
for i in pairs(bars_settings) do
draw_multi_bar_graph(bars_settings[i])
end
end
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end
function draw_multi_bar_graph(t)
cairo_save(cr)
--check values
if t.draw_me == true then t.draw_me = nil end
if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
if t.name==nil and t.arg==nil then
print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ")
return
end
if t.max==nil then
print ("No maximum value defined, use 'max'")
return
end
if t.name==nil then t.name="" end
if t.arg==nil then t.arg="" end
--set default values
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.blocks == nil then t.blocks=10 end
if t.height == nil then t.height=10 end
if t.angle == nil then t.angle=0 end
t.angle = t.angle*math.pi/180
--line cap style
if t.cap==nil then t.cap = "b" end
local cap="b"
for i,v in ipairs({"s","r","b"}) do
if v==t.cap then cap=v end
end
local delta=0
if t.cap=="r" or t.cap=="s" then delta = t.height end
if cap=="s" then cap = CAIRO_LINE_CAP_SQUARE
elseif cap=="r" then
cap = CAIRO_LINE_CAP_ROUND
elseif cap=="b" then
cap = CAIRO_LINE_CAP_BUTT
end
--end line cap style
--if t.led_effect == nil then t.led_effect="r" end
if t.width == nil then t.width=20 end
if t.space == nil then t.space=2 end
if t.radius == nil then t.radius=0 end
if t.angle_bar == nil then t.angle_bar=0 end
t.angle_bar = t.angle_bar*math.pi/360 --halt angle
--colours
if t.bg_colour == nil then t.bg_colour = {0x00FF00,0.5} end
if #t.bg_colour~=2 then t.bg_colour = {0x00FF00,0.5} end
if t.fg_colour == nil then t.fg_colour = {0x00FF00,1} end
if #t.fg_colour~=2 then t.fg_colour = {0x00FF00,1} end
if t.alarm_colour == nil then t.alarm_colour = t.fg_colour end
if #t.alarm_colour~=2 then t.alarm_colour = t.fg_colour end
if t.mid_colour ~= nil then
for i=1, #t.mid_colour do
if #t.mid_colour[i]~=3 then
print ("error in mid_color table")
t.mid_colour[i]={1,0xFFFFFF,1}
end
end
end
if t.bg_led ~= nil and #t.bg_led~=2 then t.bg_led = t.bg_colour end
if t.fg_led ~= nil and #t.fg_led~=2 then t.fg_led = t.fg_colour end
if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end
if t.led_effect~=nil then
if t.bg_led == nil then t.bg_led = t.bg_colour end
if t.fg_led == nil then t.fg_led = t.fg_colour end
if t.alarm_led == nil then t.alarm_led = t.fg_led end
end
if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
if t.smooth == nil then t.smooth = false end
if t.skew_x == nil then
t.skew_x=0
else
t.skew_x = math.pi*t.skew_x/180
end
if t.skew_y == nil then
t.skew_y=0
else
t.skew_y = math.pi*t.skew_y/180
end
if t.reflection_alpha==nil then t.reflection_alpha=0 end
if t.reflection_length==nil then t.reflection_length=1 end
if t.reflection_scale==nil then t.reflection_scale=1 end
--end of default values
local function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end
--functions used to create patterns
local function create_smooth_linear_gradient(x0,y0,x1,y1)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end
local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end
local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
return pat
end
local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
if mode==3 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
else
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
end
return pat
end
local function draw_single_bar()
--this fucntion is used for bars with a single block (blocks=1) but
--the drawing is cut in 3 blocks : value/alarm/background
--not zvzimzblr for circular bar
local function create_pattern(col_alp,col_led,bg)
local pat
if not t.smooth then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
elseif t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))
end
else
if bg then
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(t.bg_colour))
else
pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
end
end
return pat
end
local y1=-t.height*pct/100
local y2,y3
if pct>(100*t.alarm/t.max) then
y1 = -t.height*t.alarm/100
y2 = -t.height*pct/100
if t.smooth then y1=y2 end
end
if t.angle_bar==0 then
--block for fg value
local pat = create_pattern(t.fg_colour,t.fg_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,0,t.width,y1)
cairo_fill(cr)
cairo_pattern_destroy(pat)
-- block for alarm value
if not t.smooth and y2 ~=nil then
pat = create_pattern(t.alarm_colour,t.alarm_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,y1,t.width,y2-y1)
cairo_fill(cr)
y3=y2
cairo_pattern_destroy(pat)
else
y2,y3=y1,y1
end
-- block for bg value
cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
pat = create_pattern(t.bg_colour,t.bg_led,true)
cairo_set_source(cr,pat)
cairo_pattern_destroy(pat)
cairo_fill(cr)
end
end --end single bar
local function draw_multi_bar()
--function used for bars with 2 or more blocks
for pt = 1,t.blocks do
--set block y
local y1 = -(pt-1)*(t.height+t.space)
local light_on=false
--set colors
local col_alp = t.bg_colour
local col_led = t.bg_led
if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
if pct>=(pcb*(pt-1)) then
light_on = true
col_alp = t.fg_colour
col_led = t.fg_led
if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then
col_alp = t.alarm_colour
col_led = t.alarm_led
end
end
end
--set colors
--have to try to create gradients outside the loop ?
local pat
if not t.smooth then
if t.angle_bar==0 then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)
elseif t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))
end
else
if t.led_effect=="a" then
pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
0, 0, t.radius+(t.height+t.space)*(pt),
col_alp,col_led,3)
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))
end
end
else
if light_on then
if t.angle_bar==0 then
pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
else
pat = create_smooth_radial_gradient(0, 0, (t.height+t.space), 0,0,(t.blocks+1)*(t.height+t.space),2)
end
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(t.bg_colour))
end
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)
--draw a block
if t.angle_bar==0 then
cairo_move_to(cr,0,y1)
cairo_line_to(cr,t.width,y1)
else
cairo_arc( cr,0,0,
t.radius+(t.height+t.space)*(pt)-t.height/2,
-t.angle_bar -math.pi/2 ,
t.angle_bar -math.pi/2)
end
cairo_stroke(cr)
end
end
local function setup_bar_graph()
--function used to retrieve the value to display and to set the cairo structure
if t.blocks ~=1 then t.y=t.y-t.height/2 end
local value = 0
if t.name ~="" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
--$to_bytes doesn't work when value has a decimal point,
--https://garage.maemo.org/plugins/ggit/browse.php/?p=monky;a=commitdiff;h=174c256c81a027a2ea406f5f37dc036fac0a524b;hp=d75e2db5ed3fc788fb8514121f67316ac3e5f29f
--http://sourceforge.net/tracker/index.php?func=detail&aid=3000865&group_id=143975&atid=757310
--conky bug?
--value = (conky_parse(string.format('${%s %s}', t.name, t.arg)))
--if string.match(value,"%w") then
-- value = conky_parse(string.format('${to_bytes %s}',value))
--end
else
value = tonumber(t.arg)
end
if value==nil then value =0 end
pct = 100*value/t.max
pcb = 100/t.blocks
cairo_set_line_width (cr, t.height)
cairo_set_line_cap (cr, cap)
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle)
local matrix0 = cairo_matrix_t:create()
tolua.takeownership(matrix0)
cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
cairo_transform(cr,matrix0)
--call the drawing function for blocks
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
else
draw_multi_bar()
end
--dot for reminder
--[[
if t.blocks ~=1 then
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
cairo_fill(cr)
else
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,0,3,0,2*math.pi)
cairo_fill(cr)
end]]
--call the drawing function for reflection and prepare the mask used
if t.reflection_alpha>0 and t.angle_bar==0 then
local pat2
local matrix1 = cairo_matrix_t:create()
tolua.takeownership(matrix1)
if t.angle_bar==0 then
pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
if t.reflection=="t" then
cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
elseif t.reflection=="r" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
elseif t.reflection=="l" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
else --bottom
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
end
end
cairo_transform(cr,matrix1)
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
cairo_translate(cr,0,-t.height/2)
else
draw_multi_bar()
end
cairo_set_line_width(cr,0.01)
cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
if t.angle_bar==0 then
cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
end
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
end --reflection
pct,pcb=nil
end --setup_bar_graph()
--start here !
setup_bar_graph()
cairo_restore(cr)
end
il faudra modifier la partie internet dans le conkyrc et dans le lua en fonction de votre configuration.

.gif)
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX

BlackHawk Membre non connecté
-
- Voir le profil du membre BlackHawk
- Inscrit le : 05/02/2010
Sous rosa linux il y a d'entrée un petit utilitaire d'installé : conky manager il est proposé dans les choix

Édité par BlackHawk Le 30/08/2015 à 10h29
Francophonie et frères d'Alliance
https://www.youtube.com/watch?v=QpXEOZe--aw&list=PLC26AE5B3B6910E6D
Comment des politiques , des hauts fonctionnaires, des banquiers ont endetté la France !
https://www.youtube.com/watch?v=bTq6XyP1n_g
https://www.youtube.com/watch?v=QpXEOZe--aw&list=PLC26AE5B3B6910E6D
Comment des politiques , des hauts fonctionnaires, des banquiers ont endetté la France !
https://www.youtube.com/watch?v=bTq6XyP1n_g

Nagineau Membre non connecté
-
- Voir le profil du membre Nagineau
- Inscrit le : 16/09/2015

loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
.gif)
Pour ceux qui utilise Music On Console (moc)
Le script qui lance le conky et mocp avec son interface dans la console( remplacer konsole par console ou autre suivant votre environnement)
Code :
#!/bin/bash
PROG_NAME1="conky -c /home/$USER/.conky/moc/conkyrc" # Nom du programme à démarrer/arrêter.
PROG_NAME2="/usr/bin/konsole -e /usr/bin/mocp" # Nom du programme à démarrer/arrêter.
PROCESSPID1=$(pgrep -f /home/$USER/.conky/moc/conkyrc) # Récupère le PID du processus.
PROCESSPID2=$(pgrep -f "/usr/bin/mocp") # Récupére le PID du processus.
if [[ "$PROCESSPID1" != "" && "$PROCESSPID2" != "" ]]; then # Si les deux processus existe alors on le(s) kill.
kill $PROCESSPID1 && echo "Stop $PROG_NAME1 (PID: $PROCESSPID1)"
kill $PROCESSPID2 && echo "Stop $PROG_NAME2 (PID: $PROCESSPID2)"
else # Si aucun processus on démarre le programme.
kill $PROCESSPID1
$PROG_NAME1 &
echo "Start $PROG_NAME1"
kill $PROCESSPID2
$PROG_NAME2 &
echo "Start $PROG_NAME2"
if [[ "$PROCESSPID1" == "" || "$PROCESSPID2" == "" ]]; then # Si un des processus n'existe pas alors on le(s) kill.
kill $PROCESSPID1 && echo "Stop $PROG_NAME1 (PID: $PROCESSPID1)"
kill $PROCESSPID2 && echo "Stop $PROG_NAME2 (PID: $PROCESSPID2)"
echo "Il y a eu un souci au lancement tout a été coupé"
fi
fi
exit 0
le conkyrc:
Code :
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 310 500
maximum_width 310
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff #ffd579
default_outline_color black
default_bar_size 230 6
alignment tl
gap_x 0
gap_y 200
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0
uppercase no
TEXT
${font URW Chancery L:style=Bold:size=20}${alignc}Music On Console $font
Artiste : ${goto 150}${moc_artist}
Album : ${goto 150}${moc_album}
Titre : ${goto 150}${moc_song}
${goto 40}${execbar mocp -Q '%cs/%ts*100' | bc -l}
${voffset -20}0:00 ${goto 280}${moc_totaltime}
${goto 140}${moc_curtime}

avec la fenêtre réduite:

.gif)
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX

loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
.gif)
Conky lune prendre le pack ici: http://bit.ly/4_2-6-15 du site "bunsenlabs" à décompresser dans votre home.
J'y ais intégré du lua (pour ceux qui on un fond d'écran clair) les images passent mieux et traduit en françois .
le conkyrc :
Code :
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 410 250
maximum_width 410
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white #dbc38f
default_outline_color black
alignment tr
gap_x 00
gap_y 620
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0
uppercase no
lua_load ~/.conky/lua/image.lua
TEXT
${texeci 500 bash $HOME/4_Moon/moon_MoonGiant}
${voffset 90}${alignc 10}${execpi 600 sed -n '7p' $HOME/4_Moon/raw | awk '{print $1}'}
${alignc 10}${execpi 600 sed -n '7p' $HOME/4_Moon/raw | awk '{print $2}'}
${alignc 10}${execpi 600 sed -n '1p' $HOME/4_Moon/raw}
${voffset -60}${goto 25}${execi 3600 echo `date --date="-2 day" | awk '{print $3" "$2}'`}
${goto 92}${execi 3600 echo `date --date="-1 day" | awk '{print $3" "$2}'`}
${goto 277}${execi 3600 echo `date --date="+1 day" | awk '{print $3" "$2}'`}
${goto 350}${execi 3600 echo `date --date="+2 day" | awk '{print $3" "$2}'`}
${voffset -5}${goto 25}${execpi 600 sed -n '19p' $HOME/4_Moon/raw | awk '{print $1}'}
${goto 92}${execpi 600 sed -n '27p' $HOME/4_Moon/raw | awk '{print $1}'}
${goto 277}${execpi 600 sed -n '35p' $HOME/4_Moon/raw | awk '{print $1}'}
${goto 350}${execpi 600 sed -n '43p' $HOME/4_Moon/raw | awk '{print $1}'}
${voffset -5}${goto 20}${execpi 600 sed -n '19p' $HOME/4_Moon/raw | awk '{print $2}'}
${goto 87}${execpi 600 sed -n '27p' $HOME/4_Moon/raw | awk '{print $2}'}
${goto 272}${execpi 600 sed -n '35p' $HOME/4_Moon/raw | awk '{print $2}'}
${goto 347}${execpi 600 sed -n '43p' $HOME/4_Moon/raw | awk '{print $2}'}
${voffset -5}${goto 30}${execpi 600 sed -n '13p' $HOME/4_Moon/raw}
${goto 100}${execpi 600 sed -n '21p' $HOME/4_Moon/raw}
${goto 280}${execpi 600 sed -n '29p' $HOME/4_Moon/raw}
${goto 355}${execpi 600 sed -n '37p' $HOME/4_Moon/raw}
${alignc}Details
Visibilitée: ${execpi 600 sed -n '1p' $HOME/4_Moon/raw} % ${goto 250}Age lune: ${execpi 600 sed -n '5p' $HOME/4_Moon/raw} jours
Angle soleil: ${execpi 600 sed -n '2p' $HOME/4_Moon/raw} ° ${goto 250}Angle lune: ${execpi 600 sed -n '6p' $HOME/4_Moon/raw} °
Distance soleil: ${execpi 600 sed -n '3p' $HOME/4_Moon/raw} kms ${goto 250}Distance lune: ${execpi 600 sed -n '4p' $HOME/4_Moon/raw} kms
${lua fDrawImage ~/4_Moon/-2.png 10 65 60 60}
${lua fDrawImage ~/4_Moon/-1.png 80 65 60 60}
${lua fDrawImage ~/4_Moon/0.png 157 35 90 90}
${lua fDrawImage ~/4_Moon/1.png 265 65 60 60}
${lua fDrawImage ~/4_Moon/2.png 340 65 60 60}
${voffset -500}
le moon_MoonGiant (rendu éxécutable ) aussi en françois:
Code :
#!/bin/bash
#function: moonrise_set
moonrise_set () {
case "$1" in
"FirstQuarter")
echo "Noon/Midnight"
cp $HOME/4_Moon/riseicons/rise_FirstQuarter.jpg $HOME/4_Moon/rise.jpg
;;
"FullMoon")
echo "6PM/6AM"
cp $HOME/4_Moon/riseicons/rise_FullMoon.jpg $HOME/4_Moon/rise.jpg
;;
"LastQuarter")
echo "Midnight/Noon"
p $HOME/4_Moon/riseicons/rise_LastQuarter.jpg $HOME/4_Moon/rise.jpg
;;
"NewMoon")
echo "6AM/6PM"
cp $HOME/4_Moon/riseicons/rise_NewMoon.jpg $HOME/4_Moon/rise.jpg
;;
"WaningCrescent")
echo "3AM/3PM"
cp $HOME/4_Moon/riseicons/rise_WaningCrescent.jpg $HOME/4_Moon/rise.jpg
;;
"WaningGibbous")
echo "9PM/9AM"
cp $HOME/4_Moon/riseicons/rise_WaningGibbous.jpg $HOME/4_Moon/rise.jpg
;;
"WaxingCrescent")
echo "9AM/9PM"
cp $HOME/4_Moon/riseicons/rise_WaxingCrescent.jpg $HOME/4_Moon/rise.jpg
;;
"WaxingGibbous")
echo "3PM/3AM"
cp $HOME/4_Moon/riseicons/rise_WaxingGibbous.jpg $HOME/4_Moon/rise.jpg
;;
*)
echo "Unavailable"
esac
}
kill -STOP $(pidof conky)
killall wget
#put your hemisphere here: north or south
hemisphere=north
wget -O $HOME/4_Moon/raw "http://www.moongiant.com/phase/today"
rm $HOME/4_Moon/*.png $HOME/4_Moon/*.jpg
sed -i -e '/^ *$/d' -e 's/^ *//g' $HOME/4_Moon/raw
sed -i '/var jArray=|"todayMoonContainer"|"moonNotToday"/!d' $HOME/4_Moon/raw
sed -i -e '/var jArray/s/","/n/g' -e 's/<span>|<b>|<\/span>|<\/b>|\n//g' /$HOME/4_Moon/raw
sed -i 's/"].*["/n/g' /$HOME/4_Moon/raw
sed -i '/var jArray/d' /$HOME/4_Moon/raw
sed -i -e 's/"]};//g' -e 's/^.*today_phase///g' -e 's/.jpg.*$//g' /$HOME/4_Moon/raw
sed -i -e 's/^small///g' -e 's/.png.*$//g' /$HOME/4_Moon/raw
sed -i 's/Illumination: |Sun Angle: |Sun Distance: |Moon Distance: |Moon Age: |Moon Angle: //g' /$HOME/4_Moon/raw
phase=$(sed -n 7p $HOME/4_Moon/raw|sed 's/ //')
mrise_mset=$(moonrise_set $phase)
sed -i 7a$(moonrise_set $phase) /$HOME/4_Moon/raw
#Day before Yesterday
img_in=$(sed -n 44p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/-2.png
#Yesterday
img_in=$(sed -n 45p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/-1.png
#Today
img_in=$(sed -n 46p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/0.png
#Tomorrow
img_in=$(sed -n 47p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/1.png
#Day after Tomorrow
img_in=$(sed -n 48p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/2.png
sed -i -e 's/New Moon/Nouvelle Lune/g' -e 's/Waxing Crescent/Lune Montante/g' -e 's/First Quarter/Premier Quartier/g' -e 's/Waxing Gibbous/Gibeuse Croissante/g' -e 's/Full Moon/Pleine Lune/g' -e 's/Waning Gibbous/Gibeuse Décroissante/g' -e 's/Last Quarter/Dernier Quartier/g' -e 's/Waning Crescent/Lune Déscendante/g' /$HOME/4_Moon/raw
kill -CONT $(pidof conky)

.gif)
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX

Lhbjjs Membre non connecté
-
- Voir le profil du membre Lhbjjs
- Inscrit le : 14/12/2015

Adrien.D Membre non connecté
-
- Voir le profil du membre Adrien.D
- Inscrit le : 30/05/2011
- Site internet
- Groupes :
Config : PC Fixe : X470 GAMING PRO- AMD Ryzen 5 2600X - 16Go RAM - Radeon RX 560 (Pilote libre) - Gentoo Linux - GNOME Desktop - Kernel 5.10 LTS
Ancien Webmaster de MageiaLinuxOnline. Les remplaçants assurent !
Ancien Webmaster de MageiaLinuxOnline. Les remplaçants assurent !


Visiteur
Visiteur
http://www.mageialinux-online.org/forum/topic-20266-9+calculate-linux-14-16-2-est-disponible.php#m204658


loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
.gif)
Conky accuweather pour les 16 prochaines heures .Les informations sont à prendre sur la page english j'ai traduit en Français ce que j'ai pu
Pour les traductions qui manquent il suffit de mettre à la suite dans le fichier 1c dans la partie traduction. Ce conky aura besoin d'etre mis à jour lors des changement d'heure (été-hivers) vu qu tztime ne prend pas tout les formats ,a moins que l'un d'entre vous puisse faire un script ou autre pour avoir les heures au format 24h.
le pack du site bunsenlabs est à prendre ici et à extraire dans le home .
http://bit.ly/1c_12-2-14
mon conkyrc modifier :
Code :
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 6.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1050 300
maximum_width 1050
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 ff0000 #LightSalmon
default_outline_color black
alignment tl
gap_x 260
gap_y 120
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0
text_buffer_size 4096
lua_load ~/.conky/lua/image.lua
# stuff after 'TEXT' will be formatted on screen
TEXT
${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}
Heures${goto 95} ${tztime Europe/Paris %H} h${goto 160} ${tztime GMT-2 %H} h${goto 220} ${tztime GMT-3 %H} h${goto 280} ${tztime GMT-4 %H} h${goto 340} ${tztime GMT-5 %H} h${goto 400} ${tztime GMT-6 %H} h${goto 460} ${tztime GMT-7 %H} h${goto 520} ${tztime GMT-8 %H} h${goto 580} ${tztime GMT-9 %H}${goto 640} ${tztime GMT-10 %H}${goto 700} ${tztime GMT-11 %H} h${goto 760} ${tztime GMT-12 %H} h${goto 820} ${tztime GMT-13 %H} h${goto 880} ${tztime GMT-14 %H} h${goto 940} ${tztime GMT-15 %H} h${goto 1000} ${tztime GMT-16 %H} h
Prévisions${color}
${goto 100}${execpi 600 sed -n '21p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 160}${execpi 600 sed -n '25p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 220}${execpi 600 sed -n '29p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 280}${execpi 600 sed -n '33p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 340}${execpi 600 sed -n '37p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 400}${execpi 600 sed -n '41p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 460}${execpi 600 sed -n '45p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 520}${execpi 600 sed -n '49p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 580}${execpi 600 sed -n '21p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 640}${execpi 600 sed -n '25p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 700}${execpi 600 sed -n '29p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 760}${execpi 600 sed -n '33p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 820}${execpi 600 sed -n '37p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 880}${execpi 600 sed -n '41p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 940}${execpi 600 sed -n '45p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 1000}${execpi 600 sed -n '49p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}
${goto 100}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 160}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 220}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 280}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 340}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 400}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 460}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 520}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr}${goto 580}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 640}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 700}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 760}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 820}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 880}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 940}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}${goto 1000}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr}
${execpi 600 sed -n '1,21p' $HOME/1c_accuweather_images_hourly/altogether}
#### icones ####
${lua fDrawImage $HOME/1c_accuweather_images_hourly/20.png 80 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/23.png 140 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/26.png 200 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/29.png 260 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/32.png 320 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/35.png 380 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/38.png 440 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/41.png 500 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/120.png 560 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/123.png 620 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/126.png 680 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/129.png 740 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/132.png 800 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/135.png 860 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/138.png 920 60 60 40}
${lua fDrawImage $HOME/1c_accuweather_images_hourly/141.png 980 60 60 40}
le fichier 1c
Code :
#!/bin/bash
#put your Accuweather address here
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
address="http://www.accuweather.com/en/fr/sarreguemines/57200/weather-forecast/135050"
loc_id=$(echo $address|sed 's//weather-forecast.*$//'|sed 's/^.*///')
last_number=$(echo $address|sed 's/^.*///')
curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
kill -STOP $(pidof conky)
killall wget
rm $HOME/1c_accuweather_images_hourly/*.png
wget --save-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/curr_cond_raw $curr_addr
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw1 $addr1
#First 8hrs - hourly_raw1 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw1 ]]; then
sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/°/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/^">|first-col">|last-col">//g' -e 's/</td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e '60,67s/^.*>//g' -e 's/^.*row">|</th>//g' -e 's/®|°//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/^.*row">|</th>//g' -e 's/®|°//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/^.*</span></div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/">/n/g' -e '/<tr|</tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/</span>
/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/</div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e '/<|;/d' -e 's/r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
for (( i=20; i<=41; i+=3 ))
do
cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1).png $HOME/1c_accuweather_images_hourly/$i.png
done
for (( i=21; i<=50; i+=3 ))
do
no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1|wc -c)
if (( no<=7 )); then
sed -i $i"s/$/n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
i=$((i+1))
elif (( no>7 )); then
sed -i $i"s/^(.{7})/1n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
i=$((i+1))
fi
done
fi
addr2=$(sed -n 1p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw2 $addr2
#Next 8hrs - hourly_raw2 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw2 ]]; then
sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/°/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/^">|first-col">|last-col">//g' -e 's/</td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e '60,67s/^.*>//g' -e 's/^.*row">|</th>//g' -e 's/®|°//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/^.*row">|</th>//g' -e 's/®|°//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/^.*</span></div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/">/n/g' -e '/<tr|</tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/</span>
/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/</div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e '/<|;/d' -e 's/r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
for (( i=20; i<=41; i+=3 ))
do
cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2).png $HOME/1c_accuweather_images_hourly/$(( $i+100 )).png
done
for (( i=21; i<=50; i+=3 ))
do
no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2|wc -c)
if (( no<=7 )); then
sed -i $i"s/$/n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
i=$((i+1))
elif (( no>7 )); then
sed -i $i"s/^(.{7})/1n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
i=$((i+1))
fi
done
fi
# Full info - altogether file
rm $HOME/1c_accuweather_images_hourly/altogether
#TEMP
echo "${color ffffff}${goto 10}${hr 1}" > $HOME/1c_accuweather_images_hourly/altogether
echo "TEMP.(°C)${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=52; i<=59; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "2s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=52; i<=59; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "2s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#REALFEEL
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "Réel.(°C)${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=61; i<=68; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "4s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=61; i<=68; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "4s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#HUMIDITY
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "HUMIDITEE${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=70; i<=77; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "6s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=70; i<=77; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "6s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#RAIN
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "PLUIE${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=79; i<=86; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "8s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=79; i<=86; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "8s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#SNOW
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "NEIGE${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=88; i<=95; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "10s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=88; i<=95; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "10s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#ICE
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "GIVRE${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=97; i<=104; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "12s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=97; i<=104; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "12s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#WIND
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "VENT(km/h)${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=106; i<=113; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "14s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=106; i<=113; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "14s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#UV INDEX
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "INDEX UV${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=115; i<=122; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "16s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=115; i<=122; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "16s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#CLOUD COVER
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "COUV. NUAGE${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=124; i<=131; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "18s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=124; i<=131; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "18s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
#DEW POINT
echo "${color ffffff}${goto 100}${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "ROSEE (°C)${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=133; i<=140; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
sed -i "20s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
for (( i=133; i<=140; i+=1 ))
do
temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
sed -i "20s/$/${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
jump_to=$(( jump_to+=60 ))
done
## English to French
cp $HOME/1c_accuweather_images_hourly/hourly_raw1 $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw1-fr ]]; then
sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/A couple of showers/Averses éparses/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Mostly Cloudy/Ciel plutôt nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Showers/Averses/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/breezy/Venteux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Rain shover/Averses de pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Light rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Mostly cloudy/Peu nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
sed -i -e 's/Mostly/Peu/' $HOME/1c_accuweather_images_hourly/hourly_raw1-fr
fi
## English to French
cp $HOME/1c_accuweather_images_hourly/hourly_raw2 $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw2-fr ]]; then
sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/A couple of showers/Averses éparses/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Mostly Cloudy/Ciel plutôt nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Showers/Averses/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/breezy/Venteux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/1c_accuweather_images_hourly/hourly_raw21-fr
sed -i -e 's/Rain shover/Averses de pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Light rain/Pluie/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Cloudy/Nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Mostly cloudy/Peu nuageux/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
sed -i -e 's/Mostly/Peu/' $HOME/1c_accuweather_images_hourly/hourly_raw2-fr
fi
kill -CONT $(pidof conky)
ce que ça donne:

.gif)
Édité par loutch Le 01/02/2016 à 08h45
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX

loutch Membre non connecté
-
- Voir le profil du membre loutch
- Inscrit le : 07/07/2010
- Groupes :
.gif)
Conky olgmen que j'ai doublé (c'est du russe)
conky de gauche
Code TEXT :
background yes use_xft yes xftfont URW Chancery L:style=Bold:size=10 xftalpha 1 imlib_cache_size 0 update_interval 1.0 total_run_times 0 own_window yes own_window_transparent yes own_window_argb_visual yes own_window_type normal own_window_hints undecorated,below,skip_taskbar,skip_pager double_buffer yes minimum_size 250 250 maximum_width 250 text_buffer_size 2048 draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color ffffff #ffd579 default_outline_color white alignment top_left gap_x 00 gap_y 00 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale yes lua_load ~/.conky/olgmen/olgmen7_1.lua lua_draw_hook_pre widgets TEXT ${voffset 90}${goto 100}${execi 6 expr `cat /sys/class/hwmon/hwmon2/temp1_input` / 1000}°C${goto 160}${execi 6 expr `cat /sys/class/hwmon/hwmon2/temp2_input` / 1000}°C ${voffset 20}${goto 60}ram: $memperc%${goto 170}hdd: ${fs_used_perc /}% ${voffset 10}${goto 100}${execi 6 expr `cat /sys/class/hwmon/hwmon2/temp3_input` / 1000}°C${goto 160}${execi 6 expr `cat /sys/class/hwmon/hwmon2/temp1_input` / 1000}°C ${voffset 80}
son olgmen_7.1.lua
Code TEXT :
--[[ При сборке скрипта использованы данные из следующих скриптов Conky Widgets by londonali1010 (2009) - часы и кольца Shadowed clock by wlourf (10 jan. 2010) - стрелки часов с тенью BARGRAPH WIDGET v1.3 by wlourf (03 march 2010) Собрал все это Борис Кринкель <olgmen> krinkel@rambler.ru Для этого серипта требуется CONKY версии 1.7.2 Для вызова этого скрипта в Conky вставьте следующие строки до TEXT (при условии, что скрипт сохранен в ~/scripts/conky_widgets.lua): lua_load ~/scripts/olgmen7_1.lua lua_draw_hook_pre widgets ]] require 'cairo' --[[ AIR CLOCK WIDGET ]] --[[ Виджет выводит изображение часов. Часть настроек находится в виджете ]] function clock(cr, x, y, s, bgc, bga, fgc, fga) -- функция перекодировки цвета function rgb_to_r_g_b(colour,alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end -- назначаем толщину выводимых линий local s_th = 2 -- рисуем циферблат local radius = s/2 local m_x,m_y = x + s/2, y + s/2 -- вывод часовых делений local i = 0 local winkel = math.rad(30) for i=0,11,1 do cairo_set_line_width(cr,s_th*1.5) cairo_move_to(cr, m_x-math.sin(winkel*i)*(radius), m_y-math.cos(winkel*i)*(radius)) cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.8), m_y-math.cos(winkel*i)*(radius*0.8)) cairo_fill_preserve(cr) cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga)) cairo_stroke(cr) end -- вывод минутных делений local i = 0 local winkel = math.rad(6) for i=0,59,1 do cairo_set_line_width(cr,1) cairo_move_to(cr, m_x-math.sin(winkel*i)*radius, m_y-math.cos(winkel*i)*radius) cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.9), m_y-math.cos(winkel*i)*(radius*0.9)) cairo_stroke(cr) end -- часовые стрелки с тенью, взято из Shadowed clock by wlourf (10 jan. 2010) function draw_hand(a_trame,arc,arc0,arc1,lg,r,border,rgb) xx = xc + clock_r*math.sin(arc)*lg yy = yc - clock_r*math.cos(arc)*lg x0 = xc + r*math.sin(arc0) y0 = yc - r*math.cos(arc0) x1 = xc + r*math.sin(arc1) y1 = yc - r*math.cos(arc1) if border ~= nil then cairo_set_line_width(cr,1) cairo_set_source_rgba(cr,border[1],border[2],border[3],0.5) cairo_move_to (cr, x0, y0) cairo_curve_to (cr, x0, y0, xx, yy, x1, y1) cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2) cairo_stroke(cr) end -- рисуем тень cairo_move_to (cr, x0, y0) cairo_curve_to (cr, x0, y0, xx+shadow_xoffset, yy+shadow_yoffset, x1, y1) cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2) pat = cairo_pattern_create_radial (xc, yc, 0, xc, yc, clock_r) cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, shadow_opacity) cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 0) cairo_set_source (cr, pat) cairo_fill (cr) -- рисуем стрелки cairo_move_to (cr, x0, y0) cairo_curve_to (cr, x0, y0, xx, yy, x1, y1) cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2) pat = cairo_pattern_create_radial (xc, yc, clock_r/10, xc, yc, clock_r*lg) cairo_pattern_add_color_stop_rgba (pat,0, rgb[1], rgb[2], rgb[3], 1) cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1) cairo_set_source (cr, pat) cairo_fill (cr) cairo_pattern_destroy (pat) end -- Здесь вводятся основные данные -- радиус часов в пикселях, задаем половину диаметра часов clock_r=s/2 -- координаты центра часов xc = x+s/2 yc = y+s/2 -- координаты источника света относительно центра часов, 0 - источник света над центром -- может быть положительным, источник света выше центра, или отрицательным shadow_xoffset=70 shadow_yoffset=70 -- прозрачность тени, значения от 0 до 1 shadow_opacity=0 -- Выводить секундную стрелку, Да - true, Нет - false. -- При выводе секундной стрелки update_interval в .conkyrc должен быть менее 1 сек. show_seconds=true -- Выводить ось стрелок в центре часов, Да - true, Нет - false. show_dot = true -- размеры стрелок, первая цифра ширина, вторая - длина rh,lgh=3,0 -- 3,1.2 aiguille heure rm,lgm=2,0 -- 2,1.75 aiguille minutes rs,lgs=1.5,2.3 -- секундная стрелка -- забираем данные из ОС local hours=os.date("%I") local mins=os.date("%M") local secs=os.date("%S") -- расчет угла движения стрелок gamma = math.pi/2-math.atan(rs/(clock_r*lgs)) secs_arc=(2*math.pi/60)*secs secs_arc0=secs_arc-gamma secs_arc1=secs_arc+gamma gamma = math.pi/2-math.atan(rm/(clock_r*lgm)) mins_arc=(2*math.pi/60)*mins + secs_arc/60 mins_arc0=mins_arc-gamma mins_arc1=mins_arc+gamma gamma = math.pi/2-math.atan(rh/(clock_r*lgh)) hours_arc=(2*math.pi/12)*hours+mins_arc/12 hours_arc0=hours_arc-gamma hours_arc1=hours_arc+gamma -- вывод стрелок draw_hand(alpha_trame,hours_arc,hours_arc0,hours_arc1,lgh,rh,{0,0,0},{1,1,1}) draw_hand(alpha_trame,mins_arc,mins_arc0,mins_arc1,lgm,rm,{0,0,0},{.9,.9,.9}) if show_seconds then draw_hand(alpha_trame,secs_arc,secs_arc0,secs_arc1,lgs,rs,{0,0,0},{.8,.8,.8}) end -- рисуем ось стрелок if show_dot then lg_shadow_center=3 radius=math.min(rh,rm,rs)*0.75 if radius<1 then radius=1 end ang = math.atan(shadow_yoffset/shadow_xoffset) -- тень от оси gamma = -math.atan(1/lg_shadow_center) ang0=ang-gamma ang1=ang+gamma end end --[[ END AIR CLOCK WIDGET ]] -- --------------------------------------------------------------------------- --[[ BARGRAPH WIDGET v1.3 by wlourf (03 march 2010) This widget draw a simple bar like (old) equalizers on hi-fi systems. http://u-scripts.blogspot.com/ The arguments are : - "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'... or you can set it to "" if you want to display a numeric value with arg=numeric_value - "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 ''. - "max" is the maximum value of the bar. If the Conky variable outputs a percentage, use 100. - "nb_blocks" is the umber of block to draw - "cap" id the cap of a block, possibles values are CAIRO_LINE_CAP_ROUND , CAIRO_LINE_CAP_SQUARE or CAIRO_LINE_CAP_BUTT see http://www.cairographics.org/samples/set_line_cap/ - "xb" and "yb" are the coordinates of the bottom left point of the bar, or the center of the circle if radius>0 - "w" and "h" are the width and the height of a block (without caps), w has no effect for "circle" bar - "space" is the space betwwen two blocks, can be null or negative - "bgc" and "bga" are background colors and alpha when the block is not LIGHT OFF - "fgc" and "fga" are foreground colors and alpha when the block is not LIGHT ON - "alc" and "ala" are foreground colors and alpha when the block is not LIGHT ON and ALARM ON - "alarm" is the value where blocks LIGHT ON are in a different color (values from 0 to 100) - "led_effect" true or false : to show a block with a led effect - "led_alpha" alpha of the center of the led (values from 0 to 1) - "smooth" true or false : colors in the bar has a smooth effect - "mid_color",mid_alpha" : colors of the center of the bar (mid_color can to be set to nil) - "rotation" : angle of rotation of the bar (values are 0 to 360 degrees). 0 = vertical bar, 90 = horizontal bar - "radius" : draw the bar on a circle (it's no more a circle, radius = 0 to keep bars) - "angle_bar" : if radius>0 angle_bar is the angle of the bar v1.0 (10 Feb. 2010) original release v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value v1.2 (28 Feb. 2010) just renamed the widget to bargraph v1.3 (03 March 2010) added parameters radius & angle_bar to draw the bar in a circular way ]] function equalizer(cr, name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,smooth,mid_color,mid_alpha,rotation, radius, angle_bar) local function rgb_to_r_g_b(colour, alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end local function setup_equalizer() local value = 0 if name ~="" then local str = conky_parse(string.format('${%s %s}', name, arg)) value = tonumber(str) else value = arg end if value==nil then value =0 end --if value <= 25 then max = 50 --elseif value <= 50 then max = 100 end local pct = 100*value/max local pcb = 100/nb_blocks cairo_set_line_width (cr, h) cairo_set_line_cap (cr, cap) local angle_rot= rotation*math.pi/180 local alpha_bar = (angle_bar*math.pi/180)/2 for pt = 1,nb_blocks do local light_on=false --set colors local col,alpha = bgc,bga if pct>=(100/nb_blocks/2) then --start after an half bloc if pct>=(pcb*(pt-1)) then light_on=true col,alpha = fgc,fga if pct>=alarm and (pcb*pt)>alarm then col,alpha = alc,ala end end end --vertical points local x1=xb local y1=yb-pt*(h+space) local radius0 = yb-y1 local x2=xb+radius0*math.sin(angle_rot) local y2=yb-radius0*math.cos(angle_rot) --line on angle_rot local a1=(y2-yb)/(x2-xb) local b1=y2-a1*x2 --line perpendicular to angle_rot local a2=-1/a1 local b2=y2-a2*x2 --dots on perpendicular local xx0,xx1,yy0,yy1=0,0,0,0 if rotation == 90 or rotation == 270 then xx0,xx1=x2,x2 yy0=yb yy1=yb+w else xx0,xx1=x2,x2+w*math.cos(angle_rot) yy0=xx0*a2+b2 yy1=xx1*a2+b2 end local xc,yc --perpendicular segment if alpha_bar == 0 then cairo_move_to (cr, xx0 ,yy0) cairo_line_to (cr, xx1 ,yy1) xc,yc=(xx0+xx1)/2,(yy0+yy1)/2 else cairo_arc( cr, xb, yb, radius+(h+space)*(pt)-h/2, ( -alpha_bar -math.pi/2+angle_rot) , ( alpha_bar -math.pi/2+angle_rot) ) xc=xb+ (radius+(h+space)*(pt))*math.sin(angle_rot) yc=yb- (radius+(h+space)*(pt))*math.cos(angle_rot) end --colors if light_on and led_effect then local pat = cairo_pattern_create_radial (xc, yc, 0, xc,yc,w/1.5) cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col,led_alpha)) cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col,alpha)) cairo_set_source (cr, pat) cairo_pattern_destroy(pat) else cairo_set_source_rgba(cr, rgb_to_r_g_b(col,alpha)) end if light_on and smooth then local radius = (nb_blocks+1)*(h+space) if pt==1 then xc0,yc0=xc,yc --remember the center of first block end cairo_move_to(cr,xc0,yc0) local pat = cairo_pattern_create_radial (xc0, yc0, 0, xc0,yc0,radius) cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(fgc,fga)) cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(alc,ala)) if mid_color ~=nil then cairo_pattern_add_color_stop_rgba (pat, 0.5,rgb_to_r_g_b(mid_color,mid_alpha)) end cairo_set_source (cr, pat) cairo_pattern_destroy(pat) end cairo_stroke (cr); end end --prevent segmentatioon error local updates=tonumber(conky_parse('${updates}')) if updates> 3 then setup_equalizer() end end -- ------------------------------------------------------------------------------------ --[[ TEXT WIDGET ]] function addzero100(num) if tonumber(num) == nil then return end --tonumber(num) == 0 end if tonumber(num) < 10 then return "0" .. num elseif tonumber(num) <100 then return "" .. num else return num end end function string:split(delimiter) local result = { } local from = 1 local delim_from, delim_to = string.find( self, delimiter, from ) while delim_from do table.insert( result, string.sub( self, from , delim_from-1 ) ) from = delim_to + 1 delim_from, delim_to = string.find( self, delimiter, from ) end table.insert( result, string.sub( self, from ) ) return result end function circlewriting(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1) local inum=string.len(text) range=finish deg=(finish-start)/(inum-1) degrads=1*(math.pi/180) local textcut=string.gsub(text, ".", "%1@@@") texttable=string.split(textcut, "@@@") for i = 1,inum do ival=i interval=(degrads*(start+(deg*(i-1))))+var1 interval2=degrads*(start+(deg*(i-1))) txs=0+radi*(math.sin(interval)) tys=0-radi*(math.cos(interval)) cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, fsize); cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha); cairo_move_to (cr, txs+horiz, tys+verti); cairo_rotate (cr, interval2) cairo_show_text (cr, (texttable[i])) cairo_rotate (cr, -interval2) end end function circlewritingdown(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1) local inum=string.len(text) deg=(start-finish)/(inum-1) degrads=1*(math.pi/180) local textcut=string.gsub(text, ".", "%1@@@") texttable=string.split(textcut, "@@@") for i = 1,inum do ival=i interval=(degrads*(start-(deg*(i-1))))+var1 interval2=degrads*(start-(deg*(i-1))) txs=0+radi*(math.sin(interval)) tys=0-radi*(math.cos(interval)) cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, fsize); cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha); cairo_move_to (cr, txs+horiz, tys+verti); cairo_rotate (cr, interval2+(180*math.pi/180)) cairo_show_text (cr, (texttable[i])) cairo_rotate (cr, -interval2-(180*math.pi/180)) end end function conky_draw_text() local updates=conky_parse('${updates}') update_num=tonumber(updates) --circlewriting variable cpu=tonumber(conky_parse('${cpu cpu1}')) if cpu == nil then cpu = 0 end --text must be in quotes text=("CPU 1 " .. (addzero100(cpu)) .. "%") --font name must be in quotes font="URW Chancery L" fontsize=14 radius=70 positionx=140 positiony=160 colorred=1 colorgreen=1 colorblue=1 coloralpha=1 --to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees --eg if you want to go from 270 to 90, then you will input 270 to 450. Finish has to be greater than start. start=290 finish=340 letterposition=0 circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition) --circlewritingdown variables cpu=tonumber(conky_parse('${cpu cpu2}')) if cpu == nil then cpu = 0 end --text must be in quotes text=("CPU 2 " .. (addzero100(cpu)) .. "%") --font name must be in quotes font="URW Chancery L" fontsize=14 radius=70 positionx=140 positiony=160 colorred=1 colorgreen=1 colorblue=1 coloralpha=1 --to set start and finish values for circlewritingdown, if the text will cross 0 degrees then you must calculate for 0-finish degrees --eg if you want to go from 90 to 270, then you will input 90 to -90. Start has to be greater than finish start=10 finish=60 letterposition=0 circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition) --circlewritingdown variable down=tonumber(conky_parse('${cpu cpu3}')) --text must be in quotes text=("CPU 3 " .. (addzero100(cpu)) .. "%") --font name must be in quotes font="URW Chancery L" fontsize=14 radius=77 positionx=140 positiony=160 colorred=1 colorgreen=1 colorblue=1 coloralpha=1 --to set start and finish values for circlewritingdown, if the text will cross 0 degrees then you must calculate for 0-finish degrees --eg if you want to go from 90 to 270, then you will input 90 to -90. Start has to be greater than finish start=240 finish=190 letterposition=0.06 circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition) --circlewriting variables up=tonumber(conky_parse('${upspeedf wlp2s0}')) --text must be in quotes text=("CPU 4 " .. (addzero100(cpu)) .. "%") --font name must be in quotes font="URW Chancery L" fontsize=14 radius=77 positionx=140 positiony=160 colorred=1 colorgreen=1 colorblue=1 coloralpha=1 --to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees --eg if you want to go from 270 to 90, then you will input 270 to 450. Finish has to be greater than start. start=170 finish=120 letterposition=0 circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition) -- end end --[[ END TEXT WIDGET ]] -- ------------------------------------------------------------------------------------- function conky_widgets() 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) -- ------------------------------------------------------------------------------------- --function equalizer(name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga, alc, ala, alarm, led_effect, led_alpha, smooth, mid_color, mid_alpha, rotation, radius, angle_bar) cr = cairo_create(cs) if var == nil then var = 0 end var = var + 1 angle = var equalizer(cr, 'cpu', 'cpu2', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 40, 10, 75) equalizer(cr, 'cpu', 'cpu1', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 320, 10, 75) equalizer(cr, 'memperc', '', 100, 50, CAIRO_LINE_CAP_BUTT, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 270, 10, 20) equalizer(cr, 'fs_used_perc', '/', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 90, 10, 20) equalizer(cr, 'cpu', 'cpu3', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 220, 10, 75) equalizer(cr, 'cpu', 'cpu4', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 140, 10, 75) cairo_destroy(cr) --[[ Вывод часов ]] cr = cairo_create(cs) clock(cr, 30, 50, 220, 0xffffff, 1, 0xFFFfff, 1) cairo_destroy(cr) --[[ Вывод текста по кругу, настройке в скрипте ]] cr = cairo_create(cs) conky_draw_text() cairo_destroy(cr) end
conky de droite
Code TEXT :
background yes use_xft yes xftfont URW Chancery L:style=Bold:size=10 xftalpha 1 imlib_cache_size 0 update_interval 1.0 total_run_times 0 own_window yes own_window_transparent yes own_window_argb_visual yes own_window_type normal own_window_hints undecorated,below,skip_taskbar,skip_pager double_buffer yes minimum_size 250 270 maximum_width 250 text_buffer_size 2048 draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color ffffff #ffd579 default_outline_color white alignment top_right gap_x 00 gap_y 00 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale yes lua_load ~/.conky/olgmen/olgmen7_1a.lua lua_draw_hook_pre widgets TEXT ${voffset 60}${goto 95}Racine ${goto 150}Home ${voffset 14}${goto 52}Ecr. : ${diskio_write sda6} ${goto 146}Ecr. : ${diskio_write sda8} ${voffset -1}${goto 52}Lec. : ${diskio_read sda6} ${goto 146}Ecr. : ${diskio_read sda8} ${voffset 01}${goto 60}swap: $swapperc%${goto 170}home: ${fs_used_perc /home}%
son olgmen_7.1a.lua (penser à modifier la partie wifi pour votre configuration)
Code TEXT :
--[[ При сборке скрипта использованы данные из следующих скриптов Conky Widgets by londonali1010 (2009) - часы и кольца Shadowed clock by wlourf (10 jan. 2010) - стрелки часов с тенью BARGRAPH WIDGET v1.3 by wlourf (03 march 2010) Собрал все это Борис Кринкель <olgmen> krinkel@rambler.ru Для этого серипта требуется CONKY версии 1.7.2 Для вызова этого скрипта в Conky вставьте следующие строки до TEXT (при условии, что скрипт сохранен в ~/scripts/conky_widgets.lua): lua_load ~/scripts/olgmen7_1.lua lua_draw_hook_pre widgets ]] require 'cairo' --[[ AIR CLOCK WIDGET ]] --[[ Виджет выводит изображение часов. Часть настроек находится в виджете ]] function clock(cr, x, y, s, bgc, bga, fgc, fga) -- функция перекодировки цвета function rgb_to_r_g_b(colour,alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end -- назначаем толщину выводимых линий local s_th = 2 -- рисуем циферблат local radius = s/2 local m_x,m_y = x + s/2, y + s/2 -- вывод часовых делений local i = 0 local winkel = math.rad(30) for i=0,11,1 do cairo_set_line_width(cr,s_th*1.5) cairo_move_to(cr, m_x-math.sin(winkel*i)*(radius), m_y-math.cos(winkel*i)*(radius)) cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.8), m_y-math.cos(winkel*i)*(radius*0.8)) cairo_fill_preserve(cr) cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga)) cairo_stroke(cr) end -- вывод минутных делений local i = 0 local winkel = math.rad(6) for i=0,59,1 do cairo_set_line_width(cr,1) cairo_move_to(cr, m_x-math.sin(winkel*i)*radius, m_y-math.cos(winkel*i)*radius) cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.9), m_y-math.cos(winkel*i)*(radius*0.9)) cairo_stroke(cr) end -- часовые стрелки с тенью, взято из Shadowed clock by wlourf (10 jan. 2010) function draw_hand(a_trame,arc,arc0,arc1,lg,r,border,rgb) xx = xc + clock_r*math.sin(arc)*lg yy = yc - clock_r*math.cos(arc)*lg x0 = xc + r*math.sin(arc0) y0 = yc - r*math.cos(arc0) x1 = xc + r*math.sin(arc1) y1 = yc - r*math.cos(arc1) if border ~= nil then cairo_set_line_width(cr,1) cairo_set_source_rgba(cr,border[1],border[2],border[3],0.5) cairo_move_to (cr, x0, y0) cairo_curve_to (cr, x0, y0, xx, yy, x1, y1) cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2) cairo_stroke(cr) end -- рисуем тень cairo_move_to (cr, x0, y0) cairo_curve_to (cr, x0, y0, xx+shadow_xoffset, yy+shadow_yoffset, x1, y1) cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2) pat = cairo_pattern_create_radial (xc, yc, 0, xc, yc, clock_r) cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, shadow_opacity) cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 0) cairo_set_source (cr, pat) cairo_fill (cr) -- рисуем стрелки cairo_move_to (cr, x0, y0) cairo_curve_to (cr, x0, y0, xx, yy, x1, y1) cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2) pat = cairo_pattern_create_radial (xc, yc, clock_r/10, xc, yc, clock_r*lg) cairo_pattern_add_color_stop_rgba (pat,0, rgb[1], rgb[2], rgb[3], 1) cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1) cairo_set_source (cr, pat) cairo_fill (cr) cairo_pattern_destroy (pat) end -- Здесь вводятся основные данные -- радиус часов в пикселях, задаем половину диаметра часов clock_r=s/2 -- координаты центра часов xc = x+s/2 yc = y+s/2 -- координаты источника света относительно центра часов, 0 - источник света над центром -- может быть положительным, источник света выше центра, или отрицательным shadow_xoffset=70 shadow_yoffset=70 -- прозрачность тени, значения от 0 до 1 shadow_opacity=0 -- Выводить секундную стрелку, Да - true, Нет - false. -- При выводе секундной стрелки update_interval в .conkyrc должен быть менее 1 сек. show_seconds=false -- Выводить ось стрелок в центре часов, Да - true, Нет - false. show_dot = true -- размеры стрелок, первая цифра ширина, вторая - длина rh,lgh=3,1.2 -- 1.2 rm,lgm=2,1.75 -- 1.75 rs,lgs=1,1.9 -- секундная стрелка -- забираем данные из ОС local hours=os.date("%I") local mins=os.date("%M") local secs=os.date("%S") -- расчет угла движения стрелок gamma = math.pi/2-math.atan(rs/(clock_r*lgs)) secs_arc=(2*math.pi/60)*secs secs_arc0=secs_arc-gamma secs_arc1=secs_arc+gamma gamma = math.pi/2-math.atan(rm/(clock_r*lgm)) mins_arc=(2*math.pi/60)*mins + secs_arc/60 mins_arc0=mins_arc-gamma mins_arc1=mins_arc+gamma gamma = math.pi/2-math.atan(rh/(clock_r*lgh)) hours_arc=(2*math.pi/12)*hours+mins_arc/12 hours_arc0=hours_arc-gamma hours_arc1=hours_arc+gamma -- вывод стрелок draw_hand(alpha_trame,hours_arc,hours_arc0,hours_arc1,lgh,rh,{0,0,0},{1,1,1}) draw_hand(alpha_trame,mins_arc,mins_arc0,mins_arc1,lgm,rm,{0,0,0},{.9,.9,.9}) if show_seconds then draw_hand(alpha_trame,secs_arc,secs_arc0,secs_arc1,lgs,rs,{0,0,0},{.8,.8,.8}) end -- рисуем ось стрелок if show_dot then lg_shadow_center=3 radius=math.min(rh,rm,rs)*0.75 if radius<1 then radius=1 end ang = math.atan(shadow_yoffset/shadow_xoffset) -- тень от оси gamma = -math.atan(1/lg_shadow_center) ang0=ang-gamma ang1=ang+gamma end end --[[ END AIR CLOCK WIDGET ]] -- --------------------------------------------------------------------------- --[[ BARGRAPH WIDGET v1.3 by wlourf (03 march 2010) This widget draw a simple bar like (old) equalizers on hi-fi systems. http://u-scripts.blogspot.com/ The arguments are : - "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'... or you can set it to "" if you want to display a numeric value with arg=numeric_value - "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 ''. - "max" is the maximum value of the bar. If the Conky variable outputs a percentage, use 100. - "nb_blocks" is the umber of block to draw - "cap" id the cap of a block, possibles values are CAIRO_LINE_CAP_ROUND , CAIRO_LINE_CAP_SQUARE or CAIRO_LINE_CAP_BUTT see http://www.cairographics.org/samples/set_line_cap/ - "xb" and "yb" are the coordinates of the bottom left point of the bar, or the center of the circle if radius>0 - "w" and "h" are the width and the height of a block (without caps), w has no effect for "circle" bar - "space" is the space betwwen two blocks, can be null or negative - "bgc" and "bga" are background colors and alpha when the block is not LIGHT OFF - "fgc" and "fga" are foreground colors and alpha when the block is not LIGHT ON - "alc" and "ala" are foreground colors and alpha when the block is not LIGHT ON and ALARM ON - "alarm" is the value where blocks LIGHT ON are in a different color (values from 0 to 100) - "led_effect" true or false : to show a block with a led effect - "led_alpha" alpha of the center of the led (values from 0 to 1) - "smooth" true or false : colors in the bar has a smooth effect - "mid_color",mid_alpha" : colors of the center of the bar (mid_color can to be set to nil) - "rotation" : angle of rotation of the bar (values are 0 to 360 degrees). 0 = vertical bar, 90 = horizontal bar - "radius" : draw the bar on a circle (it's no more a circle, radius = 0 to keep bars) - "angle_bar" : if radius>0 angle_bar is the angle of the bar v1.0 (10 Feb. 2010) original release v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value v1.2 (28 Feb. 2010) just renamed the widget to bargraph v1.3 (03 March 2010) added parameters radius & angle_bar to draw the bar in a circular way ]] function equalizer(cr, name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,smooth,mid_color,mid_alpha,rotation, radius, angle_bar) local function rgb_to_r_g_b(colour, alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end local function setup_equalizer() local value = 0 if name ~="" then local str = conky_parse(string.format('${%s %s}', name, arg)) value = tonumber(str) else value = arg end if value==nil then value =0 end --if value <= 25 then max = 50 --elseif value <= 50 then max = 100 end local pct = 100*value/max local pcb = 100/nb_blocks cairo_set_line_width (cr, h) cairo_set_line_cap (cr, cap) local angle_rot= rotation*math.pi/180 local alpha_bar = (angle_bar*math.pi/180)/2 for pt = 1,nb_blocks do local light_on=false --set colors local col,alpha = bgc,bga if pct>=(100/nb_blocks/2) then --start after an half bloc if pct>=(pcb*(pt-1)) then light_on=true col,alpha = fgc,fga if pct>=alarm and (pcb*pt)>alarm then col,alpha = alc,ala end end end --vertical points local x1=xb local y1=yb-pt*(h+space) local radius0 = yb-y1 local x2=xb+radius0*math.sin(angle_rot) local y2=yb-radius0*math.cos(angle_rot) --line on angle_rot local a1=(y2-yb)/(x2-xb) local b1=y2-a1*x2 --line perpendicular to angle_rot local a2=-1/a1 local b2=y2-a2*x2 --dots on perpendicular local xx0,xx1,yy0,yy1=0,0,0,0 if rotation == 90 or rotation == 270 then xx0,xx1=x2,x2 yy0=yb yy1=yb+w else xx0,xx1=x2,x2+w*math.cos(angle_rot) yy0=xx0*a2+b2 yy1=xx1*a2+b2 end local xc,yc --perpendicular segment if alpha_bar == 0 then cairo_move_to (cr, xx0 ,yy0) cairo_line_to (cr, xx1 ,yy1) xc,yc=(xx0+xx1)/2,(yy0+yy1)/2 else cairo_arc( cr, xb, yb, radius+(h+space)*(pt)-h/2, ( -alpha_bar -math.pi/2+angle_rot) , ( alpha_bar -math.pi/2+angle_rot) ) xc=xb+ (radius+(h+space)*(pt))*math.sin(angle_rot) yc=yb- (radius+(h+space)*(pt))*math.cos(angle_rot) end --colors if light_on and led_effect then local pat = cairo_pattern_create_radial (xc, yc, 0, xc,yc,w/1.5) cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col,led_alpha)) cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col,alpha)) cairo_set_source (cr, pat) cairo_pattern_destroy(pat) else cairo_set_source_rgba(cr, rgb_to_r_g_b(col,alpha)) end if light_on and smooth then local radius = (nb_blocks+1)*(h+space) if pt==1 then xc0,yc0=xc,yc --remember the center of first block end cairo_move_to(cr,xc0,yc0) local pat = cairo_pattern_create_radial (xc0, yc0, 0, xc0,yc0,radius) cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(fgc,fga)) cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(alc,ala)) if mid_color ~=nil then cairo_pattern_add_color_stop_rgba (pat, 0.5,rgb_to_r_g_b(mid_color,mid_alpha)) end cairo_set_source (cr, pat) cairo_pattern_destroy(pat) end cairo_stroke (cr); end end --prevent segmentatioon error local updates=tonumber(conky_parse('${updates}')) if updates> 3 then setup_equalizer() end end -- ------------------------------------------------------------------------------------ --[[ TEXT WIDGET ]] function addzero100(num) if tonumber(num) == nil then return end --tonumber(num) == 0 end if tonumber(num) < 10 then return "00" .. num elseif tonumber(num) <100 then return "0" .. num else return num end end function string:split(delimiter) local result = { } local from = 1 local delim_from, delim_to = string.find( self, delimiter, from ) while delim_from do table.insert( result, string.sub( self, from , delim_from-1 ) ) from = delim_to + 1 delim_from, delim_to = string.find( self, delimiter, from ) end table.insert( result, string.sub( self, from ) ) return result end function circlewriting(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1) local inum=string.len(text) range=finish deg=(finish-start)/(inum-1) degrads=1*(math.pi/180) local textcut=string.gsub(text, ".", "%1@@@") texttable=string.split(textcut, "@@@") for i = 1,inum do ival=i interval=(degrads*(start+(deg*(i-1))))+var1 interval2=degrads*(start+(deg*(i-1))) txs=0+radi*(math.sin(interval)) tys=0-radi*(math.cos(interval)) cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, fsize); cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha); cairo_move_to (cr, txs+horiz, tys+verti); cairo_rotate (cr, interval2) cairo_show_text (cr, (texttable[i])) cairo_rotate (cr, -interval2) end end function circlewritingdown(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1) local inum=string.len(text) deg=(start-finish)/(inum-1) degrads=1*(math.pi/180) local textcut=string.gsub(text, ".", "%1@@@") texttable=string.split(textcut, "@@@") for i = 1,inum do ival=i interval=(degrads*(start-(deg*(i-1))))+var1 interval2=degrads*(start-(deg*(i-1))) txs=0+radi*(math.sin(interval)) tys=0-radi*(math.cos(interval)) cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, fsize); cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha); cairo_move_to (cr, txs+horiz, tys+verti); cairo_rotate (cr, interval2+(180*math.pi/180)) cairo_show_text (cr, (texttable[i])) cairo_rotate (cr, -interval2-(180*math.pi/180)) end end function conky_draw_text() local updates=conky_parse('${updates}') update_num=tonumber(updates) --circlewriting variable --circlewritingdown variables --circlewritingdown variable down=tonumber(conky_parse('${downspeedf wlp2s0}')) --text must be in quotes text=("Entrant. " .. down .. "") --font name must be in quotes font="URW Chancery L" fontsize=14 radius=77 positionx=140 positiony=160 colorred=1 colorgreen=1 colorblue=1 coloralpha=1 --to set start and finish values for circlewritingdown, if the text will cross 0 degrees then you must calculate for 0-finish degrees --eg if you want to go from 90 to 270, then you will input 90 to -90. Start has to be greater than finish start=255 finish=190 letterposition=0.06 circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition) --circlewriting variables up=tonumber(conky_parse('${upspeedf wlp2s0}')) --text must be in quotes text=("Sortant. " .. up .. "") --font name must be in quotes font="URW Chancery L" fontsize=14 radius=77 positionx=140 positiony=160 colorred=1 colorgreen=1 colorblue=1 coloralpha=1 --to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees --eg if you want to go from 270 to 90, then you will input 270 to 450. Finish has to be greater than start. start=170 finish=110 letterposition=0 circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition) -- end end --[[ END TEXT WIDGET ]] -- ------------------------------------------------------------------------------------- function conky_widgets() 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) -- ------------------------------------------------------------------------------------- --function equalizer(name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga, alc, ala, alarm, led_effect, led_alpha, smooth, mid_color, mid_alpha, rotation, radius, angle_bar) cr = cairo_create(cs) if var == nil then var = 0 end var = var + 1 angle = var equalizer(cr, 'swapperc', '', 100, 50, CAIRO_LINE_CAP_BUTT, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 270, 10, 20) equalizer(cr, 'fs_used_perc', '/home', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 90, 10, 20) equalizer(cr, 'downspeedf', 'wlp2s0', 380, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 220, 10, 75) equalizer(cr, 'upspeedf', 'wlp2s0', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0, 0x6495ee, 1, 0xffffff, 1, 80, true, 1, true, 0x6495ee, 1.0, 140, 10, 75) cairo_destroy(cr) --[[ Вывод часов ]] cr = cairo_create(cs) clock(cr, 30, 50, 220, 0xffffff, 1, 0xFFFfff, 1) cairo_destroy(cr) --[[ Вывод текста по кругу, настройке в скрипте ]] cr = cairo_create(cs) conky_draw_text() cairo_destroy(cr) end

.gif)
Édité par loutch Le 09/02/2016 à 10h29
Linuxmint 24.02 Xia - Mageia 9 xfce et plasma sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX
Xubuntu 18.04 LTS et 24.04 en xfce sur ASUS Rog STRIX

Ami age Membre non connecté
-
- Voir le profil du membre Ami age
- Inscrit le : 18/08/2012
- Site internet
- Groupes :
-
Modérateur
Bonsoir tout le monde,
Déterrage de post, mais le sujet conky n'est jamais vraiment mort
Voici mon dernier bureau/conky. Simple, sobre et discret :
Le conky en lui-même n'est pas nouveau, mais je les remis au goût du jour et surtout remis de l'ordre par rapport à l'original.
Voici le .conkyrc :
Caché:
Code TEXT :
#==================================================================================================# # conkyrc_smooth # # Date : 19/05/2015 # # Auteur : admel # # Version : v0.1 # # Licence : Distibué sous les termes de GNU GPL V.3 et postérieur # # # # Ceci est une modification de conkyrc_Jess_Smooth3 --> Présentation & organisation améliorée # # # # conkyrc_Jess_Smooth3 : http://www.deviantart.com/art/Smooth-Conky-V3-Made-for-Conky-Manager-2-2-461461882 # #==================================================================================================# ### Paramètres de conky ### #Fonctionnement de conky background no#Pour que conky tourne en arrière plan ; no = pour les tests total_run_times 0#Temps en secondes ; 0 = toujours actif #Mémoire double_buffer yes#Éviter le clignotement no_buffers yes#Soustraire les mémoires tampons de la mémoire utilisée text_buffer_size 2048#Taille du cache pour le texte #Réglages système cpu_avg_samples 1#Nb d'échantillons pour calculer la moyenne d'utilisation CPU net_avg_samples 2#Nb d'échantillons pour calculer la moyenne d'utilisation CPU imlib_cache_size 0# #Affichage out_to_console no#Affiche le texte sur la sortie standard update_interval 1#Taux de rafraîchissement de la fenêtre(s) #Fenêtre conky own_window yes#Utiliser sa propre fenêtre own_window_type normal#Type de fenêtre ; normal / override / desktop own_window_transparent yes#Pseudo transparence own_window_argb_visual yes own_window_argb_value 0 own_window_colour 000000 own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager #--- stippled_borders 0 #--- border_inner_margin 5 border_width 1#Largeur du contour #--- default_color FDFDFD#Couleur par défaut default_shade_color 000000#Couleur des ombres default_outline_color 000000#Couleur des contours #--- minimum_size 0 0#Taille minimum (px) ; largeur / hauteur maximum_width 800#Largeur maximum (px) #--- alignment top_left#Alignement gap_x 820#Écart avec le bord gauche / droit gap_y 120#Écart avec le bord haut / bas #--- no_buffers yes#Soustraire les mémoires tampons de la mémoire utilisée #--- uppercase no#Tout le texte en majuscule #Paramètres graphique draw_shades no#Afficher les ombres draw_outline no#Afficher les contours de fenêtre draw_borders no#Afficher des contours autour des blocs de texte draw_graph_borders no# color1 FDFDFD#Blanc color2 121111#Noir color3 77BF85#Vert clair short_units yes# #Mise en forme use_xft yes#Utiliser Xft (polices lissées etc) xftalpha 0.8#Utiliser Xft override_utf8_locale yes#Force l'UTF8 use_spacer none#Ajoute des espaces après certans objets (qu'avec des polices fixes) #--- xftfont ITC Avant Garde Gothic Pro:size=9#Police par défaut TEXT ${goto 70}${font ITC Avant Garde Gothic Pro:size=100} ${time %I}${font ITC Avant Garde Gothic Pro:size=25}${voffset -35}${time %P}${color3}${font ITC Avant Garde Gothic Pro:size=100}${voffset -38}${time %M}${color1} ${goto 20}${voffset -210}${font ITC Avant Garde Gothic Pro:size=15} ${time %a} ${goto 7}${voffset -1}${font ITC Avant Garde Gothic Pro:bold:size=25} ${time %b} # Mois ${goto 20}${voffset 30}${color3}${font ITC Avant Garde Gothic Pro::size=30}${time %d}${color1} # n° du jour ${goto 40}${voffset -5}${font ITC Avant Garde Gothic Pro:size=15}Mem${color3} $memperc%${color1} ${goto 150}${voffset -42}Cpu${color3} ${cpu cpu0}%${color1} ${goto 270}${voffset -42}WiFi ${color3}${wireless_link_qual wlp5s0}%${color1}# Choisir "wlp5s0"/"wlan" ${goto 380}${voffset -42}Battery${color3} ${battery_percent BAT1}%# Choisir "BAT1"/"BAT0"/"BATT" ### Weather ### ${texeci 1300 curl -s "http://weather.yahooapis.com/forecastrss?w=608105&u=c" -o ~/.cache/weather.xml} ${offset 420}${voffset -115}${font ITC Avant Garde Gothic Pro:bold:size=20}${execi 1300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp="[^"]*"" | grep -o ""[^"]*"" | grep -o "[^"]*"}${font ITC Avant Garde Gothic Pro:bold:size=8}${voffset -16}o${voffset 14}${font}${color1} ${execi 1300 cp -f ~/.conky/.weather-icons/$(grep "yweather:condition" ~/.cache/weather.xml | grep -o "code="[^"]*"" | grep -o ""[^"]*"" | grep -o "[^"]*").png ~/.cache/weather.png}${image ~/.cache/weather.png -p 425,23 -s 35x35} ${offset 420}${voffset -130}${font ITC Avant Garde Gothic Pro:size=14} Lille
Enjoy

J'aime bien le style

_______________________________________________________________________

___________________________________ Un petit clic pour Mageia ? =>> CLIQUEZ I C I :
.



___________________________________ Un petit clic pour Mageia ? =>> CLIQUEZ I C I :
.
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie