From 2a2f956cc66eaf49c3068ecbd8102fdab3087e9e Mon Sep 17 00:00:00 2001 From: hellodword <46193371+hellodword@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:46:18 +0000 Subject: [PATCH] chore: detect fcitx5 on Linux (#626) --- lua/cold_word_drop/processor.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/cold_word_drop/processor.lua b/lua/cold_word_drop/processor.lua index ac370a0..c039038 100644 --- a/lua/cold_word_drop/processor.lua +++ b/lua/cold_word_drop/processor.lua @@ -25,7 +25,10 @@ local function get_record_filername(record_type) if system == "Darwin" then filename = string.format("%s/Library/Rime/lua/cold_word_drop/%s_words.lua", os.getenv('HOME'), record_type) elseif system == "Linux" then - filename = string.format("%s/.config/ibus/rime/lua/cold_word_drop/%s_words.lua", os.getenv('HOME'), record_type) + filename = string.format("%s/%s/rime/lua/cold_word_drop/%s_words.lua", + os.getenv('HOME'), + (string.find(os.getenv('GTK_IM_MODULE'), 'fcitx') and '.local/share/fcitx5' or '.config/ibus'), + record_type) end return filename end