diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-09-13 12:13:35 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-09-13 12:13:35 +0200 |
commit | 4257f6dbdc84aa419b0e8fc623fead4a57ddd3ac (patch) | |
tree | b8f4f46acf24ada39b3a584262092c297c04bb5e /.local/share/bin | |
parent | 869efc2096fbb4f0bc250549e8178c12d2747335 (diff) |
fix kbindicator script and small cleanup
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 } |