All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 (YAhoo! Weather Notification)
3 Yawn provides brief and compact Yahoo! Weather notification.
8 You can ``register`` Yawn to get a set of widgets, or ``attach`` it to
13 yawn = lain.widgets.yawn(id, args)
17 An integer that defines the WOEID code of your city.
18 To obtain it you can google 'yahoo weather %CITYNAME%' and follow the first link.
21 http://weather.yahoo.com/united-states/california/san-diego-2487889/
23 and the last number in that link will be the ID you need.
27 A required table which can contain:
29 Variables | Meaning | Type | Possible values | Default value
30 --- | --- | --- | --- | ---
31 `u` | Units | string | "c" (Celsius), "f" (Fahrenheit) | "c"
32 `timeout` | Refresh timeout seconds | int | integers | 600
33 `settings` | User settings | function | function | empty function
35 `settings` can use strings `forecast`, `units', and can modify `notification_preset` table, which
36 will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain.
38 The function `register` creates an imagebox icon and a textbox widget. Add them to you wibox like this:
40 right_layout:add(yawn.icon)
41 right_layout:add(yawn.widget)
43 Hovering over ``yawn.icon`` will display the notification.
47 lain.widgets.yawn.attach(widget, id, args)
53 The widget which you want to attach Yawn to.
57 Same as in ``register``.
61 Same as in ``register``.
63 Hovering over ``widget`` will display the notification.
68 You can also create a keybinding for the weather popup like this:
70 awful.key( { "Mod1" }, "w", function () yawn.show(5) end )
72 where ``show`` argument is an integer defining timeout seconds.
77 Default language is English, but Yawn can be localized.
79 Move to `localizations` subdirectory and fill `localization_template`.
81 Once you're done, rename it like your locale id. In my case:
84 Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
85 > print(os.getenv("LANG"):match("(%S*$*)[.]"))
89 hence I named my file "it_IT" (Italian localization).
91 **NOTE:** If you create a localization, feel free to send me! I will add it.