From 0e5ae300fb29b2e4161f51b85778dccfe57307e0 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sun, 15 Dec 2019 22:10:22 -0500 Subject: themes for calendar widget --- calendar-widget/README.md | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'calendar-widget/README.md') diff --git a/calendar-widget/README.md b/calendar-widget/README.md index fa1b761..be1dd84 100644 --- a/calendar-widget/README.md +++ b/calendar-widget/README.md @@ -1,28 +1,54 @@ # 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. +Calendar widget for Awesome WM - slightly improved version of the `wibox.widget.calendar`. -Top center placement: +## Features -![calendar_top](./calendar_top.png) + - mouse support: scroll up - shows next month, scroll down - previous + - themes: + + nord (default): -Top right placement: + ![nord_theme](./nord.png) -![calendar_top_right](./calendar_top_right.png) + outrun: -The placement is setup in theme.lua by `calendar_placement` variable, currently supported `top` (default), `top_right`, `bottom_right`. + ![outrun_theme](./outrun.png) -# How to use + - 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() -mytextclock:connect_signal("button::press", +-- 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 calendar_widget.toggle() end + if button == 1 then cw.toggle() end end) -``` \ No newline at end of file +``` -- cgit v1.2.3