On 10:32 Tue 24 Feb     , Julien Danjou wrote:
> At 1235415909 time_t, Aaron Grattafiori wrote:
> > So far, I'm enjoying awesome a lot but I do miss being able to select
> > left, right, up and down via h-j-k-l. (For non-wmii users if I have a
> > screen with 6 terminals, all equally sized on my screen, 3 on each
> > "side" of the screen... with wmii I was able to directly go from the 
> > "center" terminal on the left side to the "center" terminal on the right
> > side with a simply MODKEY-l. With dwm, awesome, x-modnad and almost
> > every other tiling window manager, you've gotta use the mouse or press
> > 'j' or 'k' until you've got the right window. 
> > 
> > I've thought about writing my own layout tracking thing or something to
> > do this to support switching virtual columns or something but I'm seeing 
> > if I can get used to just cycling through with j and k. Maybe I'll work
> > on this tomorrow, as I too found it convenient.
> 
> Aren't you looking for awful.client.focus.bydirection?
> http://awesome.naquadah.org/apidoc/modules/awful.client.html#focus.bydirection
> 
> Cheers,
> -- 
> Julien Danjou
> // ᐰ <[email protected]>   http://julien.danjou.info
> // 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
> // The more we fly, the more we climb, the more we know that heaven is a lie.

Sweet. I had glanced at awful when I first switched but now I think I'll look
through it a lot more. In case anyone else is wondering here is the
movement from my rc.lua:

NOTE: I've modified my default rc.lua to among other things, comment out
conflicting keys.

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))

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.

Thanks Julien,

 -Aaron Grattafiori


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

Reply via email to