]> git.madduck.net Git - etc/awesome.git/blob - 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 calendar (markdown)
[etc/awesome.git] / calendar.md
1 Attaches a calendar notification to a widget.
2
3     lain.widgets.calendar:attach(widget)
4
5 - Left click: switch to previous month.
6 - Right click: switch to next month.
7
8 Optionally you can call the function with bg and fg colors arguments, both or just one:
9
10     lain.widgets.calendar:attach(mytextclock, "#FFFFFF", "#000000")
11     -- or
12     lain.widgets.calendar:attach(mytextclock, "#FFFFFF")
13     -- or
14     lain.widgets.calendar:attach(mytextclock, nil, "#000000")
15
16 default bg and fg colors are `beautiful.bg_normal` and `beautiful.fg_focus`.
17
18 Notification will show an icon displaying current day, and formatted output
19 from ``cal`` with current day highlighted.
20
21 Calendar icons are placed in [lain/icons/cal](https://github.com/copycat-killer/lain/tree/master/icons/cal), default set being ``white``.
22
23 You can add your own set, and tell lain to use it like this:
24
25     lain.widgets.calendar.icons_dir = lain.widgets.icons_dir .. "cal/myicons"
26
27 also, you can set notification font size:
28
29     lain.widgets.calendar.font_size = 14
30
31 default is 12.
32
33 Finally, you can call the notification with a key binding like this:
34
35     awful.key({ altkey }, "c", function () lain.widgets.calendar:show(7) end),
36
37 where ``altkey = "Mod1"`` and ``show`` argument is an optional integer, meaning timeout seconds.