Add function to shrink window to minimum pfx width
Useful for testing Firefox and Picturefix's minimum width.
This commit is contained in:
parent
c67d9dbec1
commit
bf05b1b11f
1 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,13 @@ function new_mail(maildir)
|
||||||
return count
|
return count
|
||||||
end
|
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
|
-- {{{ Error handling
|
||||||
-- Check if awesome encountered an error during startup and fell back to
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
-- another config (This code will only ever execute for the fallback config)
|
-- 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, "Shift" }, ",", function () awful.client.movetoscreen(client.focus, -1) end),
|
||||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
||||||
awful.key({ modkey, }, "Tab", hpraise),
|
awful.key({ modkey, }, "Tab", hpraise),
|
||||||
|
awful.key({ modkey, }, "g", shrink_to_picturefix_width),
|
||||||
|
|
||||||
-- Standard program
|
-- Standard program
|
||||||
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
||||||
|
|
Loading…
Reference in a new issue