From d5b25fa3877ecd3e28f8787bef8d615e5f7d284a Mon Sep 17 00:00:00 2001 From: elenapan Date: Tue, 30 Jun 2020 15:23:36 +0300 Subject: [PATCH] Fix initial width of dock activator --- config/awesome/elemental/bar/amarena.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/awesome/elemental/bar/amarena.lua b/config/awesome/elemental/bar/amarena.lua index d95967a..31bc854 100644 --- a/config/awesome/elemental/bar/amarena.lua +++ b/config/awesome/elemental/bar/amarena.lua @@ -63,6 +63,7 @@ awful.screen.connect_for_each_screen(function(s) placement = dock_placement, widget = dock }) + dock_placement(s.dock) local popup_timer local autohide = function () @@ -110,14 +111,18 @@ awful.screen.connect_for_each_screen(function(s) end) )) - s.dock:connect_signal("property::width", function () + local function adjust_dock() -- Reset position every time the number of dock items changes dock_placement(s.dock) + -- Adjust activator width every time the dock wibox width changes s.dock_activator.width = s.dock.width + dpi(250) -- And recenter awful.placement.bottom(s.dock_activator) - end) + end + + adjust_dock() + s.dock:connect_signal("property::width", adjust_dock) s.dock:connect_signal("mouse::enter", function () if popup_timer then