SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#4601 2013-01-15 09:07:40

lwfitz
#! Die Hard
From: Monrovia, CA
Registered: 2012-01-19
Posts: 886
Website

Re: The New Monster Conky Thread

taDJ4dw


taDJ4dg


You can find the config with all the custom icons for Teos accuweather_usa_images script here

And Teos weather scripts can be found here

Last edited by lwfitz (2013-01-15 18:31:11)

Offline

Be excellent to each other!

#4602 2013-01-15 10:38:18

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: The New Monster Conky Thread

do u have an idea why the image is created but won't open? it seems that it's broken (image doesn't contain any datas).

function webcam(wb)
-- call of the function
-- webcam({posx=0,posy=0,url='http://www.eso.org/public/webcams/vlt.jpg',hdd='/tmp/vlt.jpg'})
x=(wb.posx or 0)
y=(wb.posy or 0)
w=(wb.w or 200)
h=(wb.h or 200)
s=wb.url
s=string.gsub(s, ".*/(.*)", "%1")
--print("Substring:", s)
file="/tmp/"..s
intervall=(wb.iv or 60)
-- unique nummer: math.randomseed( os.time() )
-- or math.random

local updates = tonumber(conky_parse('${updates}'))
if (math.mod(updates, intervall) == 0) then
os.execute("wget  -q -O "..file..' "'..s..'"')
end --#
-- load image from harddisk
if file==nil then print("set image file") end
---------------------------------------------
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(w)==0 then 
width=imlib_image_get_width() 
else
width=tonumber(w)
end
if tonumber(h)==0 then 
height=imlib_image_get_height() 
else
height=tonumber(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(x, y)
imlib_free_image()
show=nil
end--function webcam ##################################################################

Offline

#4603 2013-01-15 13:13:55

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: The New Monster Conky Thread

I don't have time right now (12h shifts) but you may foolproof it outside of Conky, in pure LUA.
Just comment out everything of Conky origin and Imlib2, add hard-coded, necessary variables into code (url), and execute it in LUA.
Then see if image was pulled out to /tmp from net.


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#4604 2013-01-15 13:33:42

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 921

Re: The New Monster Conky Thread

@lionhead
How large is the file you get in the /tmp folder?
Have you tried opening the image file with a image viewer to see if it is any good?

You can also try changing all the

imlib_free_image()

in your code to

imlib_free_image_and_decache()

to see if it is caching problem.

Offline

#4605 2013-01-15 14:44:22

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: The New Monster Conky Thread

it's not a caching problem. the error still occurs!

the file within the tmp-folder has zero bytes.

Offline

#4606 2013-01-15 14:48:55

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 921

Re: The New Monster Conky Thread

^ Try putting a

print("wget  -q -O "..file..' "'..s..'"')

in your code and post what it prints in the terminal to see if your code is constructing the command incorrectly.

Last edited by arclance (2013-01-15 15:20:17)

Offline

#4607 2013-01-15 15:17:07

Mysterymason
New Member
Registered: 2012-11-27
Posts: 6

Re: The New Monster Conky Thread

How do I get conky translucent on startup with compton on 64-bit Waldorf? Any help would be greatly appreciated.

Offline

#4608 2013-01-15 16:13:47

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: The New Monster Conky Thread

this is the output of the command:

wget  -q -O /tmp/tad1.jpg "http://www.meteo.ot-admin.net/webcam/tad1.jpg"

Offline

#4609 2013-01-15 23:00:43

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 921

Re: The New Monster Conky Thread

^ I don't know what the problem could be then.

Offline

#4610 2013-01-16 00:18:07

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,404

Re: The New Monster Conky Thread

Mysterymason wrote:

How do I get conky translucent on startup with compton on 64-bit Waldorf? Any help would be greatly appreciated.

Start with this.


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#4611 2013-01-16 10:51:19

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: The New Monster Conky Thread

this works:

function webcam(wb)

--[[ 
call of the function

if u use only one webcam then call it like this:
webcam({posx=210,posy=0,w=200,h=200,url='http://www.meteo.ot-admin.net/webcam/tad1.jpg',iv=20})

but if u use more then one webcams then call it like this:
webcam({posx=210,posy=0,w=200,h=200,url='http://www.meteo.ot-admin.net/webcam/tad1.jpg',hdd='tad1.jpg',iv=20})
]]--

x=(wb.posx or 0)
y=(wb.posy or 0)
w=(wb.w or 200)
h=(wb.h or 200)
s=wb.url -- url of the webcam
nw=(wb.hdd or "webcam.jpg")
file='/home/'..username.."/"..nw  -- storage location of the grabbed image
intervall=(wb.iv or 60)
-- grab webcam image and save it to hdd
local updates = tonumber(conky_parse('${updates}'))
if (math.mod(updates, intervall) == 0) then
os.execute("wget  -q -O "..file..' "'..s..'"')
end --#
-- load image from harddisk
if file==nil then print("set image file") end
---------------------------------------------
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(w)==0 then 
width=imlib_image_get_width() 
else
width=tonumber(w)
end
if tonumber(h)==0 then 
height=imlib_image_get_height() 
else
height=tonumber(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_and_decache()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(x, y)
imlib_free_image_and_decache()
show=nil
end--function webcam ##################################################################

if u find some code to improve this script then feel free to make a proposal smile

i'm using the home-directory (to save the image) because sometimes the name of the temp-folder isn't the same. but the home-directory has always the same labeling wink

Offline

#4612 2013-01-17 13:30:33

ragamatrix
#! Junkie
From: Horgen Switzerland
Registered: 2012-12-05
Posts: 250

Re: The New Monster Conky Thread

Hi !
I'm trying the conky displayed with the background wich run the slideshow of nasa picture archive, status of earth, rain radar and calendars.The others are normal conkys.
Now the screen is full smile
fullscreen

Last edited by ragamatrix (2013-01-17 13:31:26)

Offline

#4613 2013-01-17 14:07:33

7vincent7black7
Member
Registered: 2012-05-20
Posts: 16

Re: The New Monster Conky Thread

[Post Contents Terminated by User]

Last edited by 7vincent7black7 (2013-01-20 00:04:49)


[ I Have No Greeting!]

Offline

#4614 2013-01-17 16:45:33

7vincent7black7
Member
Registered: 2012-05-20
Posts: 16

Re: The New Monster Conky Thread

[Post Contents Terminated by User]

Last edited by 7vincent7black7 (2013-01-20 00:04:33)


[ I Have No Greeting!]

Offline

#4615 2013-01-18 02:28:03

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

ragamatrix wrote:

Hi !
I'm trying the conky displayed with the background wich run the slideshow of nasa picture archive, status of earth, rain radar and calendars.The others are normal conkys.
Now the screen is full smile
fullscreen

Very Nice ragamatrix.
Mind sharing?

Offline

#4616 2013-01-18 07:47:11

ragamatrix
#! Junkie
From: Horgen Switzerland
Registered: 2012-12-05
Posts: 250

Re: The New Monster Conky Thread

EDIT for changing paths and names

@falldown
Hello!
Well how to find the easy way with these messy codes....
I tried to display the conky background clearer:
1358492951.jpg
On this web page you can have scripts for the weather conky background by clicking on the blue picture called Conky Fondecran:
Conky Fondecran
To set up and display data and scripts the file is called ~/your path/Accuweather/scripts/macomposition.sh

The most important is to set up correctly the defaut.cfg file with your local adress and your pathes, example with mine:
~/Accuweather/configs/defaut.cfg

web=http://www.accuweather.com/fr/ch/horgen/316407/current-weather/316407

I did the macomposition.sh with the horizontal calendar like that: Thanks to daniel38100 (french ubuntu forum) for the calendar
macomposition.sh:

#!/bin/bash
##########################################
# Crée par JPDipsy v1.4                  #
##########################################
repville=`echo $web | cut -d / -f6-7`
# initialisation variables ----------------------------------------------------
repertimages=$TempShell/$repville
reptemp=$repertimages/cartouches
imagetemp=$repertimages/cartouches/temp.png
imagetemp1=$repertimages/cartouches/temp1.png
fondbase=$repsauv/fond-base.png
fondtravail=$repsauv/fond-travaille.png
#------------------------------------------------------------------------------
if [[ ! -d  $reptemp ]]; then
mkdir $repertimages/cartouches
fi
#------------------ Variables que vous pouvez modifier ------------------------
fonte=Helvetica-LT-Std-Bold			 # fonte generique 
fonte1=Spaceship-Bullet-Normal    # fonte ville
fonte2=Times-Bold
fonte3=Monaco-Regular					 # fonte cond act
couleur1=white ; couleur2=orangered	 # couleur texte
# couleur texte					 
couleur1="white" 
couleur2="orange"
couleur3="cyan"
couleur4="yellow"
couleur5="#C16600"
couleur6="honeydew2"
couleur7="orangered"
couleur8="orangered"
couleur9="orangered"
# couleurs paliers temp
coultemp1="aqua"
coultemp2="dodgerblue1"
coultemp3="yellow"
coultemp4="white"
coultemp5="springgreen"
coultemp6="red"
coultemp7="black"
# couleurs paliers temp
coultemp1="blue4"
coultemp2="dodgerblue1"
coultemp3="yellow"
coultemp4="white"
coultemp5="springgreen"
coultemp6="red"
coultemp7="black"
# couleurs paliers vent
coulvent1="orange"
coulvent2="dodgerblue1"
coulvent3="yellow"
coulvent4="white"
coulvent5="#0EAF00"
coulvent6="red"
coulvent7="blue"
coulvent8="gold"
coulvent9="black"
coulvent10="#00003F"
# Décalage depuis haut de l'ecran ex + 50 pour descendre -10 pour monter
decalagehaut=50

# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal  50 taille moitié 
taille_ville=100
# position de 0 à ce que vous voulez pour aligner avec une autre fonte
# ex : -10 pour descendre +10 pour remonter
position_ville=100 

# lunaison --------------------------------------------------------------------
convert -size 130x130 xc:transparent $TempShell/lune.png -gravity center -geometry 60x60+0+0 -composite $reptemp/lune.png
convert -background none -fill blue -font $fonte2 -pointsize 13 -gravity center    label:"{{Lune_ephemerides}}" -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp
composite  -gravity center -background transparent -geometry +0+40   $imagetemp $reptemp/lune.png $reptemp/lune.png

# ville -----------------------------------------------------------------------
convert -background transparent -font $fonte1  -pointsize 80 -fill dodgerblue  label:"{{Meteo_Ville}}" \
\( +clone -background  Darkblue -shadow 120x1+2+2 \)  +swap -background transparent -compose over -layers merge +repage  \
 $imagetemp
convert $imagetemp  -channel A  -blur 0x4 +channel  -fill skyblue  -colorize 0% $imagetemp1
convert  -size 300x120 xc:transparent $imagetemp1 -background transparent -gravity center -geometry +0-0  -composite \
$imagetemp -background transparent -gravity center  -composite $reptemp/ville.png


# conditions actuelles --------------------------------------------------------
act1="{{Meteo_CondMeteo1se}}"
act2="{{Meteo_CondMeteo2se}}"

if [ "$act2" != " " ];then
convert -font $fonte2 -pointsize 23 \
-background none  label:"$act1\n    .. $act2" \
\( +clone -sparse-color barycentric '0,%h gold %w,0 red' \) \
\( +clone -background black  -shadow 100x2+2+2 \) +swap -background transparent -compose over -layers merge +repage $imagetemp
convert  -size 450x50 xc:transparent $imagetemp -background transparent -gravity center  -composite $reptemp/condactuel.png
else
convert -font $fonte2 -pointsize 23 \
-background none  label:"$act1" \
\( +clone -sparse-color barycentric '0,%h gold %w,0 red' \) \
\( +clone -background black  -shadow 100x2+2+2 \) +swap -background transparent -compose over -layers merge +repage $imagetemp
convert  -size 450x50 xc:transparent $imagetemp -background transparent -gravity center  -composite $reptemp/condactuel.png
fi

# temperatures ----------------------------------------------------------------
function coultemp
{
if  (($temp < -5 )); then 
coul=$coultemp1
elif (($temp < 1 && $temp > -6 )); then
coul=$coultemp2
elif (($temp < 6 && $temp > 0)); then
coul=$coultemp3
elif (($temp < 20 && $temp > 5 )); then
coul=$coultemp4
elif (($temp < 25 && $temp > 19 )); then
coul=$coultemp5
elif (($temp > 24 )); then
coul=$coultemp6
else coul=$coultemp7
fi
}
function coultemp1
{
if  (($temp < -5 )); then 
coul=$coultemp1
elif (($temp < 1 && $temp > -6 )); then
coul=$coultemp2
elif (($temp < 6 && $temp > 0)); then
coul=$coultemp3
elif (($temp < 20 && $temp > 5 )); then
coul=$coultemp4
elif (($temp < 25 && $temp > 19 )); then
coul=$coultemp5
elif (($temp > 24 )); then
coul=$coultemp6
else coul=$coultemp7
fi
}
# vent ------------------------------------------------------------------------
function coulvent
{
if  (($vent < 1 )); then 
coul1=$coulvent4
elif (( $vent < 11 && $vent > 0 )); then
coul1=$coulvent5
elif (($vent < 21 && $vent > 10)); then
coul1=$coulvent3
elif (($vent < 31 && $vent > 20 )); then
coul1=$coulvent1
elif (($vent < 61 && $vent > 30 )); then
coul1=$coulvent6
elif (($vent > 60 )); then
coul1=$coulvent7
else coul1=$coulvent7
fi
}
function coulvent1
{
if  (($vent < 1 )); then 
coul1=$coulvent4
elif (( $vent < 11 && $vent > 0 )); then
coul1=$coulvent5
elif (($vent < 21 && $vent > 10)); then
coul1=$coulvent3
elif (($vent < 31 && $vent > 20 )); then
coul1=$coulvent1
elif (($vent < 61 && $vent > 30 )); then
coul1=$coulvent6
elif (($vent > 60 )); then
coul1=$coulvent7
else coul1=$coulvent7
fi
}
function risqueverglas
{
verglas="non"
if  (($temp < 5 )); then 
verglas="oui"
fi
}

temp={{Meteo_TempAct}} ; coultemp
convert -background transparent  -font $fonte  -pointsize 28 -fill $coul label:$temp"°" $reptemp/max.png
temp={{Meteo_TempRes}} ;risqueverglas; coultemp
convert -background transparent  -font $fonte  -pointsize 14 -fill $couleur1 label:"/" -fill $coul label:$temp"°" +append   $reptemp/ress.png
temp={{Meteo_Jour_Temp 1}} ; coultemp
convert -background transparent  -font Helvetica-LT-Std-Bold  -pointsize 14 -fill $couleur1 label:"Max : " -fill $coul label:$temp"°" +append $reptemp/max1.png

# temp la plus basse

function plusbas
{
if (("$temp1" < "$bas")); then
bas="$temp1"
fi
}

temp="{{Meteo_TempAct}}";temp1="{{Meteo_TempRes}}";bas="$temp";plusbas
temp1="{{Meteo_Soiree_TempMinRes 1}}";plusbas
temp1="{{Meteo_Nuit_TempRes 1}}";plusbas
temp=$bas;risqueverglas; coultemp
convert -background transparent  -font Helvetica-LT-Std-Bold  -pointsize 14 -fill $couleur1 label:"+Bas : " -fill $coul label:$temp"°" +append $reptemp/min.png
#-------------------------------------
convert  -size 120x120 xc:transparent \
$reptemp/max.png -background transparent -gravity  NorthEast -geometry +48+2 -composite \
$reptemp/ress.png -background transparent -gravity  Northwest -geometry +58+13 -composite \
$reptemp/max1.png -background transparent -gravity North -geometry +0+31 -composite \
$reptemp/min.png -background transparent -gravity North -geometry +0+49 -composite \
$reptemp/temps.png

rm $reptemp/max.png ;rm $reptemp/max1.png ; rm $reptemp/ress.png ;rm $reptemp/min.png
# Historique ------------------------------------------------------------------
# à ajouter positionnement
convert $reptemp/temps.png -background transparent -gravity North -font $fonte  -pointsize 13 -fill $couleur1 \
-annotate +0+72 "Historique" \
-pointsize 16 -fill $couleur1 -annotate +0+107  "{{Meteo_Histo_Max 1}}° / {{Meteo_Histo_Min 1}}°"  $reptemp/temps.png
# incruste année --------------------------------------------------------------
an=`date +"%Y"`
convert -background transparent -fill $couleur2 -font $fonte -stroke black -pointsize 18  label:$[$an-1] $imagetemp
composite -compose Over -gravity  North -geometry +0+87 -dissolve 40,95  $imagetemp  $reptemp/temps.png $reptemp/temps.png
# 
convert $reptemp/temps.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/temps.png

# icone conditions actuel
convert  {{Meteo_IconeM $IconesRep 0,0 0x0 60}} -resize 60% -bordercolor None -border 20x20 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/ico_cond.png
#creation cartouche -----------------------------------------------------------
convert -size 180x175 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,1 179,174 10,10" $imagetemp
# données meteo cartouche 1 ---------------------------------------------------
#prochaine M.a.j 

heure={{Meteo_Heure}}
if (( `echo ${heure:0:1}` == 0 ));then  heure=`echo ${heure:1:1}` ; fi
 
mins={{Meteo_Minute}}
if (( `echo ${mins:0:1}` == 0 ));then  mins=`echo ${mins:1:1}` ; fi
 
secact=$(($heure*3600+$mins*60))
proch=$(($update+$secact))
resproch=`printf "%02dh%02d" $(($proch/3600))  $(($proch/60%60))`


bord=10 ;pos1=88 ;pos2=95 ;posdepart=10 ;ecart=12

for (( x=1 ; x<10 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 \
-annotate +$pos1+$(((ecart*x)+posdepart)) ":" \
$imagetemp
done

if [ "$verglas" = "oui" ];then
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur6 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "{{Meteo_Jour_ProbPrec 1}} %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "{{Meteo_Humidite}} %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Vent force" -annotate +$pos2+$(((ecart*2)+posdepart)) "{{Meteo_VentForce}} km/h" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Vent dir." -annotate +$pos2+$(((ecart*3)+posdepart)) "{{Meteo_VentDirP}}" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Raf Max" -annotate +$pos2+$(((ecart*4)+posdepart)) "{{Meteo_Jour_VentRafales 1}} Km/h " \
-annotate +$bord+$(((ecart*5)+posdepart)) "Pluie / Neige" -annotate +$pos2+$(((ecart*5)+posdepart)) "{{Meteo_Jour_QPluie 1}} mm / {{Meteo_Jour_QNeige 1}} cm" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Verglas" -annotate +$pos2+$(((ecart*6)+posdepart)) "{{Meteo_Jour_EVerglas 1}} mm" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Pression" -annotate +$pos2+$(((ecart*7)+posdepart)) "{{Meteo_Pression}} mb" \
-annotate +$bord+$(((ecart*8)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*8)+posdepart)) "{{Meteo_Visibilite}} km U.V : {{Meteo_Uv}}" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Levé / Couché" -annotate +$pos2+$(((ecart*9)+posdepart)) "{{Meteo_HLeverSoleil 1}}h{{Meteo_MLeverSoleil 1}} / {{Meteo_HCoucherSoleil 1}}h{{Meteo_MCoucherSoleil 1}}" \
-annotate +$bord+$(((ecart*10)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*10)+posdepart)) "{{Meteo_HDureeJour 1}}h{{Meteo_MDureeJour 1}}" \
-annotate +$bord+$(((ecart*11)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*11)+posdepart)) "{{Meteo_Heure}}h{{Meteo_Minute}}" \
-annotate +$bord+$(((ecart*12)+posdepart)) "Prochaine   à" -annotate +$pos2+$(((ecart*12)+posdepart)) "$resproch" \
$imagetemp
else

convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "{{Meteo_Jour_ProbPrec 1}} %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "{{Meteo_Humidite}} %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Vent force" -annotate +$pos2+$(((ecart*2)+posdepart)) "{{Meteo_VentForce}} km/h" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Vent dir." -annotate +$pos2+$(((ecart*3)+posdepart)) "{{Meteo_VentDirP}}" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Raf Max" -annotate +$pos2+$(((ecart*4)+posdepart)) "{{Meteo_Jour_VentRafales 1}} Km/h " \
-annotate +$bord+$(((ecart*5)+posdepart)) "Pluie " -annotate +$pos2+$(((ecart*5)+posdepart)) "{{Meteo_Jour_QPluie 1}} mm " \
-annotate +$bord+$(((ecart*6)+posdepart)) "Pression" -annotate +$pos2+$(((ecart*6)+posdepart)) "{{Meteo_Pression}} mb" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*7)+posdepart)) "{{Meteo_Visibilite}} km" \
-annotate +$bord+$(((ecart*8)+posdepart)) "U.V" -annotate +$pos2+$(((ecart*8)+posdepart)) "{{Meteo_Uv}}" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Levé / Couché" -annotate +$pos2+$(((ecart*9)+posdepart)) "{{Meteo_HLeverSoleil 1}}h{{Meteo_MLeverSoleil 1}} / {{Meteo_HCoucherSoleil 1}}h{{Meteo_MCoucherSoleil 1}}" \
-annotate +$bord+$(((ecart*10)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*10)+posdepart)) "{{Meteo_HDureeJour 1}}h{{Meteo_MDureeJour 1}}" \
-annotate +$bord+$(((ecart*11)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*11)+posdepart)) "{{Meteo_Heure}}h{{Meteo_Minute}}" \
-annotate +$bord+$(((ecart*12)+posdepart)) "Prochaine   à" -annotate +$pos2+$(((ecart*12)+posdepart)) "$resproch" \
$imagetemp 
fi

#------------------------------------------------------------------------------
# ombres cartouche
convert $imagetemp -bordercolor None -border 10x10 \( +clone -background black -shadow 100x2 \) \
-compose DstOver -composite -compose Over $reptemp/actuel.png
# versions ---------------------------------------------------------------------
#convert -background none -fill orange -font $fonte -pointsize 10 \
#label:"Dernière mise à jour météo : {{Meteo_Jour %a_%d_%b_%Y 1}} à {{Meteo_Heure}}h{{Meteo_Minute}}" -trim \
#\( +clone -background grey19  -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/maj.png
convert -background none -fill orange -font $fonte -pointsize 10 \
label:"Météo-Lua {{Version}} - Image-Météo {{Image_version}}" -trim \
\( +clone -background grey19  -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/versions.png

# rose des vents --------------------------------------------------------------
# creation rose
# "{{Images_Rose 0,0 120x120 60 100}}" # laisser commenté
convert $repertimages/Rose.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/Rose.png
###############################################################################
#                                                                             #
#                                                                             #
#-----------------------------------Calendrier 1------------------------------#
#                                                                             #
#                                                                             #
###############################################################################
samedi="SAM"
dimanche="DIM"
function calendar
{
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul3=$coulvent6
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul3=$coulvent1
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul3=$coulvent3
else coul3=$coulvent7
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
fonts1=18
else fonts1=16
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
pos13=1
else pos13=0
fi
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul4=$coulvent8
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul4=$coulvent10
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul4=$coulvent10
else coul4=$coultemp7
fi
}

# Cartouche Calendar 2 --------------------------------------------------------

convert -size 1440x50 xc:none  -fill none  $imagetemp
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23

calen1[0]=`date +%^a%d --date '-30 days'`
calen1[1]=`date +%^a%d --date '-29 days'`
calen1[2]=`date +%^a%d --date '-28 days'`
calen1[3]=`date +%^a%d --date '-27 days'`
calen1[4]=`date +%^a%d --date '-26 days'`
calen1[5]=`date +%^a%d --date '-25 days'`
calen1[6]=`date +%^a%d --date '-24 days'`
calen1[7]=`date +%^a%d --date '-23 days'`
calen1[8]=`date +%^a%d --date '-22 days'`
calen1[9]=`date +%^a%d --date '-21 days'`
calen1[10]=`date +%^a%d --date '-20 days'`
calen1[11]=`date +%^a%d --date '-19 days'`
calen1[12]=`date +%^a%d --date '-18 days'`
calen1[13]=`date +%^a%d --date '-17 days'`
calen1[14]=`date +%^a%d --date '-16 days'`
calen1[15]=`date +%^a%d --date '-15 days'`
calen1[16]=`date +%^a%d --date '-14 days'`
calen1[17]=`date +%^a%d --date '-13 days'`
calen1[18]=`date +%^a%d --date '-12 days'`
calen1[19]=`date +%^a%d --date '-11 days'`
calen1[20]=`date +%^a%d --date '-10 days'`
calen1[21]=`date +%^a%d --date '-9 days'`
calen1[22]=`date +%^a%d --date '-8 days'`
calen1[23]=`date +%^a%d --date '-7 days'`
calen1[24]=`date +%^a%d --date '-6 days'`
calen1[25]=`date +%^a%d --date '-5 days'`
calen1[26]=`date +%^a%d --date '-4 days'`
calen1[27]=`date +%^a%d --date '-3 days'`
calen1[28]=`date +%^a%d --date '-2 days'`
calen1[29]=`date +%^a%d --date '-1 days'`
calen1[30]=`date +%^a%d --date '0 days'`
calen1[31]=`date +%^a%d --date '+1 days'`
calen1[32]=`date +%^a%d --date '+2 days'`
calen1[33]=`date +%^a%d --date '+3 days'`
calen1[34]=`date +%^a%d --date '+4 days'`
calen1[35]=`date +%^a%d --date '+5 days'`
calen1[36]=`date +%^a%d --date '+6 days'`
calen1[37]=`date +%^a%d --date '+7 days'`
calen1[38]=`date +%^a%d --date '+8 days'`
calen1[39]=`date +%^a%d --date '+9 days'`
calen1[40]=`date +%^a%d --date '+10 days'`
calen1[41]=`date +%^a%d --date '+11 days'`
calen1[42]=`date +%^a%d --date '+12 days'`
calen1[43]=`date +%^a%d --date '+13 days'`
calen1[44]=`date +%^a%d --date '+14 days'`
calen1[45]=`date +%^a%d --date '+15 days'`
calen1[46]=`date +%^a%d --date '+16 days'`
calen1[47]=`date +%^a%d --date '+17 days'`
calen1[48]=`date +%^a%d --date '+18 days'`
calen1[49]=`date +%^a%d --date '+19 days'`
calen1[50]=`date +%^a%d --date '+20 days'`
calen1[51]=`date +%^a%d --date '+21 days'`
calen1[52]=`date +%^a%d --date '+22 days'`
calen1[53]=`date +%^a%d --date '+23 days'`
calen1[54]=`date +%^a%d --date '+24 days'`
calen1[55]=`date +%^a%d --date '+25 days'`
calen1[56]=`date +%^a%d --date '+26 days'`
calen1[57]=`date +%^a%d --date '+27 days'`
calen1[58]=`date +%^a%d --date '+28 days'`
calen1[59]=`date +%^a%d --date '+29 days'`
calen1[60]=`date +%^a%d --date '+30 days'`
calen1[61]=`date +%^a%d --date '+31 days'`


for (( x=0 ; x<62 ; x++ ));do
cale1=`echo ${calen1[x]}`;calendar
echo ${calen1[x]} | tr '.' '\012' | cut -c1-2 |\
convert -background none -fill $coul3 -font $fonte3 -pointsize $fonts1 -gravity center    label:@- -trim \
\( +clone -background $coul4  -shadow 100x1 -channel A -level 0,7% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +$(((pos12*x-pos13)+dep1))+2 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
done

# ombres cartouche 5 ----------------------------------------------------------

convert $imagetemp -bordercolor None -border 11x11 \( +clone -background none -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/cartouche5.png
###############################################################################
# Prévisions cartouche 6 huit heures ######################################################
###############################################################################
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23
convert -size 205x305 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,204,304,10,10" $imagetemp
# Prévisions ------------------------------------------------------------------
echo -n "Prévisions" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center    label:@- -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,7% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
echo -n "Huit Heures" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center    label:@- -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,7% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity east -background transparent -geometry +4+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
rot=353 ; pos1=23 ; pos2=138 ; pos3=145 ; posdepart=20 ; posdepart1=37 ;ecart=35

# Tableaux jours - vent dir - vent force --------------------------------------
heure[1]={{Meteo_huitHeures_Heure 1}};heure[2]={{Meteo_huitHeures_Heure 2}};heure[3]={{Meteo_huitHeures_Heure 3}};heure[4]={{Meteo_huitHeures_Heure 4}};heure[5]={{Meteo_huitHeures_Heure 5}};heure[6]={{Meteo_huitHeures_Heure 6}};heure[7]={{Meteo_huitHeures_Heure 7}};heure[8]={{Meteo_huitHeures_Heure 8}}
ventd[1]={{Meteo_huitHeures_VentDir 1}};ventd[2]={{Meteo_huitHeures_VentDir 2}};ventd[3]={{Meteo_huitHeures_VentDir 3}}
ventd[4]={{Meteo_huitHeures_VentDir 4}};ventd[5]={{Meteo_huitHeures_VentDir 5}};ventd[6]={{Meteo_huitHeures_VentDir 6}}
ventd[7]={{Meteo_huitHeures_VentDir 7}};ventd[8]={{Meteo_huitHeures_VentDir 8}}
ventf[1]={{Meteo_huitHeures_VentForce 1}};ventf[2]={{Meteo_huitHeures_VentForce 2}};ventf[3]={{Meteo_huitHeures_VentForce 3}}
ventf[4]={{Meteo_huitHeures_VentForce 4}};ventf[5]={{Meteo_huitHeures_VentForce 5}};ventf[6]={{Meteo_huitHeures_VentForce 6}}
ventf[7]={{Meteo_huitHeures_VentForce 7}};ventf[8]={{Meteo_huitHeures_VentForce 8}};
for (( x=1 ; x<9 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur6 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "${heure[x]} heure" $imagetemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur5 \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent1
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done

# températures -----------------------------------------------------------------

# temp max jour/nuit
tempheure[1]={{Meteo_huitHeures_Temp 1}};tempheure[2]={{Meteo_huitHeures_Temp 2}};tempheure[3]={{Meteo_huitHeures_Temp 3}}
tempheure[4]={{Meteo_huitHeures_Temp 4}};tempheure[5]={{Meteo_huitHeures_Temp 5}};tempheure[6]={{Meteo_huitHeures_Temp 6}}
tempheure[7]={{Meteo_huitHeures_Temp 7}};tempheure[8]={{Meteo_huitHeures_Temp 8}}


for (( x=1 ; x<9 ; x++ ));do
temp=${tempheure[x]};coultemp1 
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +155+$(((ecart*x-ecart)+posdepart1)) "${tempheure[x]}°C" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=17

icond2[1]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 1}};icond2[2]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 2}};icond2[3]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 3}}
icond2[4]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 4}};icond2[5]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 5}};icond2[6]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 6}};icond2[7]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 7}};icond2[8]={{Meteo_huitHeures_IconeM $IconesRep 0,0 0x0 60 8}}
ivent2[1]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 1}};ivent2[2]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 2}};ivent2[3]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 3}};ivent2[4]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 4}};ivent2[5]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 5}};ivent2[6]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 6}};ivent2[7]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 7}};ivent2[8]={{Meteo_huitHeures_IconeV $IconesRep/vent 0,0 0x0 60 8}}

for (( x=1 ; x<9 ; x++ ));do
convert $imagetemp ${icond2[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent2[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche 6 ----------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/cartouche6.png

# Prévisions cartouche 1 ------------------------------------------------------
convert -size 200x200 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,195,5,5" $imagetemp
# Prévisions ------------------------------------------------------------------
echo -n "Prévisions" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center    label:@- -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
rot=353 ; pos1=23 ; pos2=138 ; pos3=145 ; posdepart=20 ; posdepart1=37 ;ecart=35

# Tableaux jours - vent dir - vent force
jour[1]={{Meteo_Jour %a 2}};jour[2]={{Meteo_Jour %a 3}};jour[3]={{Meteo_Jour %a 4}};jour[4]={{Meteo_Jour %a 5}};jour[5]={{Meteo_Jour %a 6}}
ventd[1]={{Meteo_Jour_VentDirP 2}};ventd[2]={{Meteo_Jour_VentDirP 3}};ventd[3]={{Meteo_Jour_VentDirP 4}}
ventd[4]={{Meteo_Jour_VentDirP 5}};ventd[5]={{Meteo_Jour_VentDirP 6}}
ventf[1]={{Meteo_Jour_VentForce 2}};ventf[2]={{Meteo_Jour_VentForce 3}};ventf[3]={{Meteo_Jour_VentForce 4}}
ventf[4]={{Meteo_Jour_VentForce 5}};ventf[5]={{Meteo_Jour_VentForce 6}}
for (( x=1 ; x<6 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "${jour[x]}" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done

# températures -----------------------------------------------------------------
# slash
for (( x=0 ; x<5 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur1 \
-annotate +$((pos1+18))+$(((ecart*x)+posdepart1)) "/" $imagetemp
done
# temp max jour/nuit
tempjour[1]={{Meteo_Jour_Temp 2}};tempjour[2]={{Meteo_Jour_Temp 3}};tempjour[3]={{Meteo_Jour_Temp 4}}
tempjour[4]={{Meteo_Jour_Temp 5}};tempjour[5]={{Meteo_Jour_Temp 6}}
tempnuit[1]={{Meteo_Nuit_Temp 2}};tempnuit[2]={{Meteo_Nuit_Temp 3}};tempnuit[3]={{Meteo_Nuit_Temp 4}}
tempnuit[4]={{Meteo_Nuit_Temp 5}};tempnuit[5]={{Meteo_Nuit_Temp 6}}

for (( x=1 ; x<6 ; x++ ));do
temp=${tempnuit[x]};coultemp 
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11  -fill $coul \
-annotate +$((pos1+22))+$(((ecart*x-ecart)+posdepart1)) "${tempnuit[x]}°" $imagetemp
temp=${tempjour[x]};coultemp 
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-ecart)+posdepart1)) "${tempjour[x]}°" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=17
icond[1]={{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 2}};icond[2]={{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 3}};icond[3]={{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 4}}
icond[4]={{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 5}};icond[5]={{Meteo_Jour_IconeM $IconesRep 0,0 0x0 60 6}}
ivent[1]={{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 2}};ivent[2]={{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 3}};ivent[3]={{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 4}};
ivent[4]={{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 5}};ivent[5]={{Meteo_Jour_IconeV $IconesRep/vent 0,0 0x0 60 6}}
for (( x=1 ; x<6 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/previsions.png
# nettoyage -------------------------------------------------------------------
rm $imagetemp1; rm $imagetemp
# Mise en forme de l'image ----------------------------------------------------
# mise à l'echelle du fond
convert -resize $ecran! $repsauv/fond-base.png $repsauv/fond-base.png
# mise en forme ville
convert -resize $taille_ville% $reptemp/ville.png $reptemp/ville.png


# assemblage
# ajout couverture nuageuse
$cheminref/scripts/imagesat-couvnuage.sh
~/développement/pgcrs-0.2.1/random-nasa-wallpaper.pl > /dev/null 2>&1
~/.conky/script/image_nasa_ghost.sh
~/.conky/script/detour_terre2.sh 
# pour réglage positionnement si besoin jouez sur  les nombre de -geometry -210+$((10+decalagehaut)) 
# -geometry ±posdroitegauche±hautbas
convert $fondbase \
~/wallpapers/image_nasa_ghost_blue.png -background transparent -gravity North  -geometry -300+$((400+decalagehaut)) -composite \
~/image1.png -background transparent -gravity North  -geometry +500+$((390+decalagehaut)) -composite \
/tmp/imagesat-couvnuage.png -background transparent -gravity North  -geometry +490+$((45+decalagehaut)) -composite \
$reptemp/ico_cond.png -background transparent -gravity North  -geometry -210+$((10+decalagehaut)) -composite \
$reptemp/lune.png  -background transparent -gravity North  -geometry +205+$((-2+decalagehaut)) -composite \
$reptemp/ville.png -background transparent -gravity center  -geometry +0-$((400+position_ville-decalagehaut)) -composite \
$reptemp/condactuel.png -background transparent -gravity North  -geometry -0+$((85+decalagehaut)) -composite \
$reptemp/temps.png -background transparent -gravity North  -geometry -62+$((120+decalagehaut)) -composite \
$reptemp/Rose.png -background transparent -gravity North  -geometry +38+$((118+decalagehaut)) -composite \
$reptemp/actuel.png -background transparent -gravity North  -geometry -200+$((120+decalagehaut)) -composite \
$reptemp/previsions.png -background transparent -gravity North  -geometry +205+$((115+decalagehaut)) -composite \
$reptemp/versions.png -background transparent -gravity North  -geometry +0+$((255+decalagehaut)) -composite \
$reptemp/cartouche5.png -background transparent -gravity North  -geometry +0+$((320+decalagehaut)) -composite \
$reptemp/cartouche6.png -background transparent -gravity North  -geometry -420+$((55+decalagehaut1)) -composite \
$fondtravail

################################################################################
#						Changements
# v1.1 alignement Haut/bas
# v1.2 ajout couverture nuageuse
# v1.3 sources gérées par image-meteo
# v1.4 ajout temp la plus basse

This one run 3 extras scripts inside
random-nasa-wallpaper.pl: (for this one create a folder called ~/wallpapers)

 
#!/usr/bin/perl
# Copyright (c) Laszlo Simon.
# 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; either version 2 of the License, or ( at your option) any later version.
#             
# 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 St, Fifth Floor, Boston, MA  02110-1301  USA)

# CONFIGURATION
##$explonation = 'true';        # true | false
##$explonation_place = 'south'; # east|north|west|south|norteast|...

# INIT
if (`xdpyinfo | grep dimensions` =~ /(\d+)x(\d+)\s+pixels/)
{
  ($width, $height) = ($1,$2);
}
else
{
  die("Can not determine screen resolution. Maybe 'xdpyinfo' not installed.\n");
}
  
$explonation_width = int($width * 2 / 3);
$explonation_height = int($width / 10);

$date = sprintf("%02d",0+int(rand(8)))
        .sprintf("%02d",1+int(rand(12)))
        .sprintf("%02d",1+int(rand(28)));

if (system("wget --version"))
{
  die("'wget' should be installed.\n")
}

system("wget -O /tmp/apxxxxxx.html 'http://antwrp.gsfc.nasa.gov/apod/ap$date.html'");

# Get image

open HTML, "/tmp/apxxxxxx.html";
$content = join('',(<HTML>));
close HTML;

$content =~ /\<a\s+href\=\"((?:\w+\/)*)(\w+)(\.\w+)\"\s*\>\s*\n*\s*\<img/ims;

$path = $1;
$img = $2;
$ext = $3;

`mkdir -p ~/wallpapers`;
print ">>>>http://antwrp.gsfc.nasa.gov/$path$img$ext\n";
system("wget -O ~/wallpapers/$img$ext 'http://antwrp.gsfc.nasa.gov/$path$img$ext'");

# Get text

#if (system("html2text -version"))
#{
#  warn("Explonation disabled. 'html2text' should be installed.\n");
#  $explonation = 'false';
#}

#if (system("convert -version"))
#{
#  warn("Explonation disabled. 'convert' (imagemagick) should be installed. \n");
#  $explonation = 'false';
#}


#if ($explonation eq 'true')
#{
#  system("html2text -style pretty -o /tmp/apxxxxxx.txt /tmp/apxxxxxx.html");
 
#  open TXT, "/tmp/apxxxxxx.txt";
#  $content = join('',(<TXT>));
#  close TXT;

#  $text = 
#    ($content =~ /Explanation:\s*(.*)\s*Tomorrow\'s picture:/s)
#    ? $1
#    : '';

#  print $text."\n";
  
#  $text =~ s/\n/ /g;

#  open TXT, ">/tmp/apxxxxxx-anno.txt";
#  print TXT $text;
#  close TXT;

#  system("convert ~/wallpapers/$img$ext "
#         ."-resize $width"."x$height\\> "
#         ."-size $width"."x$height xc:black +swap "
#         ."-gravity center "
#         ."-composite "
#         ."~/wallpapers/$img$ext"
#         );
         
#  system("convert "
#         ."-background '#0008' "
#         ."-fill white "
#         ."-gravity north "
#         ."-pointsize 20 "
#         ."-size $explonation_width"."x$explonation_height "
#         ."caption:\@/tmp/apxxxxxx-anno.txt "
#         ."~/wallpapers/$img$ext "
#          ."+swap -gravity $explonation_place -composite "
#         ."~/wallpapers/$img$ext"
#         );
#}

system("mv ~/wallpapers/$img$ext ~/wallpapers/image.jpg");

image_nasa_ghost.sh: modified the nasa picture downloaded

#!/bin/bash

convert ~/wallpapers/image.jpg -resize 640x360 ~/wallpapers/image_nasa.png
convert ~/wallpapers/image_nasa.png -filter Lanczos -crop  360+360+360+360\! ~/wallpapers/image_nasa.png
convert ~/wallpapers/image_nasa.png -alpha set -virtual-pixel transparent -channel A -blur 0x8  -level 50%,100% +channel ~/wallpapers/image_nasa_ghost.png
convert ~/wallpapers/image_nasa_ghost.png  -background  DodgerBlue1  \( +clone -shadow 25x4+13+13 \) +swap -background  none   -flatten ~/wallpapers/image_nasa_ghost_blue.png	

The script for the earth:
detour_terre2.sh:

#!/bin/bash

# script detour_terre.sh
wget -q -O  /home/climatix/image1.jpg http://www.ruwenzori.net/earth/Earth_EMEA+Atlantic_1280x1024.jpg
# pour le cadrage et le diametre si il ya lieu jouer sur 630,50
convert -size 1280x1024 xc:none -fill blue -draw 'circle 640,512 630,50' -alpha extract /tmp/mask.png
convert /home/climatix/image1.jpg  /tmp/mask.png  -alpha off -compose CopyOpacity -composite -resize 500x400! /home/climatix/image1.png
convert /home/climatix/image1.png -background  DeepSkyBlue  \( +clone -shadow 80x10+0+0 \) +swap -background  none   -flatten /home/climatix/image1.png
rm /tmp/mask.png
#your final image is in.png you have to modify it in conky file
#attention l'image finale est en .png a modifier dans ton conky
# ${image /home/YOUR_USERNAME/image1.png -p 0,0 -s 500x400 -f 60} 

I hope there's all to make it work first
Don't hesitate if you have questions.

Edit:
My defaut.cfg for example to have the forecast for the next eight hours:
defaut.cfg:

# configuration pour recmeteo et meteo 
# Crée le : jeu. 28 févr. 2013 09:32:31 CET 
###################################
adressWeb="http://www.accuweather.com/fr/ch/horgen/316407/current-weather/316407"
repsauv="$meteo_rep/sauvegardes/horgen"
huitHeures="oui"
matin="oui"
apresmidi="oui"
soiree="oui"
nuit="oui"
nbJour="11"
interval="30" # en mn
notifi="non"
nbFoisHuit="2"
###### votre fichier de mise en forme    ######
composition=macomposition.sh
###################################
#     cfg pour vos fichiers de compo
# Répertoire temporaire 
TempShell=/tmp
#Repertoire fonts pour convert
repfonts=~/.fonts
#Palier changement de couleur rose des vents (Km/h)
palier=10
##Définition des images pour les paliers
palier1=dir-vert.png
palier2=dir-bleu.png
palier3=dir-rouge.png
palier4=dir-vert.png
##définition des couleurs de fontes pour les paliers
palier1coulfont=blue
palier2coulfont=white
palier3coulfont=white
palier4coulfont=black
############  vous pouvez  changer pour vos propres images
IconesRep=""
#Images de base rose des vents
Rose=""
#Images de base Thermomètre
Therm=""
ThermRond=""
#Images de base cycle lunaire
Lune=""
#Images de base barometre
Barometre=""
############ externe=$repsource/scripts/nomdumodule fichierdeconfig.cfg
externe="$meteo_rep/scripts/$composition $meteo_config"
###################################

Moderator Edit - Image Resize - VastOne

----------------------------------------------------------------------------------------------------------------------------
Please use thumbnails (please try to avoid the large thumbnail imgur.com code) linking to the larger image to help those of us with slow connections. An example of the code needed is below. Most image hosting sites will automatically generate this for you as well. Users have been using postimage.org lately which does a nice job.

[url=http://link.to.your.fullsized.image][img]http://link.to.your.thumbnail.image[/img][/url]

Last edited by ragamatrix (2013-04-11 08:09:27)

Offline

#4617 2013-01-18 14:27:11

7vincent7black7
Member
Registered: 2012-05-20
Posts: 16

Re: The New Monster Conky Thread

[Post Contents Terminated by User]

Last edited by 7vincent7black7 (2013-01-20 00:04:14)


[ I Have No Greeting!]

Offline

#4618 2013-01-18 19:34:19

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: The New Monster Conky Thread

Thank you for the files ragamatrix!! I will start playing with these and post something soon.
Very nice work!!

Offline

#4619 2013-01-19 21:31:04

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 193
Website

Re: The New Monster Conky Thread

Here's a recent Conky shot!  Thanks to falldown for the one on the left.  Thanks to Arclance for the awesome weather script running at top right.  (this weather script will also display live sat and radar images if you want it too)  The great wallpaper is courtesy of Sector11 and jst_joe over at the VSIDO community!

conky11.jpg

Last edited by jed (2013-01-21 10:41:53)

Offline

#4620 2013-01-19 23:40:35

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,404

Re: The New Monster Conky Thread

@jed - Nice one. What is the font for the conky on the left?

Straight forward setup (slightly modified default set up in Slackel linux):

adtdZ86Z.jpg


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#4621 2013-01-20 00:03:24

7vincent7black7
Member
Registered: 2012-05-20
Posts: 16

Re: The New Monster Conky Thread

There's no point in me posting for help on my distro issue then. I guess I'll have to figure it out on my own or deal with it. I"m removing my posts.

Last edited by 7vincent7black7 (2013-01-20 00:05:16)


[ I Have No Greeting!]

Offline

#4622 2013-01-20 00:20:40

JLloyd13
#! Member
Registered: 2012-08-08
Posts: 83

Re: The New Monster Conky Thread

7vincent7black7 wrote:

There's no point in me posting for help on my distro issue then. I guess I'll have to figure it out on my own or deal with it. I"m removing my posts.


what? Now I'm confused. I can't even tell whats going on because you deleted all your posts. Put it back and wait, some things take time. I'll take a look at it. others probably have but don't know. were not wizards here

Offline

#4623 2013-01-20 09:21:45

lwfitz
#! Die Hard
From: Monrovia, CA
Registered: 2012-01-19
Posts: 886
Website

Re: The New Monster Conky Thread

Heres what Im working on right now

taDViZA

taDViZQ

Offline

#4624 2013-01-20 09:36:41

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 193
Website

Re: The New Monster Conky Thread

PackRat wrote:

@jed - Nice one. What is the font for the conky on the left?

Straight forward setup (slightly modified default set up in Slackel linux):

http://t.imgbox.com/adtdZ86Z.jpg

It is the default font for VSIDO.  LaudatioC.

Offline

Be excellent to each other!

#4625 2013-01-20 15:39:36

Ekaradon
New Member
Registered: 2013-01-14
Posts: 7

Re: The New Monster Conky Thread

Hi,

I would just ask one short question. I've this conky script on my first desktop, and I would to have this script applied on all my desktops. Only, I don't find a way to do it with OpenBox ?
screenshot-01202013-041835pm.php

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo