summaryrefslogtreecommitdiff
path: root/word-clock-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2020-12-02 09:18:16 -0500
committerstreetturtle <streetturtle@gmail.com>2020-12-02 09:18:16 -0500
commit8be78d4fddfc2c88352b25f5d8d89c6dc14df37c (patch)
tree68f14b1e9d1e6265bc95e1fa39f06e439bc79572 /word-clock-widget
parentbc7008458e90edbf4a48a3356433c8b96b850335 (diff)
fix few issues
Diffstat (limited to 'word-clock-widget')
-rw-r--r--word-clock-widget/word-clock.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/word-clock-widget/word-clock.lua b/word-clock-widget/word-clock.lua
index fc4a5b5..12d5d83 100644
--- a/word-clock-widget/word-clock.lua
+++ b/word-clock-widget/word-clock.lua
@@ -55,9 +55,9 @@ end
local text_clock = {}
-local function worker(args)
+local function worker(user_args)
- local args = args or {}
+ local args = user_args or {}
local main_color = args.main_color or beautiful.fg_normal
local accent_color = args.accent_color or beautiful.fg_urgent
@@ -81,7 +81,10 @@ local function worker(args)
local t = split(time)
local res = ''
for i, v in ipairs(t) do
- res = res .. '<span color="' .. ((i % 2 == 0) and accent_color or main_color) .. '">' .. v .. '</span>' .. (with_spaces and ' ' or '')
+ res = res .. '<span color="'
+ .. ((i % 2 == 0) and accent_color or main_color)
+ .. '">' .. v .. '</span>'
+ .. (with_spaces and ' ' or '')
end
self:get_children_by_id('clock')[1]:set_markup(res)
end