On Mon, Dec 13, 2010 at 10:54 AM, Daniel <[email protected]> wrote:
>
> I'm a user of larswm tiling window manager, but thought to try out
> awesome, as larswm starts to feel a little bit dated somehow.
>
> Wanting to quickly get a usable system set up, to be able to continue
> configuring, I would like to ask how to set up the following functions.
> I'm mostly using the tiled layout, with 1 master window on the left.
>
> 1) A key (typically Alt-Tab) to swap between master window and the
> top-most window in the right stack (called slaves in awesome?).
> Leaving focus still in the master window.
>
> 2) A key (Shift-Alt-Tab) to cycle clockwise by moving bottom window
> from right stack into master position, and the master window to top-
> position on the right; shifting all windows around.
> Still leaving focus in master window.
>
> I tried fiddling a little bit with existing client swap functions, but
> I'm just a beginner with lua and the whole system...
If I understood correctly, this is what you want:
-- rotate clients and focus master...
awful.key({ modkey, "Control" }, "j",
function ()
local allclients = awful.client.visible(client.focus.screen)
for i,v in ipairs(allclients) do
allclients[1]:swap(allclients[i])
end
awful.client.focus.byidx(1)
end),
-- ... the other way 'round!
awful.key({ modkey, "Control" }, "k",
function ()
local allclients = awful.client.visible(client.focus.screen)
for i,v in ipairs(allclients) do
if allclients[i+1] then
allclients[i+1]:swap(v)
end
end
awful.client.focus.byidx(-1)
end),
--
Renato Botelho
--
To unsubscribe, send mail to [email protected].