]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Updated yawn (rest => markdown)
authorLuke Bonham <dadasignificanulla@gmail.com>
Sun, 8 Sep 2013 13:14:11 +0000 (06:14 -0700)
committercopycat-killer <dada@archlinux.info>
Wed, 5 Aug 2015 11:30:33 +0000 (13:30 +0200)
yawn.md [new file with mode: 0644]
yawn.rest [deleted file]

diff --git a/yawn.md b/yawn.md
new file mode 100644 (file)
index 0000000..fa6e91c
--- /dev/null
+++ b/yawn.md
@@ -0,0 +1,89 @@
+Yahoo's Awesome Weather notification
+-----------
+
+Yawn provides brief and compact weather notification via Naughty and Yahoo! Weather API.
+
+Usage
+-----
+
+You can ``register`` Yawn to get a set of widgets, or ``attach`` it to
+an existent widget.
+
+### register
+
+    yawn = lain.widgets.yawn(id, args)
+
+- ``id``
+
+    An integer that defines the WOEID code of your city.
+    To obtain it you can google 'yahoo weather %CITYNAME%' and follow the first link.
+    It will look like:
+
+        http://weather.yahoo.com/united-states/california/san-diego-2487889/
+
+    and the last number in that link will be the ID you need.
+
+- ``args``
+
+    An optional table which can contain the following settings:
+
+    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 | 
+
+The function 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)
+
+Hovering over ``yawn.icon`` will display the notification.
+
+### attach
+
+    lain.widgets.yawn.attach(widget, id, args)
+
+Arguments:
+
+- ``widget``
+    The widget which you want to attach yawn to.
+
+- ``id``
+
+    Same as in ``register``.
+
+- ``args``
+   Same as in ``register``.
+
+Hovering over ``widget`` will display the notification.
+
+Popup shortcut
+--------------
+
+You can also create a keybinding for the weather popup like this: ::
+
+    awful.key( { "Mod1" }, "w", function () yawn.show(5) end )
+
+where ``show`` argument is an integer defining timeout seconds.
+
+Localization
+------------
+
+Default language is English, but Yawn can be localized.
+
+Move to `localizations` subdirectory and fill `localization_template`.
+
+Once you're done, rename it like your locale id. In my case:
+
+    $ lua
+    Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
+    > print(os.getenv("LANG"):match("(%S*$*)[.]"))
+    it_IT
+    >
+
+hence I named my file "it_IT" (Italian localization).
+
+**NOTE:** If you create a localization, feel free to send me! I will add it.
\ No newline at end of file
diff --git a/yawn.rest b/yawn.rest
deleted file mode 100644 (file)
index 4551597..0000000
--- a/yawn.rest
+++ /dev/null
@@ -1,128 +0,0 @@
-(*Integration of this* module_)
-
-:Author: Luke Bonham <dada [at] archlinux [dot] info>
-:License: WTFPLv2_
-:Version: 2.0-git
-
-Description
------------
-
-Yawn is a module for Awesome WM providing brief and compact
-weather notification via Naughty and Yahoo! Weather API.
-
-Originally a port of perceptive_, it became a completely new module after various improvements and style changes.
-
------
-Usage
------
-
-You can ``register`` Yawn to get a set of widgets, or ``attach`` it to
-an existent widget.
-
-register
-^^^^^^^^
-
-Call: ::
-
-    lain.widgets.yawn(id, args)
-
-Arguments:
-
-``id``
-    An integer that defines the WOEID code of your city.
-    To obtain it you can google 'yahoo weather %CITYNAME%' and follow the first link.
-    It will look like::
-
-        http://weather.yahoo.com/united-states/california/san-diego-2487889/
-
-    and the last number in that link will be the ID you need.
-``args``
-    An optional table which can contain the following settings:
-        ``u``
-            Units. Type: string. Possible values: "c" (Celsius), "f" (Fahrenheit). Default: "c".
-
-        ``toshow``
-            What to show. Type: string. Possible values: "units", "forecast", "both".
-            Default: "forecast".
-
-        ``units_color``
-            Color of units text. Type: string. Possible values: hexadecimal color
-            codes.
-
-        ``forecast_color``
-            Color of forecast text. Type: string. Possible values: hexadecimal color
-            codes.
-
-        ``notification_color``
-            Color of notification text. Type: string. Possible values: hexadecimal color
-            codes.
-
-        ``spr``
-            A separator. Type: string. You can define it when ``toshow`` is set to "both".
-
-        ``footer``
-            A footer. Type: string. You can define it when ``toshow`` is set to
-            "both".
-
-The function creates an imagebox icon and a textbox widget. Add them to you wibox like this: ::
-
-    right_layout:add(lain.widgets.yawn.icon)
-    right_layout:add(lain.widgets.yawn.widget)
-
-Hovering over ``yawn.icon`` will display the notification.
-
-attach
-^^^^^^
-
-Call: ::
-
-    lain.widgets.yawn.attach(widget, id, args)
-
-Arguments:
-
-``widget``
-    The widget which you want to attach yawn to.
-``id``
-    same as in ``register``
-``args``
-    same as in ``register``
-
-Hovering over ``widget`` will display the notification.
-
---------------
-Popup shortcut
---------------
-
-You can also create a keybinding for the weather popup like this: ::
-
-    globalkeys = awful.util.table.join(
-        ...
-        awful.key( { "Mod1" }, "w", function () lain.widgets.yawn.show(5) end )
-        ...
-
-where ``show`` argument is an integer defining timeout seconds.
-
-------------
-Localization
-------------
-
-Default language is English, but Yawn can be localized.
-Move to ``localizations`` subdirectory and fill ``localization_template``.
-
-Once you're done, rename it like your locale id. In my case: ::
-
-    $ lua
-    Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
-    > print(os.getenv("LANG"):match("(%S*$*)[.]"))
-    it_IT
-    >
-
-hence I named my file "it_IT" (Italian localization).
-
-**NOTE:** If you create a localization, feel free to send me! I will add it.
-
-.. _module: https://github.com/copycat-killer/yawn
-.. _WTFPLv2: http://www.wtfpl.net
-.. _perceptive: https://github.com/ioga/perceptive
-.. _Tamsyn: http://www.fial.com/~scott/tamsyn-font/
-.. _Rainbow: https://github.com/copycat-killer/awesome-copycats>
\ No newline at end of file