mirror of
https://github.com/streetturtle/awesome-wm-widgets.git
synced 2024-11-15 19:48:04 +01:00
add readme for the calendar widget
This commit is contained in:
parent
e8f79dccee
commit
8fea20806e
3 changed files with 28 additions and 0 deletions
28
calendar-widget/README.md
Normal file
28
calendar-widget/README.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Calendar Widget
|
||||
|
||||
Calendar widget for Awesome WM - slightly improved version of the `wibox.widget.calendar`. Also supports mouse scroll up/down in order ot switch month - scroll up - shows next month, scroll down - previous.
|
||||
|
||||
Top center placement:
|
||||
|
||||
![calendar_top](./calendar_top.png)
|
||||
|
||||
Top right placement:
|
||||
|
||||
![calendar_top_right](./calendar_top_right.png)
|
||||
|
||||
The placement is setup in theme.lua by `calendar_placement` variable, currently supported `top` (default), `top_right`, `bottom_right`.
|
||||
|
||||
# How to use
|
||||
|
||||
This widget need 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")
|
||||
-- ...
|
||||
-- Create a textclock widget
|
||||
mytextclock = wibox.widget.textclock()
|
||||
mytextclock:connect_signal("button::press",
|
||||
function(_, _, _, button)
|
||||
if button == 1 then calendar_widget.toggle() end
|
||||
end)
|
||||
```
|
BIN
calendar-widget/calendar_top.png
Normal file
BIN
calendar-widget/calendar_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
calendar-widget/calendar_top_right.png
Normal file
BIN
calendar-widget/calendar_top_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
Loading…
Reference in a new issue