awesomewm/modules/ibus/init.lua

29 lines
571 B
Lua
Raw Normal View History

local util = require("modules.ibus.util")
2022-08-03 18:04:09 -07:00
local popup = require("modules.ibus.popup")
local widget = require("modules.ibus.widget")
return {
2022-07-16 19:12:29 -07:00
widget = require("modules.ibus.widget").widget,
keybinds = require("modules.ibus.keybinds"),
2022-08-03 18:04:09 -07:00
set = function(lang)
-- Switch to a language. Used by host interface.
local lang_id
for k, v in pairs(config.ibus.language_list) do
if (v["indicator_code"] == lang) then
lang_id = k
end
end
util.set(lang_id, function()
popup.update()
widget.update()
end)
end,
init = function()
util.set(1)
end
}