Add function to shrink window to minimum pfx width

Useful for testing Firefox and Picturefix's minimum width.
This commit is contained in:
Tom Willemse 2014-10-30 01:52:16 +01:00
parent c67d9dbec1
commit bf05b1b11f

View file

@ -46,6 +46,13 @@ function new_mail(maildir)
return count
end
function shrink_to_picturefix_width()
local g = client.focus:geometry()
awful.client.floating.set(client.focus, true)
client.focus:geometry({x = g.x, y = g.y, width = 1066, height = 1060})
end
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
@ -346,6 +353,7 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, "Shift" }, ",", function () awful.client.movetoscreen(client.focus, -1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab", hpraise),
awful.key({ modkey, }, "g", shrink_to_picturefix_width),
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),