On Sun, Dec 5, 2010 at 12:18 PM, Mickaël <[email protected]> wrote:
> Vitor Eiji Justus Sakaguti <vitoreiji0 <at> gmail.com> writes:
>> Mickaël, I've been thinking of a solution to your problem and I think
>> I got something.
>> Basically one would have to implement the following:
>> Everytime a new client is spawned or changes it's geometry, check if
>> any part of the client is outside the workarea. If so, create a new
>> tag and put this client in the new tag. The new tag would need a
>> custom display that depends on the placement of clients in the main
>> tag.
>
> Yes, that sounds good! :)
> I'll give a try but as I'm new to awesome, you probably beat me!
> So, lets me know if you success... :)
I hope you didn't try yet because it turns out this was all very unnecessary!
As usual, KISS is the way to go.
We don't really need a new tag, it's enough to shift the floating
clients' geometry in the current tag, very easy.
Try putting these bindings in your globalkeys
-------------------------------------------------------------------------
awful.key({ modkey, }, "a",
function ()
local allclients = client.get(mouse.screen)
for _,c in ipairs(allclients) do
if floats(c) and c:tags()[mouse.screen] ==
awful.tag.selected(mouse.screen) then
local g = c:geometry()
local w = screen[c.screen].workarea
g.x = g.x + w.width
c:geometry(g)
end
end
end),
awful.key({ modkey, }, "d",
function ()
local allclients = client.get(mouse.screen)
for _,c in ipairs(allclients) do
if floats(c) and c:tags()[mouse.screen] ==
awful.tag.selected(mouse.screen) then
local g = c:geometry()
local w = screen[c.screen].workarea
g.x = g.x - w.width
c:geometry(g)
end
end
end),
awful.key({ modkey, "Shift" }, "s",
function ()
local allclients = client.get(mouse.screen)
for _,c in ipairs(allclients) do
if floats(c) and c:tags()[mouse.screen] ==
awful.tag.selected(mouse.screen) then
local g = c:geometry()
local w = screen[c.screen].workarea
g.y = g.y + w.height
c:geometry(g)
end
end
end),
awful.key({ modkey, }, "s",
function ()
local allclients = client.get(mouse.screen)
for _,c in ipairs(allclients) do
if floats(c) and c:tags()[mouse.screen] ==
awful.tag.selected(mouse.screen) then
local g = c:geometry()
local w = screen[c.screen].workarea
g.y = g.y - w.height
c:geometry(g)
end
end
end),
-------------------------------------------------------------------------
They will not behave well if you have more than one tag selected, I'll
fix that soon, but it's a start.
Damn, I was very tired yesterday, only thought of this in while taking
a nice refreshing shower this morning :)
Anyway, I hope this helps.
Cheers,
Vitor
--
To unsubscribe, send mail to [email protected].