diff --git a/.config/xmobar/kbd_cycle.sh b/.config/xmobar/kbd_cycle.sh
new file mode 100755
index 0000000..adef34c
--- /dev/null
+++ b/.config/xmobar/kbd_cycle.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Cycle keyboard layout it -> us -> sk(qwerty); "prev" cycles backwards.
+
+current=$(setxkbmap -query | awk '/^layout:/ {split($2, a, ","); print a[1]}')
+
+if [[ "$1" == "prev" ]]; then
+ case "$current" in
+ it) next=sk ;;
+ us) next=it ;;
+ *) next=us ;;
+ esac
+else
+ case "$current" in
+ it) next=us ;;
+ us) next=sk ;;
+ *) next=it ;;
+ esac
+fi
+
+if [[ "$next" == "sk" ]]; then
+ setxkbmap -layout sk -variant qwerty
+else
+ setxkbmap -layout "$next" -variant ""
+fi
diff --git a/.config/xmobar/xmobarrc_hdmi b/.config/xmobar/xmobarrc_hdmi
index 6a59b53..08311d2 100644
--- a/.config/xmobar/xmobarrc_hdmi
+++ b/.config/xmobar/xmobarrc_hdmi
@@ -57,5 +57,5 @@ Config { overrideRedirect = True
]
, sepChar = "%"
, alignSep = "}{"
- , template = " | %UnsafeXMonadLog% } %uptime% | %multicpu% %coretemp% | %memory% | %kbd% { %backup%%updates%%LZIB% · %ens_brief% | %pactl_volume% | %date% "
+ , template = " | %UnsafeXMonadLog% } %uptime% | %multicpu% %coretemp% | %memory% | %kbd% { %backup%%updates%%LZIB% · %ens_brief% | %pactl_volume% | %date% "
}
diff --git a/.config/xmobar/xmobarrc_laptop b/.config/xmobar/xmobarrc_laptop
index 3b5cd85..2266b64 100644
--- a/.config/xmobar/xmobarrc_laptop
+++ b/.config/xmobar/xmobarrc_laptop
@@ -58,5 +58,5 @@ Config { overrideRedirect = True
]
, sepChar = "%"
, alignSep = "}{"
- , template = " | %UnsafeXMonadLog% } %uptime% | %multicpu% %coretemp% | %memory% | %kbd% { %backup%%updates%%LZIB% · %ens_brief% | %pactl_volume% | %date% %_XMONAD_TRAYPAD% "
+ , template = " | %UnsafeXMonadLog% } %uptime% | %multicpu% %coretemp% | %memory% | %kbd% { %backup%%updates%%LZIB% · %ens_brief% | %pactl_volume% | %date% %_XMONAD_TRAYPAD% "
}