adds placement function support to tag preview (#66)

* + Placement Function Support for tag preview widget

* made a mistake

* Remove empty line (sorry it was annoying me lol)

Co-authored-by: undefinedDarkness <david@localhost.localdomain>
Co-authored-by: gokul <33443763+JavaCafe01@users.noreply.github.com>
This commit is contained in:
contribuewwt 2021-06-16 13:18:46 +05:30 committed by GitHub
parent c72ff05760
commit 4f1022b83e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -154,6 +154,7 @@ local enable = function(opts)
scale = opts.scale or scale
work_area = opts.honor_workarea or work_area
padding = opts.honor_padding or padding
placement_fn = opts.placement_fn or nil
end
local tag_preview_box = wibox({
@ -187,8 +188,13 @@ local enable = function(opts)
end)
awesome.connect_signal("bling::tag_preview::visibility", function(s, v)
if placement_fn then
placement_fn(tag_preview_box)
else
tag_preview_box.x = s.geometry.x + widget_x
tag_preview_box.y = s.geometry.y + widget_y
end
tag_preview_box.visible = v
end)
end