summarylogtreecommitdiffstats
path: root/current
diff options
context:
space:
mode:
authorDuong Do Minh Chau2020-06-23 00:56:54 +0700
committerDuong Do Minh Chau2020-06-23 01:00:31 +0700
commitbe4fbae3e241339066e4b5a91bf93b0d0bc727b8 (patch)
tree03aed9e2ba71985ef4c13a9ac0d745c6da31d077 /current
downloadaur-polybar-fcitx-scripts.tar.gz
Initial commit
Diffstat (limited to 'current')
-rwxr-xr-xcurrent12
1 files changed, 12 insertions, 0 deletions
diff --git a/current b/current
new file mode 100755
index 000000000000..3e3fa6359be9
--- /dev/null
+++ b/current
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+##
+# Print out identifier of current input method
+##
+
+PATH="/bin"
+
+gdbus call --session --dest org.fcitx.Fcitx \
+ --object-path /inputmethod \
+ --method org.fcitx.Fcitx.InputMethod.GetCurrentIM |
+ grep -Po "'([^']++)'" | sed -Ee "s/'([^']++)'/\\1/g"