Martin / List,

On Sat, Feb 28, 2009 at 5:25 AM, Martin Stubenschrott <[email protected]
> wrote:

> On 02/24/2009 06:14 PM, Aaron Grattafiori wrote:
>
> > table.insert(globalkeys, key({ modkey }, "h", function ()
> awful.client.focus.bydirection("left"); if client.focus then
> client.focus:raise() end end))
> > table.insert(globalkeys, key({ modkey }, "j", function ()
> awful.client.focus.bydirection("down"); if client.focus then
> client.focus:raise() end end))
> > table.insert(globalkeys, key({ modkey }, "k", function ()
> awful.client.focus.bydirection("up"); if client.focus then
> client.focus:raise() end end))
> > table.insert(globalkeys, key({ modkey }, "l", function ()
> awful.client.focus.bydirection("right"); if client.focus then
> client.focus:raise() end end))
> > table.insert(globalkeys, key({ modkey, "Shift" }, "h", function ()
> awful.client.swap.bydirection("left") end))
> > table.insert(globalkeys, key({ modkey, "Shift" }, "j", function ()
> awful.client.swap.bydirection("down") end))
> > table.insert(globalkeys, key({ modkey, "Shift" }, "k", function ()
> awful.client.swap.bydirection("up") end))
> > table.insert(globalkeys, key({ modkey, "Shift" }, "l", function ()
> awful.client.swap.bydirection("right") end))
>
> Wow, that's great! Finally I feel home again managing my windows with hjkl
> :)
>
> > bydirection can take an optional client "c" but I don't think I
> > need/want that in this case. There is an issue with bydirection and
> > "maximized_horizontal" windows though... I'll have to look into it later.
>
>
> Any updates on this? it would be nice, if bydirection would just work like
> byindex if 2 clients share the same size (like when in maximized mode)


> best regards,
>
> Martin
>
>
The main issue is how the bydirection lua code works. It works by
calculating the distance between all the client windows.
When two are maximized, the distance is zero. So it doesn't think the window
is in the "direction". (At least, thats what it looks
like whats happening at first glance)

I tried a few things the other day but, just managed to break my awesome's
awful client lib heh.

It seems like you'd have to modify the client.lua code in the
<prefix>/share/awesome/lib/awful directory.
Function is_in_direction() and calculate_distance() or
get_client_in_direction() need to be tweaked.
You may be able to modify your rc.lua to check if the window is maximized
and, if so.. just use the index method but, thats really
just a "hack".

I'll look into it again soon and maybe just add some debugging to quickly
find the solution.

cheers,
 -Aaron

Reply via email to