summaryrefslogtreecommitdiffstats
path: root/awesome
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-10-30 01:52:16 +0100
committerGravatar Tom Willemse2014-10-30 01:52:16 +0100
commitbf05b1b11f8960cd96723c677558660521d33fb6 (patch)
tree5a15627b186053ea00a5a3e87b00c825eebf41bc /awesome
parentc67d9dbec1c280ceb74d32393e1586052932e869 (diff)
downloaddotfiles-bf05b1b11f8960cd96723c677558660521d33fb6.tar.gz
dotfiles-bf05b1b11f8960cd96723c677558660521d33fb6.zip
Add function to shrink window to minimum pfx width
Useful for testing Firefox and Picturefix's minimum width.
Diffstat (limited to 'awesome')
-rw-r--r--awesome/.config/awesome/rc.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua
index b0f187f..a25629b 100644
--- a/awesome/.config/awesome/rc.lua
+++ b/awesome/.config/awesome/rc.lua
@@ -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),