On 02/28/2009 08:31 PM, Nikos Ntarmos wrote:

> I used to play around with this:
> 
> keybinding({ modkey }, "j",
>     function ()
>         local curlayout = awful.layout.get(mouse.screen);
>         if string.find(curlayout, "tile") or string.find(curlayout, "fair") 
> then
>             awful.client.focus.bydirection("left");
>         else
>             awful.client.focus.byidx(1);
>         end
>         if client.focus then
>             client.focus:raise()
>         end
>     end
> ):add()
> 
> (ditto with 'right' and '-1' for 'k', etc.)
> 
> so as to use bydirection switching when the layout is one of the tile*
> or fair* variants, and byidx otherwise (i.e. floating, max, magnifier,
> etc.)
> 
> Is this what you're after?


Yes (not yet tested, but i think that'll work).

I still think "bydirection" should work that way be default, as there are
cases which this hack cannot handle (like 2 floating apps sharing the same
position).

--
Martin

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

Reply via email to