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 *This is an integration of this* module_.
3 :Author: Luke Bonham <dada [at] archlinux [dot] info>
10 Yawn is a module for Awesome WM providing brief and compact
11 weather notification via Naughty and Yahoo! Weather API.
13 Originally a port of perceptive_, it became a completely new module after various improvements and style changes.
19 You can ``register`` Yawn to get a set of widgets, or ``attach`` it to
27 lain.widgets.yawn(id, args)
32 An integer that defines the WOEID code of your city.
33 To obtain it you can google 'yahoo weather %CITYNAME%' and follow the first link.
36 http://weather.yahoo.com/united-states/california/san-diego-2487889/
38 and the last number in that link will be the ID you need.
40 An optional table which can contain the following settings:
42 Units. Type: string. Possible values: "c" (Celsius), "f" (Fahrenheit). Default: "c".
45 What to show. Type: string. Possible values: "units", "forecast", "both".
49 Color of units text. Type: string. Possible values: hexadecimal color
53 Color of forecast text. Type: string. Possible values: hexadecimal color
56 ``notification_color``
57 Color of notification text. Type: string. Possible values: hexadecimal color
61 A separator. Type: string. You can define it when ``toshow`` is set to "both".
64 A footer. Type: string. You can define it when ``toshow`` is set to
67 The function creates an imagebox icon and a textbox widget. Add them to you wibox like this: ::
69 right_layout:add(lain.widgets.yawn.icon)
70 right_layout:add(lain.widgets.yawn.widget)
72 Hovering over ``yawn.icon`` will display the notification.
79 lain.widgets.yawn.attach(widget, id, args)
84 The widget which you want to attach yawn to.
86 same as in ``register``
88 same as in ``register``
90 Hovering over ``widget`` will display the notification.
96 You can also create a keybinding for the weather popup like this: ::
98 globalkeys = awful.util.table.join(
100 awful.key( { "Mod1" }, "w", function () lain.widgets.yawn.show(5) end )
103 where ``show`` argument is an integer defining timeout seconds.
109 Default language is English, but Yawn can be localized.
110 Move to ``localizations`` subdirectory and fill ``localization_template``.
112 Once you're done, rename it like your locale id. In my case: ::
115 Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
116 > print(os.getenv("LANG"):match("(%S*$*)[.]"))
120 hence I named my file "it_IT" (Italian localization).
122 **NOTE:** If you create a localization, feel free to send me! I will add it.
124 .. _module: https://github.com/copycat-killer/yawn
125 .. _WTFPLv2: http://www.wtfpl.net
126 .. _perceptive: https://github.com/ioga/perceptive
127 .. _Tamsyn: http://www.fial.com/~scott/tamsyn-font/
128 .. _Rainbow: https://github.com/copycat-killer/awesome-copycats>