X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/9ceccbb5982ac45646e0dc4ed3ae5fbfa6832f3c..482260b9ef5dcec48c17bcfcebc85da1f58eb38c:/yawn.md diff --git a/yawn.md b/yawn.md index fa6e91c..a9a1a7b 100644 --- a/yawn.md +++ b/yawn.md @@ -1,7 +1,8 @@ -Yahoo's Awesome Weather notification ------------ +[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -Yawn provides brief and compact weather notification via Naughty and Yahoo! Weather API. +(YAhoo! Weather Notification) + +Yawn provides brief and compact Yahoo! Weather notification. Usage ----- @@ -25,15 +26,18 @@ an existent widget. - ``args`` - An optional table which can contain the following settings: + A required table which can contain: Variables | Meaning | Type | Possible values | Default value --- | --- | --- | --- | --- `u` | Units | string | "c" (Celsius), "f" (Fahrenheit) | "c" - `toshow` | What to show | string | "forecast", "units", "both" | "forecast" - `color` | ``yawn.widget`` color | string | hexadecimal colors | + `timeout` | Refresh timeout seconds | int | integers | 600 + `settings` | User settings | function | function | empty function + + `settings` can use strings `forecast`, `units`, and can modify `notification_preset` table, which + 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. -The function creates an imagebox icon and a textbox widget. Add them to you wibox like this: +The function `register` creates an imagebox icon and a textbox widget. Add them to you wibox like this: right_layout:add(yawn.icon) right_layout:add(yawn.widget) @@ -48,7 +52,7 @@ Arguments: - ``widget`` - The widget which you want to attach yawn to. + The widget which you want to attach Yawn to. - ``id`` @@ -63,7 +67,7 @@ Hovering over ``widget`` will display the notification. Popup shortcut -------------- -You can also create a keybinding for the weather popup like this: :: +You can also create a keybinding for the weather popup like this: awful.key( { "Mod1" }, "w", function () yawn.show(5) end )