diff options
author | streetturtle <streetturtle@gmail.com> | 2020-08-18 10:05:20 -0400 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2020-08-18 10:05:47 -0400 |
commit | fed33cc3b4b0cfafd7eaaccd50b01117348ee944 (patch) | |
tree | 9abb577a82f2da5ff98f00f3edd2ff9b182ff94a /docker-widget | |
parent | c81a6c983c47dcbe8fae27b157e2776d13910903 (diff) |
[docker] properly handly number of containers param
Diffstat (limited to 'docker-widget')
-rw-r--r-- | docker-widget/docker.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docker-widget/docker.lua b/docker-widget/docker.lua index 6c2e6c7..6e04d8a 100644 --- a/docker-widget/docker.lua +++ b/docker-widget/docker.lua @@ -89,7 +89,7 @@ local function worker(args) local args = args or {} local icon = args.icon or ICONS_DIR .. 'docker.svg' - local number_of_containers = args.num_of_containers or -1 + local number_of_containers = args.number_of_containers or -1 docker_widget:set_icon(icon) @@ -150,7 +150,7 @@ local function worker(args) awful.spawn.easy_async('docker ' .. command .. ' ' .. container['name'], function(stdout, stderr) if stderr ~= '' then show_warning(stderr) end - spawn.easy_async(LIST_CONTAINERS_CMD, function(stdout, stderr) + spawn.easy_async(string.format(LIST_CONTAINERS_CMD, number_of_containers), function(stdout, stderr) rebuild_widget(stdout, stderr) end) end) end) ) ) @@ -192,7 +192,7 @@ local function worker(args) awful.spawn.easy_async('docker ' .. command .. ' ' .. container['name'], function(stdout, stderr) if stderr ~= '' then show_warning(stderr) end - spawn.easy_async(LIST_CONTAINERS_CMD, function(stdout, stderr) + spawn.easy_async(string.format(LIST_CONTAINERS_CMD, number_of_containers), function(stdout, stderr) rebuild_widget(stdout, stderr) end) end) end) ) ) |