Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tarmean/efea9cf941576d1387f26cba288b97a9 to your computer and use it in GitHub Desktop.
Save Tarmean/efea9cf941576d1387f26cba288b97a9 to your computer and use it in GitHub Desktop.
{ rule = { name = "Plover: Suggestions Display" },
properties = {floating=true,
maximized_vertical=true, maximized_horizontal=false },
callback = function (c)
local cl_width = 250 -- width of buddy list window
local scr_area = screen[c.screen].workarea
local cl_strut = c:struts()
-- scr_area is affected by this client's struts, so we have to adjust for that
if c:isvisible() and cl_strut ~= nil and cl_strut.right > 0 then
c:geometry({x=scr_area.x + scr_area.width - cl_strut.right, y=scr_area.y, width=cl_strut.right})
-- scr_area is unaffected, so we can use the naive coordinates
else
c:struts({left=0, right=cl_width})
c:geometry({x=scr_area.x + scr_area.width - cl_width, y=scr_area.y, width=cl_width, height = scr_area.height})
end
awful.client.property.set(c, "overwrite_class", "Plover: Suggestions")
end },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment