summaryrefslogtreecommitdiffstats
path: root/local/bin/sb-input
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2023-11-25 15:50:08 -0500
committerMitsuo Tokumori <[email protected]>2023-11-25 15:50:56 -0500
commitc285ddd9d16f0038da0c036882eef7be75e2aae0 (patch)
tree7c4b75f275c2bf63dea6d5691051ea6e973def4c /local/bin/sb-input
parent6778640f84cce092f425ad4ab9a1ec310a08f6d2 (diff)
downloaddotfiles-c285ddd9d16f0038da0c036882eef7be75e2aae0.tar.gz
dotfiles-c285ddd9d16f0038da0c036882eef7be75e2aae0.tar.bz2
dotfiles-c285ddd9d16f0038da0c036882eef7be75e2aae0.zip
Add helper scripts for dwmblocks
Diffstat (limited to 'local/bin/sb-input')
-rwxr-xr-xlocal/bin/sb-input9
1 files changed, 9 insertions, 0 deletions
diff --git a/local/bin/sb-input b/local/bin/sb-input
new file mode 100755
index 0000000..4fb1575
--- /dev/null
+++ b/local/bin/sb-input
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+icon="🌐"
+layout="$(setxkbmap -query | grep layout | awk '{print $2}')"
+
+# fcitx state, 0 for close, 1 for inactive, 2 for active
+test $(fcitx5-remote) = 2 && layout="日本語"
+
+echo $icon$layout