summarylogtreecommitdiffstats
path: root/imlist
blob: e7429806b0f4e2a3cc66c551ffd7132b9777e39b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

##
# List all input methods added to Fcitx
##

PATH="/bin"

value="'([^']++)'"
pattern="${value}, ${value}, ${value}"
gdbus call --session --dest org.fcitx.Fcitx \
    --object-path /inputmethod \
    --method org.freedesktop.DBus.Properties.Get org.fcitx.Fcitx.InputMethod IMList |
    grep -Po "\($pattern, true\)" |
    sed -Ee "s/\($pattern.+\)/\\1,\\2,\\3/g"