blob: be1dd84a8d0aaa6d2af33e5f95a0b8a9f4ae940a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Calendar Widget
Calendar widget for Awesome WM - slightly improved version of the `wibox.widget.calendar`.
## Features
- mouse support: scroll up - shows next month, scroll down - previous
- themes:
nord (default):
![nord_theme](./nord.png)
outrun:
![outrun_theme](./outrun.png)
- setup widget placement
top center - in case you clock is centered:
![calendar_top](./calendar_top.png)
top right - for default awesome config:
![calendar_top_right](./calendar_top_right.png)
bottom right - in case your wibar at the bottom:
![calendar_bottom_right](./calendar_bottom_right.png)
## How to use
This widget needs an 'anchor' - another widget which triggers visibility of the calendar. Default `mytextclock` is the perfect candidate!
```lua
local calendar_widget = require("awesome-wm-widgets.calendar-widget.calendar")
-- ...
-- {{{ Wibar
-- Create a textclock widget
mytextclock = wibox.widget.textclock()
-- default
cw = calendar_widget()
-- or customized
cw = calendar_widget({
theme = 'outrun',
placement = 'bottom_right'
})
mytextclock:connect_signal("button::press",
function(_, _, _, button)
if button == 1 then cw.toggle() end
end)
```
|