summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2020-11-01 20:40:59 -0500
committerstreetturtle <streetturtle@gmail.com>2020-11-01 20:40:59 -0500
commitbb4ba9dc907433a940180045e8ab43f39eb06a71 (patch)
treeaf545b83d6273827954a58fe66d5ea2d53190b68
parent26343bd644ed9cf0cb15c91512d5d6b26b91d9ef (diff)
[github-contributions] quickfix of #203
-rw-r--r--github-contributions-widget/github-contributions-widget.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/github-contributions-widget/github-contributions-widget.lua b/github-contributions-widget/github-contributions-widget.lua
index 3025d17..7da2b48 100644
--- a/github-contributions-widget/github-contributions-widget.lua
+++ b/github-contributions-widget/github-contributions-widget.lua
@@ -24,6 +24,14 @@ local github_contributions_widget = wibox.widget{
widget = wibox.container.mirror
}
+local color_dict = {
+ color_calendar_graph_day_L4_bg = '#216e39',
+ color_calendar_graph_day_L3_bg = '#239a3b',
+ color_calendar_graph_day_L2_bg = '#7bc96f',
+ color_calendar_graph_day_L1_bg = '#c6e48b',
+ color_calendar_graph_day_bg = '#ebedf0',
+}
+
local function worker(args)
local args = args or {}
@@ -62,7 +70,7 @@ local function worker(args)
local col = {layout = wibox.layout.fixed.vertical}
local row = {layout = wibox.layout.fixed.horizontal}
- local a = 5 - os.date('%w')
+ local a = 6 - os.date('%w')
for i = 0, a do
table.insert(col, get_square('#ebedf0'))
end
@@ -73,7 +81,7 @@ local function worker(args)
table.insert(row, col)
col = {layout = wibox.layout.fixed.vertical}
end
- table.insert(col, get_square(colors))
+ table.insert(col, get_square(color_dict[colors:match('var%(%-%-(.*)%)'):gsub('-', '_')]))
a = a + 1
end
github_contributions_widget:setup(