summaryrefslogtreecommitdiff
path: root/calendar-widget/calendar.lua
diff options
context:
space:
mode:
authorThomas Friese <tasmo@tasmo.de>2020-11-21 12:38:51 +0100
committerThomas Friese <tasmo@tasmo.de>2020-11-21 12:38:51 +0100
commit907a7c15fa414f44adb295fd8bd7163cb86582d9 (patch)
tree39c35e1919af8e76aae7d3d9ad9d7c1dcd3574d7 /calendar-widget/calendar.lua
parent207ad20d7233992a4ad11cb22f77fb76ba8c02a4 (diff)
[calendar] Add theme from local config
- add a theme called 'naughty' - make colors and corner radius configurable
Diffstat (limited to 'calendar-widget/calendar.lua')
-rw-r--r--calendar-widget/calendar.lua18
1 files changed, 15 insertions, 3 deletions
diff --git a/calendar-widget/calendar.lua b/calendar-widget/calendar.lua
index e15d094..5cf97c8 100644
--- a/calendar-widget/calendar.lua
+++ b/calendar-widget/calendar.lua
@@ -68,7 +68,18 @@ local function worker(args)
weekday_fg = '#FD971F',
header_fg = '#F92672',
border = '#75715E'
+ },
+ naughty = {
+ bg = beautiful.notification_bg or beautiful.bg,
+ fg = beautiful.notification_fg or beautiful.fg,
+ focus_date_bg = beautiful.notification_fg or beautiful.fg,
+ focus_date_fg = beautiful.notification_bg or beautiful.bg,
+ weekend_day_bg = beautiful.bg_focus,
+ weekday_fg = beautiful.fg,
+ header_fg = beautiful.fg,
+ border = beautiful.border_normal
}
+
}
local args = args or {}
@@ -78,11 +89,12 @@ local function worker(args)
preset = naughty.config.presets.critical,
title = 'Calendar Widget',
text = 'Theme "' .. args.theme .. '" not found, fallback to default'})
- args.theme = 'nord'
+ args.theme = 'naughty'
end
- local theme = args.theme or 'nord'
+ local theme = args.theme or 'naughty'
local placement = args.placement or 'top'
+ local radius = args.radius or 8
local styles = {}
@@ -175,7 +187,7 @@ local function worker(args)
local popup = awful.popup {
ontop = true,
visible = false,
- shape = gears.shape.rounded_rect,
+ shape = rounded_shape(radius),
offset = { y = 5 },
border_width = 1,
border_color = calendar_themes[theme].border,