Some of my scripts for daily use on a linux desktop

Wednesday, April 7, 2010

Square to Rounded image with Lua/imlib


I wanted to display Moon and Earth pictures on my conky but the only images I found where squares images with a black background and the Moon or the Earth in the middle.
So to display the image correctly in the conky, I had to set transparency of the background of the original image. Well, I've done that with imlib and post the resulting script here (or in french here).

I also post the script to get Earth or Moon images from this site :
http://www.fourmilab.ch/earthview/expert.html

Of course the images are updated every hour so the night area is reflecting the reality !
And of course again, there are a few parameters to set the latitude, longitude and so on ...

If you are inspired, you can have some amazing conkys like this one :


or that:



I also updated the clock and the calendar wheel (this one is now a widget and it is more easy to use it).
And I discover that the widgets can be called with the dofile() function in the Lua script. No more need to copy/paste the widget but to use a line like this :
dofile("/home/wlourf/calendar/calendar.lua")

No comments:

Post a Comment