Thanks for your code Adrian.
I modified it to make it look more like ion's scratchpad.
Usage:
Mod+d make a window become  the scratchpad (Putting more than 1
windows leads to unhandled behaviours redmond style \o/).
And after that, Mod+s hides/shows it.

It's quick and dirty, but it works ! (:

-- 
Damien Rajon
-- {{{ Scratchpad
-- Make a window become the scratchpad
table.insert(globalkeys, key({ modkey }, "d",
function (c)
        if not awful.client.ismarked(c) 
        then 
                awful.client.togglemarked(c) 
                awful.client.floating.set(c, true)
                awful.client.moveresize (220, 120, -500, -300, c);
                c.hide = not c.hide 
        end 
        end))


-- Hide/show scratchpad
table.insert(globalkeys, key({ modkey }, "s", 
function () 
        for k, c in pairs(awful.client.getmarked()) do 
          if c.hide then
            awful.client.movetotag(awful.tag.selected(), c)
            c.hide = false
            client.focus = c
            c:raise()
            awful.client.togglemarked(c) 
          else
            c.hide = true
            awful.client.togglemarked(client.focus) 
          end
        end
end))
-- }}}

Reply via email to