diff options
Diffstat (limited to '.local/share/bin')
-rwxr-xr-x | .local/share/bin/kbindicator | 10 | ||||
-rwxr-xr-x | .local/share/bin/mode | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/.local/share/bin/kbindicator b/.local/share/bin/kbindicator index fec586c..819abb2 100755 --- a/.local/share/bin/kbindicator +++ b/.local/share/bin/kbindicator @@ -1,9 +1,9 @@ #!/bin/sh -ENGINE="$(ibus engine)" +CONTROLLER="`qdbus 'org.fcitx.Fcitx5' '/controller' 'org.fcitx.Fcitx.Controller1.CurrentInputMethod'`" -case $ENGINE in - "anthy") echo "jp" ;; - "xkb:us::eng") echo "us" ;; - "xkb:us:intl:eng") echo "us-intl" ;; +case $CONTROLLER in + "keyboard-us") echo "us" ;; + "keyboard-us-intl") echo "us-intl" ;; + "mozc") echo "jp" ;; *) ;; esac diff --git a/.local/share/bin/mode b/.local/share/bin/mode index 2d16819..6515350 100755 --- a/.local/share/bin/mode +++ b/.local/share/bin/mode @@ -155,7 +155,7 @@ switch_cfgs() { mkdir -p ~/.local/share/mode echo $1 > ~/.local/share/mode/active - rm ~/.local/share/mode/dark ~/.local/share/mode/light 2> /dev/null + rm -f ~/.local/share/mode/dark ~/.local/share/mode/light touch ~/.local/share/mode/$1 } |