Reorganize Fedora dotfiles and remove legacy profile
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
local layout = "EN"
|
||||
local has_im_select = vim.fn.executable("im-select") == 1
|
||||
|
||||
local function update_layout()
|
||||
if not has_im_select then
|
||||
return
|
||||
end
|
||||
|
||||
vim.system({ "im-select" }, { text = true }, function(result)
|
||||
if result.stdout then
|
||||
layout = result.stdout:find("Russian") and "RU" or "EN"
|
||||
@@ -10,7 +15,9 @@ end
|
||||
|
||||
-- Update layout in background every second, never blocks UI
|
||||
local timer = vim.loop.new_timer()
|
||||
timer:start(0, 1000, vim.schedule_wrap(update_layout))
|
||||
if has_im_select then
|
||||
timer:start(0, 1000, vim.schedule_wrap(update_layout))
|
||||
end
|
||||
|
||||
local function keyboard_layout()
|
||||
return layout
|
||||
|
||||
Reference in New Issue
Block a user