Ignas!

El dissabte, 04 de maig del 2013 a les 10:24, Ignas Anikevičius va escriure:

> On 03/05/13 09:49:11 +0200, mimosinnet wrote:

> What about:
> 
>     Menu_Table = {M_File, M_Mail, M_Office, M_Fox, M_Sys, M_Oci, M_Chrome, 
> M_Xarxa, M_Awesome}
> 
>     -- assuming you want this, insert it somewhere in the globalkeys
>     -- table
>     awful.key({ "Mod4" }, "w",
>         function ()
>             local s = mouse.screen
>             local id = awful.tag.selected (s)
>             Menu_Table[id]:show({keygrabber=true})
>         end)

Excellent! Thanks for the tip! It has helped me to understand the lua
logic. This is now working:

>----

Numeric_Pad = { "KP_End", "KP_Down", "KP_Next", "KP_Left", "KP_Begin", 
"KP_Right", "KP_Home", "KP_Up", "KP_Prior" }
Menu_Table  = { M_File, M_Mail, M_Office, M_Fox, M_Sys, M_Oci, M_Chrome, 
M_Xarxa, M_Awesome }

for i = 1, 9 do
    globalkeys = awful.util.table.join(globalkeys,
                -- Got to tag with numeric pad  
                awful.key({ }, Numeric_Pad[i], function () 
awful.tag.viewonly(tags[mouse.screen][i]) end),
                -- Go to tag and show menu with shift and numeric pad 
                awful.key({ "Shift" }, Numeric_Pad[i], function () 
                                awful.tag.viewonly(tags[mouse.screen][i])
                                Menu_Table[i]:show({keygrabber=true}) 
                end),
                -- Show menu with control and numeric pad
                awful.key({ "Control" }, Numeric_Pad[i], function () 
                                Menu_Table[i]:show({keygrabber=true}) 
                end)

        )
end

>----

Basically, I use the numeric pad to:
- go to tag (using the numeric pad)
- go to tag and show menu associated to this tag (numeric pad + shift)
- show the menu associated to tag (numeric pad + control)

Awesome! 

Thanks!

-- 
Mimosinnet
Linux User: #463211
41:25:16N (41.421110) 2:11:28E (2.188333)

Attachment: pgp5K56rPEwGx.pgp
Description: PGP signature

Reply via email to