Skip to content

Commit

Permalink
Merge pull request #435 from Ryuno-Ki/fix-apt
Browse files Browse the repository at this point in the history
fix: repair APT widget
  • Loading branch information
streetturtle authored Jan 7, 2024
2 parents fd9c626 + 73e983e commit 85fbddf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions apt-widget/apt-widget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ local function script_path()
end

local WIDGET_DIR = script_path()
local ICONS_DIR = WIDGET_DIR .. "/icons/"
local ICONS_DIR = WIDGET_DIR .. "icons/"

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

--- Utility function to show warning messages
local function show_warning(message)
naughty.notify({
preset = naughty.config.presets.critical,
title = "Docker Widget",
title = "APT Widget",
text = message,
})
end
Expand All @@ -54,9 +54,9 @@ local apt_widget = wibox.widget({
id = "icon",
widget = wibox.widget.imagebox,
},
margins = 4,
layout = wibox.container.margin,
layout = wibox.container.place,
},
visible = true,
layout = wibox.layout.fixed.horizontal,
set_icon = function(self, new_icon)
self:get_children_by_id("icon")[1].image = new_icon
Expand Down Expand Up @@ -352,14 +352,13 @@ local function worker(user_args)
end
end)))


wibox_popup:connect_signal("mouse::leave", function()
if wibox_popup.visible then
wibox_popup.visible = false
end
end)

return apt_widget_button
return apt_widget
end

return setmetatable(apt_widget, {
Expand Down

0 comments on commit 85fbddf

Please sign in to comment.