mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-30 01:34:59 +08:00
Fix initial width of dock activator
This commit is contained in:
parent
d0c343b30a
commit
d5b25fa387
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue