I am new in the list and I just started with awesome. I have been using fvwm for years, and I thought nothing could have made me ever considering manging window managers...., till something awesome appeared.
My question. I have emulated changing tags with the numeric keyboard:
>---------
-- Numeric pad (JPT) {{{
Teclat_Numeric = { "KP_End", "KP_Down", "KP_Next", "KP_Left", "KP_Begin",
"KP_Right", "KP_Home", "KP_Up", "KP_Prior" }
-- Got to tag with numeric pad
for i = 1, 9 do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ }, Teclat_Numeric[i], function ()
awful.tag.viewonly(tags[mouse.screen][i]) end)
)
end
>---------
And I have defined different menus and been able to get a personalised menu in
each tag:
>---------
-- Go to tag and menu with shift and numeric pad
-- Menus: "M_File", "M_Mail", "M_Office", "M_Fox", "M_Sys", "M_Oci",
"M_Chrome", "M_Xarxa", "M_Awesome"
globalkeys = awful.util.table.join(globalkeys,
awful.key({ "Shift" }, Teclat_Numeric[1], function ()
awful.tag.viewonly(tags[mouse.screen][1])
M_File:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[2], function ()
awful.tag.viewonly(tags[mouse.screen][2])
M_Mail:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[3], function ()
awful.tag.viewonly(tags[mouse.screen][3])
M_Office:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[4], function ()
awful.tag.viewonly(tags[mouse.screen][4])
M_Fox:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[5], function ()
awful.tag.viewonly(tags[mouse.screen][5])
M_Sys:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[6], function ()
awful.tag.viewonly(tags[mouse.screen][6])
M_Oci:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[7], function ()
awful.tag.viewonly(tags[mouse.screen][7])
M_Chrome:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[8], function ()
awful.tag.viewonly(tags[mouse.screen][8])
M_Xarxa:show({keygrabber=true})
end),
awful.key({ "Shift" }, Teclat_Numeric[9], function ()
awful.tag.viewonly(tags[mouse.screen][9])
M_Awesome:show({keygrabber=true})
end)
)
>---------
This more of a lua question: is it possible to simplify the above code?
I have unsuccessfully tried to get the menu in a variable and use them
afterwards. Or maybe am I using a wrong approach?
Thanks for your attention and for this awesome window manager!
Cheers!
--
Mimosinnet
Linux User: #463211
41:25:16N (41.421110) 2:11:28E (2.188333)
pgpn0MAar8EBO.pgp
Description: PGP signature
