In awesome, what key binding can you use to maximise a window (in floating mode, of course) so that it maximise in just the horizontal or just the vertical direction?

I know that mod4 + m will maximise it fully in both directions so I kind of assume it will be possible to do a mapping to just one direction.

awesome v3.5.1 (Ruby Tuesday)
• Build: May 28 2013 18:46:22 for x86_64 by gcc version 4.8.0 (mockbuild@buildvm-23.phx2.fedoraproject.org)
• Compiled against Lua 5.1.4 (running with Lua 5.1)
• D-Bus support: ✔ 

But that is an ancient version! Yes, but this is on CentOS 7 where compiling newer versions of Awesome is a PITA. This one works for me just as it is.


By default there is no such key binding (in 3.5.1, see other answer for 4.1). But you can create one. Use this snippet (or better add the key binding to your existing configuration) for your rc.lua file:

clientkeys = awful.util.table.join(
  awful.key({ modkey }, "F7",
    function(c) c.maximized_horizontal = not c.maximized_horizontal end),
  awful.key({ modkey }, "F8",
    function(c) c.maximized_vertical   = not c.maximized_vertical end),

It assigns horizontal and vertical maximization to mod-F7 and mod-F8, respectively.


Since awesome version 4.1 this is Mod+Ctrl+M (vertical) and Mod+Shift+M (horizontal) per default.

  • 1
    Thanks. I updated my question with the version number. I would leave the answer (maybe saying that for newer version) as it is a useful one to know. – Sardathrion - Reinstate Monica May 23 '17 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.