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