On Sat, Feb 28, 2009 at 02:25:49PM +0100, Martin Stubenschrott 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)?
Hi Martin.
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?
Cheers.
\n\n
--
To unsubscribe, send mail to [email protected].