Skip to content

Instantly share code, notes, and snippets.

@gabrielschulhof
Last active August 29, 2015 14:11
Show Gist options
  • Save gabrielschulhof/8fd581bdcd9957a4ba98 to your computer and use it in GitHub Desktop.
Save gabrielschulhof/8fd581bdcd9957a4ba98 to your computer and use it in GitHub Desktop.
awful.key({ "Mod1", }, " ",
function (c)
local grabberCopy
local grabberCallback = awful.keygrabber.run(
function( mod, key, event )
local stopGrabbing = false
if key == "x" and event == "press" then
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
stopGrabbing = true
end
if stopGrabbing then
awful.keygrabber.stop( grabberCopy )
end
end)
grabberCopy = grabberCallback
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment