Add clickable clock

This commit is contained in:
Thomas Avé 2022-11-19 15:07:15 +01:00
parent bc93c8b2c3
commit 3ffc1fba3a
1 changed files with 7 additions and 1 deletions

View File

@ -78,6 +78,8 @@ local cpu_widget = wibox.widget{
})
}
local clock = wibox.widget.textclock('%a %b %d, %H:%M:%S', 1)
-- ===================================================================
-- Bar Creation
-- ===================================================================
@ -108,7 +110,7 @@ top_panel.create = function(s)
pl(frequency_widget, theme.bg_normal, theme.top_panel_powerline),
pl(updates_indicator, theme.top_panel_powerline, theme.bg_normal),
pl(require("widgets.layout-box"), theme.bg_normal, theme.top_panel_powerline),
pl(wibox.widget.textclock('%a %b %d, %H:%M:%S', 1), theme.top_panel_powerline, theme.top_panel_powerline),
pl(clock, theme.top_panel_powerline, theme.top_panel_powerline),
}
}
@ -133,6 +135,10 @@ top_panel.create = function(s)
awful.spawn.with_shell('WINIT_X11_SCALE_FACTOR=1 alacritty -e bash -c "yay ; echo \'\nDone, press any key to exit...\' ; read"')
end)
clock:connect_signal("button::press", function(c, _, _, button)
awful.spawn('gnome-calendar')
end)
end
return top_panel