]> git.madduck.net Git - etc/awesome.git/blobdiff - calendar.md

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 brightness (markdown)
[etc/awesome.git] / calendar.md
index 06e1b4868788276c973088db9c97d8557d74fa60..fa4e563257e289a3ebac010fd942750e2a47aca5 100644 (file)
@@ -1,34 +1,28 @@
-Attaches a calendar to a ``widget``. Example:
+[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
 
-    lain.widgets.calendar:attach(mytextclock)
+Attaches a calendar notification to a widget.
+
+    lain.widgets.calendar:attach(widget, args)
 
 - Left click: switch to previous month.
 - Right click: switch to next month.
 
-Optionally you can call the function with background and foreground colors arguments, both or just one:
+`args` is an optional table which can contain:
+
+Variable | Meaning | Type | Default
+--- | --- | --- | ---
+`icons` | Path to calendar icons | string | [lain/icons/cal/white](https://github.com/copycat-killer/lain/tree/master/icons/cal/white)
+`font_size` | Calendar font size | int | 12
+`fg` | Calendar foreground color | string | `beautiful.fg_normal`
+`bg` | Calendar background color | string | `beautiful.bg_normal`
+`position` | Calendar position | string | "top_right"
 
-    lain.widgets.calendar:attach(mytextclock, "#FFFFFF", "#000000")
-    -- or
-    lain.widgets.calendar:attach(mytextclock, "#FFFFFF")
-    -- or
-    lain.widgets.calendar:attach(mytextclock, nil, "#000000")
+`position` possible values are defined [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify).
 
 Notification will show an icon displaying current day, and formatted output
 from ``cal`` with current day highlighted.
 
-Calendar icons are placed in [lain/icons/cal](https://github.com/copycat-killer/lain/tree/master/icons/cal), default set being ``white``.
-
-You can add your own set, and tell lain to use it like this:
-
-    lain.widgets.calendar.icons_dir = lain.widgets.icons_dir .. "cal/myicons"
-
-also, you can set notification font size:
-
-    lain.widgets.calendar.font_size = 14
-
-default is 12.
-
-Finally, you can call the notification with a key binding like this:
+You can call the notification with a key binding like this:
 
     awful.key({ altkey }, "c", function () lain.widgets.calendar:show(7) end),