On Tue, Feb 23, 2010 at 12:25:01PM +0530, barkat wrote:
>    Hi,
>    by Mod + n focus client get minimized ok , but no way to maximize or
>    raise client by keyboard shortcut , using mouse is only way seems.
>    Is there already a keyboard shortcut or a way to add one. Search wiki
>    but not found any. Pls help.
>    --
>    Regards,
>    Barkat

I feel like this must've been answered before, but I keep seeing it here
or on irc, so here is sth i just wrote:


-- helper functions
function client_restore(c)
    c.minimized = false
    awful.tag.viewmore(c:tags(), c.screen)
    client.focus = c
    client.focus:raise()
end

function client_filtermenu(filter, value, f)

    if not filter then return end
    clients = client.get()

    m = {}
    m.items = {}
    for i, c in ipairs(clients) do
        if c[filter] and c[filter] == value then
            m.items[#m.items +1] = {
                awful.util.escape(c.name),
                function() f(c) end,
                c.icon
            }
            print(#m.items)
        end
    end
    if #m.items >= 1 then
        local menu = awful.menu.new(m)
        menu:show(true)
        return menu
    end
end

--keybindings

awful.key({ settings.modkey, "Mod1"    }, "n", function (c)
        client_filtermenu('minimized',true, client_restore)
        end),


hth,
bioe


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

Reply via email to