summaryrefslogtreecommitdiff
path: root/.config/polybar/keyboard_lang.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/polybar/keyboard_lang.sh')
-rwxr-xr-x.config/polybar/keyboard_lang.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/polybar/keyboard_lang.sh b/.config/polybar/keyboard_lang.sh
new file mode 100755
index 00000000..00288f1b
--- /dev/null
+++ b/.config/polybar/keyboard_lang.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -euo pipefail
+
+LANG=$(setxkbmap -query | grep layout | awk -F ' ' '{print $2}')
+
+if [ "$LANG" = 'us' ]; then
+ echo "%{T5}󾓦%{T-}"
+else
+ echo "%{T5}󾓫%{T-}"
+fi