awesomewm/desktop/widgets/keymap.lua

42 lines
946 B
Lua
Executable File

local keymap = {}
keymap.widget = wibox.widget {
{
{ -- Right spacer
widget = wibox.widget.separator,
color = beautiful.color.transparent,
forced_width = beautiful.dpi(3)
},
wibox.widget {
wrapper.ibus.ibus_indicator_text,
wrapper.ibus.xkb_indicator_text,
forced_num_cols = 1,
forced_num_rows = 2,
homogeneous = true,
expand = true,
layout = wibox.layout.grid
},
{ -- Left spacer
widget = wibox.widget.separator,
color = beautiful.color.transparent,
forced_width = beautiful.dpi(3)
},
layout = wibox.layout.align.horizontal,
},
layout = wibox.container.background,
}
-- Change background when mouse is over widget
keymap.widget:connect_signal("mouse::enter", function(result)
keymap.widget.bg = beautiful.color.bar.hover_bg
end)
keymap.widget:connect_signal("mouse::leave", function(result)
keymap.widget.bg = beautiful.color.transparent
end)
return keymap.widget