From 107b5406649369426e89d8cdcc02a022bfbefb18 Mon Sep 17 00:00:00 2001 From: moons-14 Date: Mon, 27 Oct 2025 02:53:13 +0900 Subject: [PATCH] input method --- modules/hm/fcitx5/config | 83 ++++++++++++++++++++++++++++++++++++++ modules/hm/fcitx5/profile | 22 ++++++++++ modules/hm/gui.nix | 10 +++++ modules/hm/niri/config.kdl | 2 + 4 files changed, 117 insertions(+) create mode 100644 modules/hm/fcitx5/config create mode 100644 modules/hm/fcitx5/profile diff --git a/modules/hm/fcitx5/config b/modules/hm/fcitx5/config new file mode 100644 index 0000000..77db5da --- /dev/null +++ b/modules/hm/fcitx5/config @@ -0,0 +1,83 @@ +[Hotkey] +# トリガーキーを押すたびに切り替える +EnumerateWithTriggerKeys=True +# 一時的に第1入力メソッドに切り替える +AltTriggerKeys= +# 切り替え時は第1入力メソッドをスキップする +EnumerateSkipFirst=False +# Time limit in milliseconds for triggering modifier key shortcuts +ModifierOnlyKeyTimeout=250 + +[Hotkey/TriggerKeys] +0=Control+space +1=Zenkaku_Hankaku + +[Hotkey/EnumerateForwardKeys] +0=Muhenkan + +[Hotkey/EnumerateBackwardKeys] +0=Henkan + +[Hotkey/EnumerateGroupForwardKeys] +0=Super+space + +[Hotkey/EnumerateGroupBackwardKeys] +0=Shift+Super+space + +[Hotkey/ActivateKeys] +0=Henkan + +[Hotkey/DeactivateKeys] +0=Muhenkan + +[Hotkey/PrevPage] +0=Up + +[Hotkey/NextPage] +0=Down + +[Hotkey/PrevCandidate] +0=Shift+Tab + +[Hotkey/NextCandidate] +0=Tab + +[Hotkey/TogglePreedit] +0=Control+Alt+P + +[Behavior] +# デフォルトで有効にする +ActiveByDefault=False +# フォーカス時に状態をリセット +resetStateWhenFocusIn=No +# 入力状態を共有する +ShareInputState=No +# アプリケーションにプリエディットを表示する +PreeditEnabledByDefault=True +# 入力メソッドを切り替える際に入力メソッドの情報を表示する +ShowInputMethodInformation=True +# フォーカスを変更する際に入力メソッドの情報を表示する +showInputMethodInformationWhenFocusIn=False +# 入力メソッドの情報をコンパクトに表示する +CompactInputMethodInformation=True +# 第1入力メソッドの情報を表示する +ShowFirstInputMethodInformation=True +# デフォルトのページサイズ +DefaultPageSize=5 +# XKB オプションより優先する +OverrideXkbOption=False +# カスタム XKB オプション +CustomXkbOption= +# Force Enabled Addons +EnabledAddons= +# Force Disabled Addons +DisabledAddons= +# Preload input method to be used by default +PreloadInputMethod=True +# パスワード欄に入力メソッドを許可する +AllowInputMethodForPassword=False +# パスワード入力時にプリエディットテキストを表示する +ShowPreeditForPassword=False +# ユーザーデータを保存する間隔(分) +AutoSavePeriod=30 + diff --git a/modules/hm/fcitx5/profile b/modules/hm/fcitx5/profile new file mode 100644 index 0000000..ff69493 --- /dev/null +++ b/modules/hm/fcitx5/profile @@ -0,0 +1,22 @@ +[Groups/0] +# Group Name +Name=Default +# Layout +Default Layout=jp +# Default Input Method +DefaultIM=keyboard-jp + +[Groups/0/Items/0] +# Name +Name=keyboard-jp +# Layout +Layout=jp + +[Groups/0/Items/1] +# Name +Name=mozc +# Layout +Layout=jp + +[GroupOrder] +0=Default \ No newline at end of file diff --git a/modules/hm/gui.nix b/modules/hm/gui.nix index 68ecf43..48d4542 100644 --- a/modules/hm/gui.nix +++ b/modules/hm/gui.nix @@ -15,4 +15,14 @@ recursive = true; source = ./niri; }; + + # input method config + home.file.".config/fcitx5/profile" = { + recursive = true; + source = ./fcitx5/profile; + }; + home.file.".config/fcitx5/config" = { + recursive = true; + source = ./fcitx5/config; + }; } diff --git a/modules/hm/niri/config.kdl b/modules/hm/niri/config.kdl index 6ff3fe3..ac115f6 100644 --- a/modules/hm/niri/config.kdl +++ b/modules/hm/niri/config.kdl @@ -271,6 +271,8 @@ layout { // This line starts waybar, a commonly used bar for Wayland compositors. spawn-at-startup "waybar" +spawn-at-startup "fcitx5 -dr" + // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"