El Fri, 28 May 2010 17:50:51 +0200
"Adrian C." <[email protected]> escribió:
> On Fri, 28 May 2010, Garrik wrote:
> 
> > (If someone can explain me how to use the weather vicious widget, I 
> > would be able to add it to my demo file).
> 
> vicious.widgets.weather
>   - provides weather information for a requested station
>   - takes the ICAO station code as an argument, i.e. "LDRI"
>   - returns a table with string keys: {city}, {wind}, {windmph},
>     {windkmh}, {sky}, {weather}, {tempf}, {tempc}, {humid}, {press}
> 
> http://en.wikipedia.org/wiki/ICAO_airport_code
> http://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code
> 

I use that widget with this conf:


weatherwidget = widget({ type = 'textbox' })
vicious.register(weatherwidget, vicious.widgets.weather, '${tempc}°C',
360, 'SCEL') weatherwidget:add_signal('mouse::enter', function ()
                                            local statf =
io.popen('weather -i SCEL -m') local stat = statf:read("*all")
                                            statf :close()
                                            weatherinfo = {
                                               naughty.notify({ 
                                                                 title
= "Weather" , text       = stat
                                                                 ,
timeout    = 0 , position   = "top_right"
                                                             })
                                            }
                                         end)
weatherwidget:add_signal('mouse::leave', function ()
naughty.destroy(weatherinfo[1]) end)


Cheers! :)
-- 
Tomás Solar Castro
Be Free! http://FSFLA.org
GNU+Linux Registered User #383588
Public PGP Key: FB7590D2 (hkp://pgp.mit.edu:11371)
http://identi.ca/tsolar

Attachment: signature.asc
Description: PGP signature

Reply via email to