Skip to content

Commit 85fbddf

Browse files
authored
Merge pull request #435 from Ryuno-Ki/fix-apt
fix: repair APT widget
2 parents fd9c626 + 73e983e commit 85fbddf

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

apt-widget/apt-widget.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ local function script_path()
2222
end
2323

2424
local WIDGET_DIR = script_path()
25-
local ICONS_DIR = WIDGET_DIR .. "/icons/"
25+
local ICONS_DIR = WIDGET_DIR .. "icons/"
2626

2727
local LIST_PACKAGES = [[sh -c "LC_ALL=c apt list --upgradable 2>/dev/null"]]
2828

2929
--- Utility function to show warning messages
3030
local function show_warning(message)
3131
naughty.notify({
3232
preset = naughty.config.presets.critical,
33-
title = "Docker Widget",
33+
title = "APT Widget",
3434
text = message,
3535
})
3636
end
@@ -54,9 +54,9 @@ local apt_widget = wibox.widget({
5454
id = "icon",
5555
widget = wibox.widget.imagebox,
5656
},
57-
margins = 4,
58-
layout = wibox.container.margin,
57+
layout = wibox.container.place,
5958
},
59+
visible = true,
6060
layout = wibox.layout.fixed.horizontal,
6161
set_icon = function(self, new_icon)
6262
self:get_children_by_id("icon")[1].image = new_icon
@@ -352,14 +352,13 @@ local function worker(user_args)
352352
end
353353
end)))
354354

355-
356355
wibox_popup:connect_signal("mouse::leave", function()
357356
if wibox_popup.visible then
358357
wibox_popup.visible = false
359358
end
360359
end)
361360

362-
return apt_widget_button
361+
return apt_widget
363362
end
364363

365364
return setmetatable(apt_widget, {

0 commit comments

Comments
 (0)