C'est vraiment bizarre, chez moi j'arrive à le dé-ziper sans soucis en cliquant dessus en en demandant de l'extraire.
C'est en effet un conky avec un script lua.
Et il y a un deuxième script pour avoir le nom de la phase de la lune.
Je vais tout mettre ici, cela sera plus rapide.
Dans mon /home, j'ai un dossier appelé .conkyrc
dans ce dossier j'ai créé un dossier phase-lune
Dans ce dossier j'ai créé un dossier script avec deux scripts dedans :
get_image.sh
#!/bin/sh
dir="$HOME/.conkyrc/phase-lune/moon-phase"
mkdir -p $dir
cd $dir
wget --user-agent="Mozilla" http://static.die.net/moon/576.jpg -O "$dir/moon.jpg"
et phase.sh
#!/bin/bash
rm ~/.conkyrc/phase-lune/phase_lune.html
wget http://www.calendrier-lunaire.net/ -O ~/.conkyrc/phase-lune/phase_lune.html
cat ~/.conkyrc/phase-lune/phase_lune.html | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | grep "Nom de la phase" | awk '{print $6,$7}'
exit 0
Et pour finir, dans le dossier phase-lune j'ai le conkyrc et le script lua
conkyrc
# -- Conky settings -- #
background no
total_run_times 0
update_interval 3600
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
imlib_cache_size 0
# -- Window specifications -- #
own_window yes
#own_window_type normal
own_window_transparent yes
own_window_hints undecorate,skip_taskbar,skip_pager,below
own_window_argb_visual yes
#own_window_colour FFFFFF
#own_window_title square to round
border_inner_margin 0
border_outer_margin 0
minimum_size 180 180
alignment tl
gap_y 10
gap_x 50
# -- Text settings -- #
use_xft yes
xftfont MgOpen Modata L:size=10
xftalpha 0.5
uppercase no
default_color 000000
text_buffer_size 2048
imlib_cache_size 0
#--- LUA ---
lua_load ~/.conkyrc/phase-lune/square_to_round.lua
lua_draw_hook_post main /home/dominique/.conkyrc/phase-lune/moon-phase/moon.jpg
TEXT
${time %t}
${execpi 3600 ~/.conkyrc/phase-lune/script/get_image.sh}
${alignc}${color #30BAFF}${voffset 120}${execpi 3600 ~/.conkyrc/phase-lune/script/phase.sh}
et le script lua, nommé square_to_round.lua
square_to_round.lua
--[[ SQUARE_TO_ROUND WIDGET by Wlourf (07 April 2010, version 1.0.1)
http://u-scripts.blogspot.com/
This widget display a rounded image on your conky from a square image only.
Parameters are
filename --nom de l'image carrée en entrée
xc,yc --coordonnées du centre de l'image ronde par rapport au coin en haut à gauche de la fenêtre conky
radius --rayon du cercle final
angle --angle de rotation de l'image
radius_crop --dans l'image carrée, pourcentage du cercle à extraire par rapport au côté du carré(1-100)
period --converti l'image de carré à rond toutes les 'period' secondes
]]
require 'cairo'
require 'imlib2'
function convert_square(fileIn,fileOut,radius,angle,radius_crop)
--convert Input file from jpg to png, scale it and rotate it
local imageInput = imlib_load_image(fileIn)
local out_size = radius*2/(radius_crop/100)
imlib_context_set_image(imageInput)
w = imlib_image_get_width();
h = imlib_image_get_height();
imlib_image_set_format("png")
buffer = imlib_create_image(out_size,out_size);
imlib_context_set_image(buffer);
imlib_blend_image_onto_image(imageInput, 0,
0, 0, w, h,
0,0, out_size,out_size)
rot_img=imlib_create_rotated_image(angle*math.pi/180)
imlib_context_set_image(rot_img)
imlib_save_image(fileOut)
imlib_free_image()
imlib_context_set_image(buffer)
imlib_free_image()
imlib_context_set_image(imageInput)
imlib_free_image()
end
function crop_square_to_round(filename,xc,yc,radius)
local surface = cairo_image_surface_create_from_png(filename)
local img_w = cairo_image_surface_get_width (surface);
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)
cairo_translate(cr,xc-img_w/2,yc-img_w/2)
cairo_arc (cr, img_w/2,img_w/2, radius, 0, 2*math.pi)
cairo_clip (cr)
cairo_new_path (cr)
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
end
function display_round(filename,xc,yc,radius,angle,radius_crop,period)
if conky_window == nil then return end
--if tonumber(conky_parse('${updates}')) <2 then return end
local filepng = filename .. ".png"
local actual_time = os.time()
if last_time == nil then last_time=0 end
local actual_img = io.open(filepng,"r")
if last_time+period < actual_time or last_time == 0 or actual_img == nil then
print ('convert image ' .. filename)
convert_square(filename,filepng,radius,angle,radius_crop)
last_time=actual_time
end
crop_square_to_round(filepng,xc,yc,radius)
io.close()
end
--[[END OF SQUARE TO ROUND WIDGET]]
function conky_main(filename)
if conky_window == nil then return end
display_round(filename,
90,90,55, --xc,yc,radius
0, --angle
98, --radius_crop (1-100)
3600 --period
)
end
Il faudra surement que tu adaptes le différents chemins à ta configuration.