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:
parent
c72ff05760
commit
4f1022b83e
|
@ -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)
|
||||
tag_preview_box.x = s.geometry.x + widget_x
|
||||
tag_preview_box.y = s.geometry.y + widget_y
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue