diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2020-12-07 15:33:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 15:33:55 -0500 |
commit | d4971690cec1e074999e730d87045e578d71e43c (patch) | |
tree | b0f05079840eba5467e14bdcd093ad3ed5362cf4 /word-clock-widget | |
parent | f078748e76eacae599cf0ad06120d9fff54f8fa5 (diff) | |
parent | ed2b256407291d8edadfcea9380029633cc7d9d8 (diff) |
Merge pull request #224 from streetturtle/comply-with-luacheck
Comply with luacheck
Diffstat (limited to 'word-clock-widget')
-rw-r--r-- | word-clock-widget/word-clock.lua | 9 |
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 |