Keyboard layout indicator/switcher widget for awesome-wm
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information. Update URL (deficient) Apr 11, 2017
UNLICENSE Unlicense project Sep 6, 2015
init.lua Allow usage as package Apr 4, 2017
keyboard-layout-indicator.lua Another minor cleanup + fixes Apr 22, 2017



Keyboard layout indicator+switcher widget for awesome window manager.


Drop the script into your awesome config folder. Suggestion:

cd ~/.config/awesome
git clone


In your rc.lua:

-- load the widget code
local layout_indicator = require("keyboard-layout-indicator")

-- define your layouts
kbdcfg = layout_indicator({
    layouts = {
        {name="dv",  layout="de",  variant="dvorak"},
        {name="de",  layout="de",  variant=nil},
        {name="us",  layout="us",  variant=nil}

-- add the widget to your wibox

-- Add bindings
local globalkeys = awful.util.table.join(
    awful.key({ "Shift"         }, "Shift_R", function() kbdcfg:next() end ),
    awful.key({ "Mod4", "Shift" }, "Shift_R", function() kbdcfg:prev() end ),

NOTE: middle click on the widget executes a prompt which lets you set a custom keyboard layout. However, this will work only if you assign s.mypromptbox as in the awesome 4.0 default rc.lua. Otherwise, you have to rebind the behaviour manually, see the source code.