Skip to content

Instantly share code, notes, and snippets.

@SammysHP
Last active January 21, 2018 16:09
Show Gist options
  • Save SammysHP/3282c841c4b3cb7bda752ab04974dcd2 to your computer and use it in GitHub Desktop.
Save SammysHP/3282c841c4b3cb7bda752ab04974dcd2 to your computer and use it in GitHub Desktop.
Monkey patching awful.placement to add a "center_parent" placement function
-- just insert in your rc.lua
function awful.placement.center_parent(c, args)
if c.transient_for then
args.parent = c.transient_for
return awful.placement.centered(c, args)
end
return awful.placement.no_overlap(c, args)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment