Keyboard Shortcut to Change Keyboard Layout in AwesomeWM
This is basically as easy as it gets. I have documented setting one layout to one shortcut and the second layout to another shortcut. If you want a shortcut that will cycle through them, use something else.
In your awesomeWM config search for globalkeys = gears.table.join(
Then add a shortcut with your desired keys - I chose mod
, shift
and tab
for the first one and the same set plus control
for the second:
awful.key({modkey, "Shift" }, "Tab", function () awful.spawn("setxkbmap de") end),
awful.key({modkey, "Control", "Shift" }, "Tab", function () awful.spawn("setxkbmap pl") end)
Remember - the very last entry has to have no comma at the end.
Now simply reset your awesomeWM and use your keybinds.