Conky 2019

Bureaux,conky et autres personnalisations esthétiques.
Avatar du membre
loutch
Messages : 517
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

Dernier message de la page précédente :

Image

conky lune

le pack @ prendre ici

http://bit.ly/4_24-5-17

@ extraire dans votre home (pas le .conky)

Le conkyrc

Code : Tout sélectionner

conky.config = {
background = true,
use_xft = true,
font = 'Monofur:bold:size=7',
update_interval = 1.0,
total_run_times = 0,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
stippled_borders = 8,
border_inner_margin = 4,
alignment = 'top_left',
minimum_width = 500,
minimum_height = 500,
gap_x = 130,
gap_y = 230,
no_buffers = false,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 8192,
imlib_cache_size = 16384, 

default_outline_color = '000000',
color1 = '000000',
color2 = '000000',
color3 = '828200',
color4 = '323200',
lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[
${font Monofur:bold:size=12}${color5}${voffset -9}Phases de la lune ${color}${texeci 9500 bash $HOME/4_Moon/moon_MoonGiant}
${alignc 40}${color5}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$2" "$3}'`}${color}${font}
${lua fDrawImage $HOME/4_Moon/-2.png 10 65 60 60}
${lua fDrawImage $HOME/4_Moon/-1.png 80 65 60 60}
${lua fDrawImage $HOME/4_Moon/0.png 157 35 90 90}
${lua fDrawImage $HOME/4_Moon/1.png 265 65 60 60}
${lua fDrawImage $HOME/4_Moon/2.png 340 65 60 60}
${voffset 40}
${alignc 60}${execpi 600 sed -n '7p' $HOME/4_Moon/raw-fr | awk '{print $1}'}
${alignc 60}${execpi 600 sed -n '7p' $HOME/4_Moon/raw-fr | awk '{print $2}'}
${alignc 60}${execpi 600 sed -n '1p' $HOME/4_Moon/raw-fr}
${voffset -42}${color5}${goto 15}${color5}${execi 3600 echo `date --date="-2 day" | awk '{print $2" "$3}'`}\
${goto 87}${execi 3600 echo `date --date="-1 day" | awk '{print $2" "$3}'`}\
${goto 347}${execi 3600 echo `date --date="+2 day" | awk '{print $2" "$3}'`}\
${goto 272}${execi 3600 echo `date --date="+1 day" | awk '{print $2" "$3}'`}${color}
${goto 15}${execpi 600 sed -n '19p' $HOME/4_Moon/raw-fr | awk '{print $1}'}\
${goto 87}${execpi 600 sed -n '27p' $HOME/4_Moon/raw-fr | awk '{print $1}'}\
${goto 272}${execpi 600 sed -n '35p' $HOME/4_Moon/raw-fr | awk '{print $1}'}\
${goto 347}${execpi 600 sed -n '43p' $HOME/4_Moon/raw-fr | awk '{print $1}'}
${goto 15}${execpi 600 sed -n '19p' $HOME/4_Moon/raw-fr | awk '{print $2}'}\
${goto 87}${execpi 600 sed -n '27p' $HOME/4_Moon/raw-fr | awk '{print $2}'}\
${goto 272}${execpi 600 sed -n '35p' $HOME/4_Moon/raw-fr | awk '{print $2}'}\
${goto 347}${execpi 600 sed -n '43p' $HOME/4_Moon/raw-fr | awk '{print $2}'}
${goto 15}${execpi 600 sed -n '13p' $HOME/4_Moon/raw-fr}\
${goto 87}${execpi 600 sed -n '21p' $HOME/4_Moon/raw-fr}\
${goto 272}${execpi 600 sed -n '29p' $HOME/4_Moon/raw-fr}\
${goto 347}${execpi 600 sed -n '37p' $HOME/4_Moon/raw-fr}

${alignc 40}${color5}Details pour ${execi 3600 echo `date --date="0 day" | awk '{print $1" "$2" "$3" "$6}'`}${color}

Visibilité: ${execpi 600 sed -n '1p' $HOME/4_Moon/raw-fr}${goto 250}Age: ${execpi 600 sed -n '5p' $HOME/4_Moon/raw} J
Angle du Soleil: ${execpi 600 sed -n '2p' $HOME/4_Moon/raw} ° ${goto 250}Angle de Lune: ${execpi 600 sed -n '6p' $HOME/4_Moon/raw} °
Distance du Soleil: ${execpi 600 sed -n '3p' $HOME/4_Moon/raw} kms${goto 250}Distance de la Lune: ${execpi 600 sed -n '4p' $HOME/4_Moon/raw} kms

${alignc 50}${color5}Position de la Lune${color}\
${lua fDrawImage $HOME/4_Moon/rise.png  0 294 400 130}\
${lua fDrawImage $HOME/4_Moon/0.png    45 370 30 30}\
${lua fDrawImage $HOME/4_Moon/0.png   325 370 30 30}\
${Lua fDrawImage $HOME/4_Moon/0.png   185 296 30 30}
]];
monn_MoonGiant (Je l'ai mis en françois)

Code : Tout sélectionner

#!/bin/bash

#function: moonrise_set
moonrise_set () {
    case "$1" in
         "FirstQuarter")
			echo "Noon/Midnight"
			cp $HOME/4_Moon/riseicons/rise_FirstQuarter.png $HOME/4_Moon/rise.png
         ;;
         "FullMoon")
			echo "6PM/6AM"
			cp $HOME/4_Moon/riseicons/rise_FullMoon.png $HOME/4_Moon/rise.png
		 ;;	
		 "LastQuarter")
			echo "Midnight/Noon"
			cp $HOME/4_Moon/riseicons/rise_LastQuarter.png $HOME/4_Moon/rise.png
		 ;;	
		 "NewMoon")
			echo "6AM/6PM"
			cp $HOME/4_Moon/riseicons/rise_NewMoon.png $HOME/4_Moon/rise.png
		 ;;
		 "WaningCrescent")
			echo "3AM/3PM"
			cp $HOME/4_Moon/riseicons/rise_WaningCrescent.png $HOME/4_Moon/rise.png
		 ;;
		 "WaningGibbous")
			echo "9PM/9AM"
			cp $HOME/4_Moon/riseicons/rise_WaningGibbous.png $HOME/4_Moon/rise.png
		 ;;
		 "WaxingCrescent")
			echo "9AM/9PM"
			cp $HOME/4_Moon/riseicons/rise_WaxingCrescent.png $HOME/4_Moon/rise.png
		 ;;
		 "WaxingGibbous")
			echo "3PM/3AM"
			cp $HOME/4_Moon/riseicons/rise_WaxingGibbous.png $HOME/4_Moon/rise.png
		 ;;
		 *)
			echo "Unavailable"
		 esac
} 

kill -STOP $(pidof conky)

#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 

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 -e '/var jArray/d' -e 's/^.*\:\[\"//g' /$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 -e 's/Illumination: \|Sun Angle: \|Sun Distance: \|Moon Distance: \|Moon Age: \|Moon Angle: //g' -e '43d' /$HOME/4_Moon/raw
#September 30-October 1 fix
for (( i=11; i<=35; i+=8 ))
	do
		if [[ $(sed -n ${i}p /$HOME/4_Moon/raw) == "September 30" ]]; then
			line=$((i+7))
			sed -i "${line}s/^.*$/Waning Crescent/" /$HOME/4_Moon/raw
		fi
		if [[ $(sed -n ${i}p /$HOME/4_Moon/raw) == "October 1" ]]; then
			line=$((i+7))
			sed -i "${line}s/^.*$/New Moon/" /$HOME/4_Moon/raw
		fi
	done
today_phase=$(sed -n 8p /$HOME/4_Moon/raw| awk -F "," '{print $2}'| sed 's/ //')
if [[ $today_phase == "September 30" ]]; then
			sed -i '7s/^.*$/Waning Crescent/' /$HOME/4_Moon/raw
			sed -i '10s/^.*$/Phase: Waning Crescent/' /$HOME/4_Moon/raw
fi
if [[ $today_phase == "October 1" ]]; then
			sed -i '7s/^.*$/New Moon/' /$HOME/4_Moon/raw
			sed -i '10s/^.*$/Phase: New Moon/' /$HOME/4_Moon/raw
fi

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

## English to French
cp $HOME/4_Moon/raw $HOME/4_Moon/raw-fr
if [[ -s $HOME/4_Moon/raw-fr ]]; then
        sed -i -e 's/Full Moon/Pleine Lune/' $HOME/4_Moon/raw-fr
        sed -i -e 's/Waning Gibbous/Gibeuse décroissante/' $HOME/4_Moon/raw-fr
        sed -i -e 's/Waxing Gibbous/Gibeuse croissante/' $HOME/4_Moon/raw-fr
        sed -i -e 's/Waxing Crescent/Lune Montante/' $HOME/4_Moon/raw-fr
        sed -i -e 's/First Quarter/Premier Quartier/' $HOME/4_Moon/raw-fr
        sed -i -e 's/Last Quarter/Dernier Quartier/' $HOME/4_Moon/raw-fr
        sed -i -e 's/Waning Crescent/Lune Déscendante/' /$HOME/4_Moon/raw-fr      

fi
kill -CONT $(pidof conky)

Image







Image



P.S Mettre les icones du dossier riseicons .jpg en .png avec gimp (@ cause du image .lua)
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Avatar du membre
cyrille
Administrateur du site
Messages : 12285
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Conky 2019

Message par cyrille »

Bien ce thread ;)
Effectivement les conky rc que l'on trouve sont à 90% pour la version précédente de conky, peu intègre la nouvelle syntaxe et à ma connaissance il n'existe pas de moulinette magique de transcription
Un truc hyper intéressant pour tes exemples et les futurs à venir serait de mettre les ressources utilisées par ces conky (conso RAM / CPU)
Sinon tip top ;)
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Avatar du membre
loutch
Messages : 517
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

Re

Veux bien mettre la conso cpu ram ;i7 16giga de ram sur asus rog ça fausse un peu

top @ l'instant

cpu 1.3 ram 0.1
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Avatar du membre
toryx
Messages : 194
Enregistré le : dim. 11 sept. 2016 21:57

Re: Conky 2019

Message par toryx »

salut tous :)

pas de grands mérites pour moi, mais je tiens à faire profiter mes trouvailles quand elles me semble sympas :P
j'ai trouver un certain conky de "wim66" sur deviantart que j'ai trouvé bien sympas et pas trop gourmand
https://www.deviantart.com/wim66/art/co ... -719087192
Image

rajout du conky nvidia: (c'est un peut long mais j'ai pas su faire plus simple :? )
Image Image
autostart-All.sh:

Code : Tout sélectionner

#!/bin/sh
# You can use this script to create an autostart,it will cd into the theme folder before executing conky
# Conkies can be started individually through terminal from their directory (conky -c conky.conf or cd /path/to/theme/ && conky -c conky.conf)

killall conky

        # Making sure theme-dir is working-dir
        cd "$(dirname "$0")"

# start system conky
 sh conky-system-lua-V3/autostart.sh
    sleep 1
# start clock conky
 sh conky-clock-lua-V1/autostart.sh
sleep 1
# start  cores conky
 sh conky-cores-lua/autostart.sh
sleep 1
# start  nvidia conky
 sh conky-nvidia-lua/autostart.sh
sleep 1

exit
autostart.sh:

Code : Tout sélectionner

#!/bin/sh
#killall conky

        # Making sure theme-dir is working-dir
        cd "$(dirname "$0")"

    sleep 1
    ( set -x; setsid conky -c nvidia.conf )
    sleep 1
    ( set -x; setsid conky -c graphiccardfile )
    sleep 1

exit
nvidia.conf:

Code : Tout sélectionner

--[[
#########################
# conky-system-lua-V3   #
# by +WillemO @wim66    #
# v1.5 23-dec-17        #
#                       #
#########################
]]

conky.config = {

	background = true,
	double_buffer = true,
	no_buffers = true,
	text_buffer_size = 2048,
	update_interval = 1,
	cpu_avg_samples = 2,
	net_avg_samples = 2,

	alignment = 'top_right',
	gap_x = 295,
	gap_y = 208,

	minimum_width = 354, minimum_height = 650,
	maximum_width = 354,

	short_units = true,
	top_name_width = 23,

	own_window = true,
	own_window_type = 'normal',-- # options are: normal/override/dock/desktop/panel
	own_window_title = 'conky-lua-system',
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',

--	Window_background
	own_window_transparent = true,
	own_window_argb_visual = true,


	lua_load = 'settings.lua ./scripts/loadall.lua' ,
	lua_draw_hook_post = 'main' ,
    lua_startup_hook = 'vars',

};

conky.text = [[

]]
loadall.lua:

Code : Tout sélectionner

-- Set the path to the scripts foder
package.path = "./scripts/?.lua"
-- ###################################


require 'lua0-box2'

function conky_main()
     conky_main_box()
     
end

--[[
#########################
# conky-vnstat-lua      #
# by +WillemO @wim66    #
#  v1.5 23-dec-17       #
#                       #
#########################
]]
lua0-box2.lua:

Code : Tout sélectionner

--[[
#########################
# conky-cores-lua       #
# by +WillemO @wim66    #
# v1.5 23-dec-17        #
#                       #
#########################
]]

--[[BOX WIDGET v1.1 by Wlourf 27/01/2011
This widget can drawn some boxes, even circles in your conky window
http://u-scripts.blogspot.com/2011/01/box-widget.html)

Inspired by Background by londonali1010 (2009), thanks ;-) 

The parameters (all optionals) are :
x           - x coordinate of top-left corner of the box, default = 0 = (top-left corner of conky window)
y           - y coordinate of top-left corner of the box, default = 0 = (top-left corner of conky window)
w           - width of the box, default = width of the conky window
h           - height of the box, default = height of the conky window
corners     - corners is a table for the four corners in this order : top-left, top-right,bottom-right, bottom-left
              each corner is defined in a table with a shape and a radius, available shapes are : "curve","circle","line"
              example for the same shapes for all corners:
              { {"circle",10} }
              example for first corner different from the three others
              { {"circle",10}, {"circle",5}  }              
              example for top corners differents from bottom corners
              { {"circle",10}, {"circle",10}, {"line",0}  }   
              default = { {"line",0} } i.e=no corner
operator    - set the compositing operator (needs in the conkyrc : own_window_argb_visual yes)                          
              see http://cairographics.org/operators/
              available operators are :
              "clear","source","over","in","out","atop","dest","dest_over","dest_in","dest_out","dest_atop","xor","add","saturate"
              default = "over"
border      - if border>0, the script draws only the border, like a frame, default=0
dash        - if border>0 and dash>0, the border is draw with dashes, default=0
skew_x      - skew box around x axis, default = 0
skew_y      - skew box around y axis, default = 0
scale_x     - rescale the x axis, default=1, useful for drawing elipses ...
scale_y     - rescale the x axis, default=1
angle	    - angle of rotation of the box in degrees, default = 0
              i.e. a horizontal graph
rot_x       - x point of rotation's axis, default = 0,
              relative to top-left corner of the box, (not the conky window)
rot_y       - y point of rotation's axis, default = 0              
              relative to top-left corner of the box, (not the conky window)
draw_me     - if set to false, box is not drawn (default = true or 1)
              it can be used with a conky string, if the string returns 1, the box is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",              
              
linear_gradient - table with the coordinates of two points to define a linear gradient,
                  points are relative to top-left corner of the box, (not the conky window)
                  {x1,y1,x2,y2}
radial_gradient - table with the coordinates of two circle to define a radial gradient,
                  points are relative to top-left corner of the box, (not the conky window)
                  {x1,y1,r1,x2,y2,r2} (r=radius)
colour      - table of colours, default = plain white {{1,0xFFFFFF,0.5}}
              this table contains one or more tables with format {P,C,A}
              P=position of gradient (0 = start of the gradient, 1= end of the gradient)
              C=hexadecimal colour 
              A=alpha (opacity) of color (0=invisible,1=opacity 100%)
              Examples :
              for a plain color {{1,0x00FF00,0.5}}
              for a gradient with two colours {{0,0x00FF00,0.5},{1,0x000033,1}}        {x=80,y=150,w=20,h=20,
        radial_gradient={20,20,0,20,20,20},
        colour={{0.5,0xFFFFFF,1},{1,0x000000,0}},
              or {{0.5,0x00FF00,1},{1,0x000033,1}} -with this one, gradient will start in the middle
              for a gradient with three colours {{0,0x00FF00,0.5},{0.5,0x000033,1},{1,0x440033,1}}
              and so on ...



To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
    lua_load ~/scripts/box.lua
    lua_draw_hook_pre main_box
    
And leave one line blank or not after TEXT

Changelog:
+ v1.0 -- Original release (19.12.2010)
+ v1.1 -- Adding parameters: operator, dash, angle, skew_x, skew_y, draw_me
          corners are described in a table

--      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)
--     
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--     
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--      MA 02110-1301, USA.		


]]

  
require 'cairo'
    
function conky_main_box()

    if conky_window==nil then return end
    
	---------------------- PARAMETERS BEGIN HERE
                                                                                       
    local boxes_settings={

{
	x=10,y=10,w=335,h=208,
	colour= { {1,0x000000,0.9} }, 
        corners={ {"circle",5},},

	},

	{
	x=4,y=4,w=347,h=220,
	colour=color_x, linear_gradient={128,15,128,155},
        corners={ {"circle",5},}, border=4 
	},

	{
	x=8,y=8,w=339,h=212,
	colour= { {0,0xFFFFFF,0.05}, {0.5,0xC2C2C2,0.2}, {1,0xFFFFFF,0.05}}, linear_gradient={0,0,0,162},
	},

}

    ---------------------------- PARAMETERS END HERE
    
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local cr=cairo_create(cs)
    
    if tonumber(conky_parse("$updates"))<5 then return end
    for i in pairs(boxes_settings) do
        draw_box (cr,boxes_settings[i])
    end
    cairo_destroy(cr)
    cairo_surface_destroy(cs)    
end

    
function draw_box(cr,t)

	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	

    local table_corners={"circle","curve","line"}

    local t_operators={
        clear   = CAIRO_OPERATOR_CLEAR,
        source  = CAIRO_OPERATOR_SOURCE,
        over    = CAIRO_OPERATOR_OVER,
        ["in"]      = CAIRO_OPERATOR_IN,
        out     = CAIRO_OPERATOR_OUT,
        atop    = CAIRO_OPERATOR_ATOP,
        dest    = CAIRO_OPERATOR_DEST,
        dest_over   = CAIRO_OPERATOR_DEST_OVER,
        dest_in = CAIRO_OPERATOR_DEST_IN,
        dest_out = CAIRO_OPERATOR_DEST_OUT,
        dest_atop = CAIRO_OPERATOR_DEST_ATOP,
        xor = CAIRO_OPERATOR_XOR,
        add = CAIRO_OPERATOR_ADD,
        saturate =  CAIRO_OPERATOR_SATURATE,
    }
        
    function rgba_to_r_g_b_a(tc)
        --tc={position,colour,alpha}
        local colour = tc[2]
        local alpha = tc[3]
        return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end

    function table.copy(t)
      local t2 = {}
      for k,v in pairs(t) do
       t2[k] = {v[1],v[2]}
      end
      return t2
    end

    function draw_corner(num,t)
        local shape=t[1]
        local radius=t[2]
        local x,y = t[3],t[4]
        if shape=="line" then
            if num == 1 then cairo_line_to(cr,radius,0) 
                elseif num == 2 then cairo_line_to(cr,x,radius) 
                elseif num == 3 then cairo_line_to(cr,x-radius,y)
                elseif num == 4 then cairo_line_to(cr,0,y-radius)
            end
        end
        if shape=="circle" then
		    local PI = math.pi
           if num == 1 then cairo_arc(cr,radius,radius,radius,-PI,-PI/2)
                elseif num == 2 then cairo_arc(cr,x-radius,y+radius,radius,-PI/2,0)
                elseif num == 3 then cairo_arc(cr,x-radius,y-radius,radius,0,PI/2) 
                elseif num == 4 then cairo_arc(cr,radius,y-radius,radius,PI/2,-PI)
            end
        end
        if shape=="curve" then
            if num == 1 then cairo_curve_to(cr,0,radius ,0,0 ,radius,0) 
                elseif num == 2 then cairo_curve_to(cr,x-radius,0, x,y, x,radius)
                elseif num == 3 then cairo_curve_to(cr,x,y-radius, x,y, x-radius,y)
                elseif num == 4 then cairo_curve_to(cr,radius,y, x,y, 0,y-radius)
            end
        end        
    end   

    --check values and set default values
                                                                                       
    if border_COLOR == "default" then color_x = { {1,0x34495E,1} } end
    if border_COLOR == "green" then color_x = { {0,0x003E00,1}, {0.5,0x03F404,1}, {1,0x003E00,1} } end
    if border_COLOR == "blue" then color_x =  { {0,0x0032FF,1}, {0.5,0x00CCFF,1}, {1,0x0032FF,1} } end
    if border_COLOR == "orange" then color_x =  { {0,0xE05700,1}, {0.5,0xFFD145,1}, {1,0xE05700,1} } end
    if border_COLOR == "black" then color_x =  { {0.15,0x101010,1}, {0.5,0xA1A1A1,1}, {0.85,0x101010,1} } end
                                                                                       
    if t.x == nil then t.x = 0 end
    if t.y == nil then t.y = 0 end
    if t.w == nil then t.w = conky_window.width end
    if t.h == nil then t.h = conky_window.height end
    if t.radius == nil then t.radius = 0 end
    if t.border == nil then t.border = 0 end
    if t.colour==nil then t.colour={{1,0x34495E,1}} end
    if t.linear_gradient ~= nil then 
        if #t.linear_gradient ~= 4 then
            t.linear_gradient = {t.x,t.y,t.width,t.height}
        end
    end 
    if t.angle==nil then t.angle = 0 end

	if t.skew_x == nil then t.skew_x=0  end
	if t.skew_y == nil then  t.skew_y=0 end
	if t.scale_x==nil then t.scale_x=1 end
	if t.scale_y==nil then t.scale_y=1 end	
	if t.rot_x == nil then t.rot_x=0  end
	if t.rot_y == nil then  t.rot_y=0 end
    
    if t.operator == nil then t.operator = "over" end
    if (t_operators[t.operator]) == nil then
        print ("wrong operator :",t.operator)
        t.operator = "over"
    end
    
    if t.radial_gradient ~= nil then 
        if #t.radial_gradient ~= 6 then
            t.radial_gradient = {t.x,t.y,0, t.x,t.y, t.width}
        end
    end 
    
    for i=1, #t.colour do    
        if #t.colour[i]~=3 then 
            print ("error in color table")
            t.colour[i]={1,0xFFFFFF,1} 
        end
    end

    if t.corners == nil then t.corners={ {"line",0} } end
    local t_corners = {}
    local t_corners = table.copy(t.corners)
    --don't use t_corners=t.corners otherwise t.corners is altered

    --complete the t_corners table if needed
    for i=#t_corners+1,4 do    
        t_corners[i]=t_corners[#t_corners]
        local flag=false
        for j,v in pairs(table_corners) do flag=flag or (t_corners[i][1]==v) end 
        if not flag then print ("error in corners table :",t_corners[i][1]);t_corners[i][1]="curve"  end
    end

    --this way :    
    --    t_corners[1][4]=x    
    --    t_corners[2][3]=y
    --doesn't work
    t_corners[1]={t_corners[1][1],t_corners[1][2],0,0}
    t_corners[2]={t_corners[2][1],t_corners[2][2],t.w,0}
    t_corners[3]={t_corners[3][1],t_corners[3][2],t.w,t.h}    
    t_corners[4]={t_corners[4][1],t_corners[4][2],0,t.h}        

    t.no_gradient = (t.linear_gradient == nil ) and (t.radial_gradient == nil )

    cairo_save(cr)
    cairo_translate(cr, t.x, t.y)
    if t.rot_x~=0 or t.rot_y~=0 or t.angle~=0 then
        cairo_translate(cr,t.rot_x,t.rot_y)
        cairo_rotate(cr,t.angle*math.pi/180)
        cairo_translate(cr,-t.rot_x,-t.rot_y)
    end
    if t.scale_x~=1 or t.scale_y~=1 or t.skew_x~=0 or t.skew_y~=0 then
	    local matrix0 = cairo_matrix_t:create()
	    tolua.takeownership(matrix0)
	    cairo_matrix_init (matrix0, t.scale_x,math.pi*t.skew_y/180	, math.pi*t.skew_x/180	,t.scale_y,0,0)
	    cairo_transform(cr,matrix0)    
    end
    
    local tc=t_corners
    cairo_move_to(cr,tc[1][2],0)
    cairo_line_to(cr,t.w-tc[2][2],0)
    draw_corner(2,tc[2])
    cairo_line_to(cr,t.w,t.h-tc[3][2])
    draw_corner(3,tc[3])
    cairo_line_to(cr,tc[4][2],t.h)
    draw_corner(4,tc[4])
    cairo_line_to(cr,0,tc[1][2])
    draw_corner(1,tc[1])
    
    if t.no_gradient then
        cairo_set_source_rgba(cr,rgba_to_r_g_b_a(t.colour[1]))
    else
        if t.linear_gradient ~= nil then
            pat = cairo_pattern_create_linear (t.linear_gradient[1],t.linear_gradient[2],t.linear_gradient[3],t.linear_gradient[4])
        elseif t.radial_gradient ~= nil then
            pat = cairo_pattern_create_radial (t.radial_gradient[1],t.radial_gradient[2],t.radial_gradient[3],
            	t.radial_gradient[4],t.radial_gradient[5],t.radial_gradient[6])
        end
        for i=1, #t.colour do
            cairo_pattern_add_color_stop_rgba (pat, t.colour[i][1], rgba_to_r_g_b_a(t.colour[i]))
        end
        cairo_set_source (cr, pat)
        cairo_pattern_destroy(pat)
    end 
     
    cairo_set_operator(cr,t_operators[t.operator]) 

    if t.border>0 then
        cairo_close_path(cr)
        if t.dash ~= nil then cairo_set_dash(cr, t.dash, 1, 0.0) end
        cairo_set_line_width(cr,t.border)
        cairo_stroke(cr)
    else
        cairo_fill(cr)
    end

    cairo_restore(cr)
end
settings.lua:

Code : Tout sélectionner

function conky_vars()

    border_COLOR = "green" --options are green, blue, black, orange or default   
    
    use_FONT = "zekton"
    -- https://www.dafont.com/zekton.font
    
end

--[[
#########################
# conky-vnstat-lua      #
# by +WillemO @wim66    #
#  v1.5 23-dec-17       #
#                       #
#########################
]]
graphiccardfile:

Code : Tout sélectionner

double_buffer yes
update_interval 2
background yes

own_window yes

# own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_type override
own_window_argb_visual true
own_window_argb_value 0
out_to_console no
own_window_transparent no
own_window_class conky-semi
use_xft yes
xftfont cure:size=10

#use_xft yes
#xftfont Sansation:size=9
xftfont zekton:size=9
xftalpha 0
update_interval 2
cpu_avg_samples 2
net_avg_samples 2
double_buffer yes
maximum_width 320
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 1
border_width 0
default_color white
default_shade_color white
default_outline_color white
alignment top_right

use_spacer left
no_buffers yes
uppercase no

color0 white

color2 white
color3 1793d0
color4 42E147
color5 DCE142
color6 FAAD3E


pad_percents 2
top_name_width 10
minimum_size 320 100

gap_x 315
gap_y 205

lua_load allcombined.lua

TEXT
${image img/graphic_card.png -p -5,6 -s 30x30}
${offset 35}${font Good Times:size=12}${color Tan1}Carte Graphique ${color4}${hr 2}${font}
${color red}${font Ubuntu-Title:size=11}${exec nvidia-settings -q gpus |grep '0] (' | cut -d '(' -f 2,2 | sed -e 's/.\{1\}$//'}${font}${color4}${alignr}${exec nvidia-settings -q [gpu:0]/CUDACores -t} CUDA Cores
${voffset 10}${goto 80}${color5}Vitesse ventilateur: ${alignr}  ${color4}${exec nvidia-settings -q [fan:0]/GPUCurrentFanSpeedRPM -t} RPM
${goto 80}${color5}Ecran :${alignr}${color4}1920 x 1080-
${goto 80}${color5}Connector :${alignr}${color4}DVI-I-0
${goto 80}${color5}Driver :${alignr}${color4}${exec nvidia-settings -q 0/NvidiaDriverVersion -t}
${color6}Fréquence$alignr ${color4}${nvidia memfreq} / 3004 Mhz
${lua gradbar {6, 140, "${nvidia memfreq}" ,3004, 105, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${image img/trans-bg240.png -p 3,136 -s 314x11}
${color6}Mémoire vive${alignr}${color4}${exec nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t} / ${exec nvidia-settings -q [gpu:0]/TotalDedicatedGPUMemory -t} MiB 
${lua gradbar {6, 170, "${exec nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t}" ,1994
, 105, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${image img/trans-bg240.png -p 3,166 -s 314x11}
${color6}Température  ${alignr} ${color4}${exec nvidia-settings -q [thermalsensor:0]/ThermalSensorReading -t} °C
${lua gradbar {6, 200, "${exec nvidia-settings -q [thermalsensor:0]/ThermalSensorReading -t}" , 85, 105, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${image img/trans-bg240.png -p 3,196 -s 314x11}
${image img/Nvidia_logo.png -p 5,55 }
allcombined.lua:

Code : Tout sélectionner

--[[ by mrpeachy - 
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'

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

function conky_gradbar(bartab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(bgtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
local draw=bgtab[8]
local lwidth=bgtab[9]
local olcolor=bgtab[10]
local olalpha=bgtab[11]
if w==0 then 
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
if draw==1 then
cairo_fill (cr)
elseif draw==2 then
cairo_set_line_width (cr,lwidth)
cairo_stroke (cr)
elseif draw==3 then
cairo_fill_preserve (cr)
cairo_set_source_rgba (cr,rgb_to_r_g_b({olcolor,olalpha}))
cairo_set_line_width (cr,lwidth)
cairo_stroke (cr)
end
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(caltab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--####################################################################################################
local caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end     
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then 
dlen=35
plen=29 
else 
dlen=42 
plen=36
end
for i=1,dlen do
	if i<=start_day then 
	dnum[i]="  " 
	else 
	dn=i-start_day
		if dn=="nil" then dn=0 end
		if dn<=9 then dn=(spacer .. dn) end
		if i>x then dn="" end
		dnum[i]=dn
		dnumh[i]=dn
		if dn==(spacer .. today) or dn==today then
		dnum[i]=""
		end 
		if dn==(spacer .. today) or dn==today then
		dnumh[i]=dn
		place=i 
		else dnumh[i]="  " 
		end 
	end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
	for i=fn,fn+6 do
	cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
	cairo_show_text (cr, dnum[i])
	cairo_stroke (cr)
	end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
	for i=fn,fn+6 do
	cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
	cairo_show_text (cr, dnumh[i])
	cairo_stroke (cr)
	end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(imtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
local imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then 
width=imlib_image_get_width() 
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then 
height=imlib_image_get_height() 
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function

function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main function
Modifié en dernier par toryx le jeu. 25 juil. 2019 15:06, modifié 3 fois.
dual-boot: archlinux-cinnamon - windows11
CPU: i5 10600k - CM: MPG Z490 GP - RAM: Corsair Vengeance LPX DDR4 3200 MHz CL16 (4X 8GO)
GPU: NVIDIA GeForce RTX 3060 LH
NVIDIA GeForce GTX 1050 Ti (pasthrough vers qemu/kvm)
KVM: Windows 11 - MacOS Monterey

Avatar du membre
david37
modérateur
Messages : 3884
Enregistré le : lun. 22 août 2016 05:06

Re: Conky 2019

Message par david37 »

Un grand merci Loutch :D super interessant !!
PC1: Mobo: Gigabyte B550 AORUS Elite 2 / CPU: AMD Ryzen 7 3700X / GPU: MSI Radeon RX 580 Armor / RAM: 32 GB @3600 MHz CL16 / SSD: Samsung 970 EVO 500 GB / LM 20.2 Xfce
PC2: HP Pavilion 15 / AMD Ryzen 5 5500U with Radeon Graphics / 16GB RAM / 500 GB SSD / Debian 11 Xfce
PC3: Dell-Latitude E7240 / 2.1GHz i7-4600U / Intel Haswell-ULT HD 4400 / 8GB RAM / 250 GB Hard Drive / LM 20.2 Xfce

Avatar du membre
Christian_B
Messages : 438
Enregistré le : lun. 7 nov. 2016 10:44
Localisation : Paris

Re: Conky 2019

Message par Christian_B »

Bonjour,
Puisqu'il est question de conky, étant donné les résultats obtenus par certains, je suis tenté de m'y mettre, mais je n'y comprends strictement rien. J'ai l'impression qu'il me manque une intro ou un tutoriel pour démarrer.
Les docs html jointes (ou le man) donnent des tas d'infos sur des variables, des options etc ou même sa compilation, mais ne disent pas comment on s'en sert (ou ça m'a échappé).

Est-ce qu'il faut juste s'inspirer d'exemples et essayer au début de créer un fichier de config au petit bonheur la chance ? N'y a-t-il pas des règles syntaxiques de base de base à connaître ?

De plus j'ai cru comprendre qu'il existait deux versions fonctionnant différemment.
Comme l'install de conky ne crée aucun fichier de config par défaut et en fonction de ce que j'ai lu ici ou là, je ne sais même pas s'il faut créer un fichier ~/.conkyrc ou ~/.config/conky/conky.conf.
Quelqu'un pourrait-il m'aiguiller sur une explication claire pour commencer (si cela existe) ?
Merci.
Linux Mint 21.3 Mate 1.26.0. Carte Gigabyte H81N.
Intel Core i7-4770 : 4x2 cœurs + Xeon E3-1200 (= circuit 4600), sans carte graphique.
Mémoire 8 Go Dual channel, SSD 120Go, HD 2To.
Les armes nucléaires sont interdites depuis le 22 janvier 2021. Y a plus qu'à ...

Avatar du membre
arghlub
Administrateur du site
Messages : 10421
Enregistré le : dim. 21 mai 2017 08:19
Localisation : Provence
Contact :

Re: Conky 2019

Message par arghlub »

Salut Christian,

il va falloir que tu creuses un chouia ..... on va pas te donner la becquée ....
La littérature sur le net est abondante : https://search.lilo.org/results.php?q=c ... +des+conky
Tour1 (custom)CM MSI Z270 M3 | CPU Intel I7-7700K | CG Nvidia GTX 1080 | RAM 16Go | tripleBoot : Debian 11 | MXlinux 21 | LMint 19.3 | XFCE
Tour2 (custom)CM Gigabyte | CPU AMD Athlon 5200+ | CG Nvidia GTX 560 | RAM 6Go | FreeBSD 12.1 XFCE
Portable1 MSI GF75 Thin 9SC | CPU Intel I7-9750H | CG Nvidia GTX 1650 | RAM 32Go | dualBoot : LMint 20.2 | MXlinux 21 | XFCE
Portable2 MacBook Air A1466 (2015) | CPU Intel I5-5250U | CG Intel HD Graphics 6000 | RAM 8Go | dualBoot : macOS Sierra | MXlinux 21 XFCE
─────( pour une informatique libre ! -membre en stand-by de l' April.org────────────────

Avatar du membre
loutch
Messages : 517
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

hello


Image

le pack meteo est @ prendre ici:

http://bit.ly/1_2019-3-17 @ décompresser dans le home pas le .conky

conkyrcg (gauche)

Code : Tout sélectionner

  
conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=7',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 400, minimum_height = 470,
        maximum_width = 400,
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_outline_color = 'white',
	alignment = 'top_left',
	gap_x = 20,
	gap_y = 30,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 10000,


-- Taille des pointillés${execi 35000 bash $HOME/2_Wunderground_API/2_wun}
	stippled_borders = 5,

-- Couleurs
	default_color = '#000000',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

 lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[
 
     ${lua fDrawImage ~/.conky/conkyeos/icons/casee.png 0 0 390 480}
${voffset 6}${alignc}[${time %A,}${time %H:%M:%S}]
${alignc}${font Liberation Sans:size=20}${time %d %B %Y}$font
    ${lua fDrawImage ~/.conky/conkyeos/icons/bg-3.png 72 80 262 2} 
${goto 74}CPU 1: ${goto 160}${freq_g 0} Ghz ${goto 240}${exec sensors | grep "Core 0:" | cut -c17-23} ${alignr 84}${cpu cpu0}%
${goto 74}CPU 2: ${goto 160}${freq_g 1} Ghz ${goto 240}${exec sensors | grep "Core 1:" | cut -c17-23} ${alignr 84}${cpu cpu1}%
${goto 74}CPU 3: ${goto 160}${freq_g 2} Ghz ${goto 240}${exec sensors | grep "Core 2:" | cut -c17-23} ${alignr 84}${cpu cpu2}%
${goto 74}CPU 4: ${goto 160}${freq_g 3} Ghz ${goto 240}${exec sensors | grep "Core 3:" | cut -c17-23} ${alignr 78}${cpu cpu3}%  
${goto 74}CPU 5: ${goto 160}${freq_g 4} Ghz ${goto 240}${exec sensors | grep "Core 4:" | cut -c17-23} ${alignr 84}${cpu cpu4}%
${goto 74}CPU 6: ${goto 160}${freq_g 5} Ghz ${goto 240}${exec sensors | grep "Core 5:" | cut -c17-23} ${alignr 84}${cpu cpu5}%
${alignc}Températures
${goto 74}Carte: ${hwmon 1 temp 1}°C  Nvidia: ${nvidia temp}${color}°C | ${font Monofur:size=8}${nvidia gpufreq}Mhz | ${execi 5 nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t}MiB   ${goto 271}Data ${execi 120 hddtemp -n /dev/sda} °C 
${goto 74}${loadgraph 20,256 6db9d5 6db9d5 -l}
${voffset -1}${goto 74}RAM: ${goto 290}${mem}
${goto 74}TOTAL: ${goto 290}${memmax}
${goto 74}En service depuis :  ${alignr 74}${uptime}
    ${lua fDrawImage ~/.conky/conkyeos/icons/bg-3.png 72 234 262 2}
    ${if_existing /proc/net/route wlo1}${lua fDrawImage ~/.conky/conkyeos/icons/online.png 196 242 43 18}${else}${lua fDrawImage ~/.conky/conkyeos/icons/offline.png 196 242 43 18}${endif}
${voffset -10}${goto 100}Signal: ${wireless_link_qual_perc wlo1} % 
${goto 100}Sortant: ${upspeed wlo1}${goto 250}Entrant: ${downspeed wlo1}
${goto 74}${upspeedgraph wlo1 20,120 6db9d5 6db9d5}${goto 210}${downspeedgraph wlo1 20,120 6db9d5 6db9d5}
${goto 90}Envoyé:${totalup wlo1}${goto 250}Reçu:${totaldown wlo1}
     ${lua fDrawImage ~/.conky/conkyeos/icons/bg-3.png 72 310 262 2}
${goto 74}Processus: ${goto 310}${processes}
${goto 74}En cours:  ${goto 322}${running_processes}
${goto 74}${nodename_short}
${goto 74}${execi 86400 lsb_release -si} : ${execi 86400 lsb_release -sr} - ${execi 86400 lsb_release -sc}  $machine
${goto 74}Kernel: ${kernel}${color}

${goto 120}Racine ${goto 180}Home ${goto 272}Data
${goto 74}Ecr. : ${diskio_write /dev/nvme0n1p5} ${goto 166}Ecr. : ${diskio_write /dev/nvme0n1p5}  ${goto 260}Ecr. : ${diskio_write /dev/sda}
${goto 74}Lec. : ${diskio_read  /dev/nvme0n1p6} ${goto 166}Lec. : ${diskio_read  /dev/nvme0n1p5}  ${goto 260}Lec. : ${diskio_read  /dev/sda}
${goto 74}Raci:  ${fs_used_perc /}%             ${goto 166}Home: ${fs_used_perc /home}%           ${goto 260}Data : ${fs_used_perc /mnt/9d01359b-9705-43f9-be12-4d6d7f28b12b}%
${voffset -250}

]];

conyrcd (droite)

Code : Tout sélectionner

 
conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=7',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 400, minimum_height = 470,
        maximum_width = 400,
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_outline_color = 'white',
	alignment = 'top_right',
	gap_x = 20,
	gap_y = 30,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 10000,


-- Taille des pointillés
	stippled_borders = 5,

-- Couleurs
	default_color = '#000000',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

 lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[
 
${execi 1800 bash $HOME/1_accuweather/1_accuweather -f2016}
    ${lua fDrawImage ~/.conky/conkyeos/icons/casee.png 0 0 390 480}
${alignc 4}${font Liberation Sans:size=20}Sarreguemines$font
    ${lua fDrawImage ~/.conky/conkyeos/icons/bg-3.png 72 70 262 2} 
${voffset -8}${goto 190}${font Liberation Sans:size=20}${execi 90 sed -n '2p' $HOME/1_accuweather/curr_cond} °  (${execi 90 sed -n '3p' $HOME/1_accuweather/curr_cond} ° )$font
    ${lua fDrawImage $HOME/1_accuweather/forecast_2016/forecast_0.png 80 80 70 70} ${lua fDrawImage $HOME/1_accuweather/Wind1.png 80 140 70 70}
${voffset -10}${alignc}${execi 90 sed -n '4p' $HOME/1_accuweather/curr_cond}
${alignc}Vent : ${execi 90 sed -n '5p' $HOME/1_accuweather/curr_cond} à ${execi 90 sed -n '6p' $HOME/1_accuweather/curr_cond}
${alignc}Humidité : ${execi 90 sed -n '7p' $HOME/1_accuweather/curr_cond} 
${alignc}Pression : ${execi 90 sed -n '8p' $HOME/1_accuweather/curr_cond} 
${alignc}Indice UV : ${execi 90 sed -n '9p' $HOME/1_accuweather/curr_cond} 
${alignc}Couverture nuageuse : ${execi 90 sed -n '10p' $HOME/1_accuweather/curr_cond} 
${alignc}Plafond : ${execi 90 sed -n '11p' $HOME/1_accuweather/curr_cond} 
${alignc}Point de rosée: ${execi 90 sed -n '12p' $HOME/1_accuweather/curr_cond} 
${alignc}Visibilité : ${execi 90 sed -n '13p' $HOME/1_accuweather/curr_cond} 
${alignc}Soleil de ${execi 3600 sed -n '14p' $HOME/1_accuweather/curr_cond} à ${execi 3600 sed -n '15p' $HOME/1_accuweather/curr_cond} soit ${execi 3600 sed -n '16p' $HOME/1_accuweather/curr_cond}
${alignc}Lune de ${execi 3600 sed -n '18p' $HOME/1_accuweather/curr_cond} à ${execi 3600 sed -n '19p' $HOME/1_accuweather/curr_cond} soit ${execi 3600 sed -n '20p' $HOME/1_accuweather/curr_cond}
    ${lua fDrawImage ~/.conky/conkyeos/icons/bg-3.png 72 220 262 2}
${voffset -1}${goto 76}${execi 90 sed -n '1p' $HOME/1_accuweather/first_days}\
${goto 185}${execi 3600 echo `date --date="1 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="1 day" | awk '{print $2}'`}\
${goto 290}${execi 3600 echo `date --date="2 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="2 day" | awk '{print $2}'`}
${voffset -7}
${goto 76}${if_match "${execi 90 sed -n '4p' $HOME/1_accuweather/first_days}" == "Mi"} - ${else}${execi 90 sed -n '4p' $HOME/1_accuweather/first_days}${endif}°\
${goto 180}${execi 90 sed -n '9p' $HOME/1_accuweather/first_days}°\
${goto 290}${execi 90 sed -n '14p' $HOME/1_accuweather/first_days}°
    ${lua fDrawImage ~/.conky/conkyeos/icons/box.png 70 240 264 44}
    ${lua fDrawImage $HOME/1_accuweather/forecast_2016/forecast_2.png 70  251 30 30}\
    ${lua fDrawImage $HOME/1_accuweather/forecast_2016/forecast_3.png 180 251 30 30}\
    ${lua fDrawImage $HOME/1_accuweather/forecast_2016/forecast_4.png 290 251 30 30}\
${voffset 4}${goto 100}${execi 90 sed -n '3p' $HOME/1_accuweather/first_days}°\
${goto 210}${execi 90 sed -n '8p' $HOME/1_accuweather/first_days}°\
${goto 320}${execi 90 sed -n '13p' $HOME/1_accuweather/first_days}°
${voffset -6}${font Liberation Sans:size=6}
${goto 75}${execi 90 sed -n '5p' $HOME/1_accuweather/first_days| cut -c1-13}\
${goto 170}${execi 90 sed -n '10p' $HOME/1_accuweather/first_days| cut -c1-13}\
${goto 274}${execi 90 sed -n '15p' $HOME/1_accuweather/first_days| cut -c1-13}
${goto 75}${execi 90 sed -n '5p' $HOME/1_accuweather/first_days| cut -c14-29}\
${goto 170}${execi 90 sed -n '10p' $HOME/1_accuweather/first_days| cut -c14-29}\
${goto 274}${execi 90 sed -n '15p' $HOME/1_accuweather/first_days| cut -c14-29}
${goto 75}${execi 90 sed -n '5p' $HOME/1_accuweather/first_days| cut -c30-49}\
${goto 170}${execi 90 sed -n '10p' $HOME/1_accuweather/first_days| cut -c30-49}\
${goto 274}${execi 90 sed -n '15p' $HOME/1_accuweather/first_days| cut -c30-49}$font
 ${lua fDrawImage ~/.conky/conkyeos/icons/bg-3.png 72 318 262 2}
${voffset -1}${goto 76}${execi 3600 echo `date --date="3 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="3 day" | awk '{print $2}'`}\
${goto 185}${execi 3600 echo `date --date="4 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="4 day" | awk '{print $2}'`}\
${goto 290}${execi 3600 echo `date --date="5 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="5 day" | awk '{print $2}'`}
${voffset -7}
${goto 76}${execi 90 sed -n '19p' $HOME/1_accuweather/first_days}°\
${goto 180}${execi 90 sed -n '24p' $HOME/1_accuweather/first_days}°\
${goto 290}${execi 90 sed -n '4p' $HOME/1_accuweather/last_days}°  
${lua fDrawImage ~/.conky/conkyeos/icons/box.png 70 338 264 44}
    ${lua fDrawImage $HOME/1_accuweather/forecast_2016/forecast_5.png 70  348 30 30}\
    ${lua fDrawImage $HOME/1_accuweather/forecast_2016/forecast_6.png 180 348 30 30}\
    ${lua fDrawImage $HOME/1_accuweather/forecast_2016/forecast_7.png 290 348 30 30}\
${voffset 4}${goto 100}${execi 90 sed -n '18p' $HOME/1_accuweather/first_days}°\
${goto 210}${execi 90 sed -n '23p' $HOME/1_accuweather/first_days}°\
${goto 320}${execi 90 sed -n '3p' $HOME/1_accuweather/last_days}°
${voffset -6}${font Liberation Sans:size=6}
${goto 75}${execi 90 sed -n '20p' $HOME/1_accuweather/first_days| cut -c1-13}\
${goto 170}${execi 90 sed -n '25p' $HOME/1_accuweather/first_days| cut -c1-13}\
${goto 274}${execi 90 sed -n '5p' $HOME/1_accuweather/last_days| cut -c1-13}
${goto 75}${execi 90 sed -n '20p' $HOME/1_accuweather/first_days| cut -c14-29}\
${goto 170}${execi 90 sed -n '25p' $HOME/1_accuweather/first_days| cut -c14-29}\
${goto 274}${execi 90 sed -n '5p' $HOME/1_accuweather/last_days| cut -c14-29}$font
${execi 1800 bash $HOME/conky-meteo-dark_sky/3b1}
${voffset -10}
${alignc}${exec cat $HOME/conky-meteo-dark_sky/rawdata | jq --raw-output '.daily.summary' | cut -c1-61}
${alignc}${exec cat $HOME/conky-meteo-dark_sky/rawdata | jq --raw-output '.daily.summary' | cut -c62-160}
${voffset -250}

]];
script 3b1 faut une inscription pour la clé

Code : Tout sélectionner

#!/bin/bash

wget -O $HOME/conky-meteo-dark_sky/weather.json https://api.darksky.net/forecast/votre clé api /'latitude et longitude de votre ville'?'lang=fr&units=si'


Dark_Sky_icons () {
    case $1 in
         clear-day)
            echo 1
        ;;
         clear-night)
            echo 2
        ;;
         cloudy)
            echo 3
        ;;
         fog)
            echo 4
        ;;
         partly-cloudy-day)
            echo 5
        ;;
         partly-cloudy-night)
            echo 6
        ;;
         rain)
            echo 7
        ;;
         sleet)
            echo 8
        ;;
         snow)
            echo 9
        ;;
         wind)
            echo 10
        ;;
        esac
}

rm $HOME/conky-meteo-dark_sky/*.png

jq --raw-output . $HOME/conky-meteo-dark_sky/weather.json > $HOME/conky-meteo-dark_sky/rawdata

cp $HOME/conky-meteo-dark_sky/Dark_Sky_icons/$(Dark_Sky_icons $(jq --raw-output '.currently.icon' $HOME/conky-meteo-dark_sky/rawdata)).png $HOME/conky-meteo-dark_sky/Now.png

jq --raw-output '.daily.data[].icon' $HOME/conky-meteo-dark_sky/rawdata > $HOME/conky-meteo-dark_sky/daily-icon
sed 's/night/day/' $HOME/conky-meteo-dark_sky/daily-icon > $HOME/conky-meteo-dark_sky/daily-icons

for (( i=1; i<=8; i+=1 ))
    do
        cp $HOME/conky-meteo-dark_sky/Dark_Sky_icons/$(Dark_Sky_icons $(sed -n ${i}p $HOME/conky-meteo-dark_sky/daily-icons)).png $HOME/conky-meteo-dark_sky/d$(( i )).png
   done

#Hourly feature, commented out by default, uncomment if you wish so

#jq --raw-output '.hourly.data[].icon' $HOME/conky-meteo-dark_sky/rawdata > $HOME/conky-meteo-dark_sky/hourly-icons

#for (( j=1; j<=24; j+=1 ))
#    do
#        cp $HOME/conky-meteo-dark_sky/Dark_Sky_icons/$(Dark_Sky_icons $(sed -n ${j}p $HOME/conky-meteo-dark_sky/hourly-icons)).png $HOME/conky-meteo-dark_sky/h$(( j )).png
#   done

wind_dir=$(jq --raw-output '.currently.windBearing' $HOME/conky-meteo-dark_sky/rawdata)

#see usage of -lt, -gt, -ge and -le here: https://abs.traduc.org/abs-5.1-fr/ch07s03.html
if [[ $wind_dir -lt 12 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/01.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 33 ]]&&[[ $wind_dir -ge 12 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/02.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 55 ]]&&[[ $wind_dir -ge 33 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/03.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 78 ]]&&[[ $wind_dir -ge 55 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/04.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 101 ]]&&[[ $wind_dir -ge 78 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/05.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 123 ]]&&[[ $wind_dir -ge 101 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/06.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 146 ]]&&[[ $wind_dir -ge 123 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/07.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 168 ]]&&[[ $wind_dir -ge 146 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/08.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 191 ]]&&[[ $wind_dir -ge 168 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/09.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 213 ]]&&[[ $wind_dir -ge 191 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/10.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 236 ]]&&[[ $wind_dir -ge 213 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/11.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 258 ]]&&[[ $wind_dir -ge 236 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/12.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 281 ]]&&[[ $wind_dir -ge 258 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/13.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 303 ]]&&[[ $wind_dir -ge 281 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/14.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 326 ]]&&[[ $wind_dir -ge 303 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/15.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -lt 348 ]]&&[[ $wind_dir -ge 326 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/16.png $HOME/conky-meteo-dark_sky/Wind_dir.png
elif [[ $wind_dir -ge 348 ]]; then
cp $HOME/conky-meteo-dark_sky/vent/01.png $HOME/conky-meteo-dark_sky/Wind_dir.png
fi


les images
online.png
Image
offline.png
Image
bg-3.png
Image
casse.png
Image

@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

ZorKas
Messages : 177
Enregistré le : mer. 17 juil. 2019 16:56

Re: Conky 2019

Message par ZorKas »

Merci 8-)

Avatar du membre
ato-mike
Messages : 112
Enregistré le : mer. 5 oct. 2016 15:42
Localisation : Bruges-Capbis-Mifaget

Re: Conky 2019

Message par ato-mike »

Salut Loutch !!!!! j'ai l'impression que le conky 1_accuweather ne fonctionne plus et je viens de voir qu'il y a eu une refonte du site peux tu confirmer ?
Merci
Lenovo ideapad 330-17AST
Linux Mint 21.3 Cinnamon 6.0.4
Noyau : 6.7.3
CPU : AMD A6-9225 RADEON R4, 5 COMPUTE CORES 2C+3G × 2
Ram : 8Gb DDR4 2133

Avatar du membre
loutch
Messages : 517
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2019

Message par loutch »

Bonjour

oui tout le site @ changer

voici mon dossier accuweather avec les derniers scripts



https://drive.google.com/open?id=1Q2nCn ... KzbzsLsGS7



@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Répondre