I had sent this kind of patch some months ago and you rejected it
because of poor implementation and such. I rewrote it on the way to the
first patches of new layout suit. Hopefuly it will go through this time :)
I have mapped it to mod4+shift+f and it is the most frequently used key by me
after mod4+enter.

It maximizes the client to full screen without changing any of it's or
layout properties.

Signed-off-by: Arvydas Sidorenko <[email protected]>
---
 lib/awful/client.lua.in |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in
index 5846ed6..ca7b221 100644
--- a/lib/awful/client.lua.in
+++ b/lib/awful/client.lua.in
@@ -439,6 +439,19 @@ function movetotag(target, c)
     end
 end
 
+--- Maximizes the client keeping the status bars visible
+-- @param c The optional client, otherwise focused one is used
+function maximize(c)
+       local sel = c or capi.client.focus
+       local warea = capi.screen[sel.screen].workarea
+       local geometry = sel:geometry()
+       geometry["x"] = warea["x"]
+       geometry["y"] = warea["y"]
+       geometry["width"] = warea["width"]
+       geometry["height"] = warea["height"]
+       sel:geometry(geometry)
+end
+
 --- Toggle a tag on a client.
 -- @param target The tag to toggle.
 -- @param c Optional client to toggle, otherwise the focused one is used.
-- 
1.7.8.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to