diff options
author | streetturtle <streetturtle@gmail.com> | 2020-12-06 14:47:40 -0500 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2020-12-06 14:47:40 -0500 |
commit | ed2b256407291d8edadfcea9380029633cc7d9d8 (patch) | |
tree | 620436e3e2da17cb8351506a29143fb5b2165a2d /gerrit-widget | |
parent | a0cd854a4d36167456bb28d255bf96a32321bf2a (diff) |
fix more warnings
Diffstat (limited to 'gerrit-widget')
-rw-r--r-- | gerrit-widget/gerrit.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gerrit-widget/gerrit.lua b/gerrit-widget/gerrit.lua index cb1a460..682eb0f 100644 --- a/gerrit-widget/gerrit.lua +++ b/gerrit-widget/gerrit.lua @@ -33,7 +33,7 @@ local function worker(user_args) local icon = args.icons or HOME_DIR .. '/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg' local host = args.host or naughty.notify{ - preset = naughty.config.presets.critical, + preset = naughty.config.presets.critical, title = 'Gerrit Widget', text = 'Gerrit host is unknown' } @@ -93,11 +93,12 @@ local function worker(user_args) if name_dict[user_id].username == nil then name_dict[user_id].username = '' - spawn.easy_async(string.format(GET_USER_CMD, host, user_id), function(stdout, stderr, reason, exit_code) + spawn.easy_async(string.format(GET_USER_CMD, host, user_id), function(stdout) local user = json.decode(stdout) name_dict[tonumber(user_id)].username = user.name if not gfs.file_readable(PATH_TO_AVATARS .. user_id) then - spawn.easy_async(string.format(DOWNLOAD_AVATAR_CMD, PATH_TO_AVATARS .. user_id, user.avatars[1].url)) + spawn.easy_async( + string.format(DOWNLOAD_AVATAR_CMD, PATH_TO_AVATARS .. user_id, user.avatars[1].url)) end end) return name_dict[user_id].username @@ -124,7 +125,8 @@ local function worker(user_args) naughty.notify{ icon = HOME_DIR ..'/.config/awesome/awesome-wm-widgets/gerrit-widget/gerrit_icon.svg', title = 'New Incoming Review', - text = reviews[1].project .. '\n' .. get_name_by_user_id(reviews[1].owner._account_id) .. reviews[1].subject .. '\n', + text = reviews[1].project .. '\n' .. get_name_by_user_id(reviews[1].owner._account_id) .. + reviews[1].subject .. '\n', run = function() spawn.with_shell("xdg-open https://" .. host .. '/' .. reviews[1]._number) end } end @@ -174,7 +176,7 @@ local function worker(user_args) widget = wibox.container.background } - row:connect_signal("button::release", function(_, _, _, button) + row:connect_signal("button::release", function() spawn.with_shell("xdg-open " .. host .. '/' .. review._number) end) |