Update package update list when update is finished
This commit is contained in:
parent
749b04c36b
commit
daf0f5ab35
|
@ -23,12 +23,14 @@ local task_list = require("widgets.task-list")
|
|||
|
||||
local top_panel = {}
|
||||
|
||||
local watch_widget, watch_timer = awful.widget.watch('bash -c "checkupdates | wc -l"', 360)
|
||||
|
||||
local updates_indicator = wibox.widget{
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
{
|
||||
{
|
||||
widget = awful.widget.watch('bash -c "checkupdates | wc -l"', 360),
|
||||
widget = watch_widget,
|
||||
},
|
||||
top = 0, bottom = 2, left = 0, right = 0,
|
||||
widget = wibox.container.margin
|
||||
|
@ -154,7 +156,10 @@ top_panel.create = function(s)
|
|||
|
||||
-- connect panel visibility function to relevant signals
|
||||
updates_indicator:connect_signal("button::press", function(c, _, _, button)
|
||||
awful.spawn.with_shell('WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo \'\nDone, press any key to exit...\' ; read"')
|
||||
local update_command = 'WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo \'\nDone, press any key to exit...\' ; read"'
|
||||
awful.spawn.easy_async_with_shell(update_command, function(_)
|
||||
watch_timer:emit_signal("timeout")
|
||||
end)
|
||||
end)
|
||||
|
||||
clock:connect_signal("button::press", function(c, _, _, button)
|
||||
|
|
Loading…
Reference in New Issue