On 28.12.2011 10:39, Arvydas Sidorenko wrote:
> 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.
Hi,
this has tabs, too. The commit message sounds more like a mailing list message
than a commit message (Since it obviously is a mailing list message).
The whole function can be condensed into the following (but I guess keeping the
warea variable wouldn't hurt either):
function maximize(c)
local sel = c or capi.client.focus
sel:geometry(capi.screen[sel.screen].workarea)
end
The next re-arrange will return the client back to its normal size, so is this
function really that useful? If I'd want a function which maximizes a client,
I'd just maximize it. What's the point of pretending it isn't maximized?
Uli
Same P.S. as for the last mail, sorry.
--
"Do you know that books smell like nutmeg or some spice from a foreign land?"
-- Faber in Fahrenheit 451
--
To unsubscribe, send mail to [email protected].