]> git.frustrated-labs.net Git - dotfiles.git/commitdiff
add keyboard layout plugin for sketchybar
authorAlexander Goussas <[email protected]>
Sat, 18 Apr 2026 14:59:03 +0000 (09:59 -0500)
committerAlexander Goussas <[email protected]>
Sat, 18 Apr 2026 14:59:03 +0000 (09:59 -0500)
sketchybar/.config/sketchybar/plugins/kbd.sh [new file with mode: 0755]
sketchybar/.config/sketchybar/sketchybarrc

diff --git a/sketchybar/.config/sketchybar/plugins/kbd.sh b/sketchybar/.config/sketchybar/plugins/kbd.sh
new file mode 100755 (executable)
index 0000000..1ad945a
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+sketchybar --set "$NAME" label="$(/usr/local/bin/xkbswitch -ge)"
index 12547b0469d920370cd8f788b38fdf17716bc0e9..863f2972ea8f96800219a2c7fe4cc3baef1f30a9 100755 (executable)
@@ -66,6 +66,8 @@ sketchybar --add item clock right \
            --set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \
            --subscribe battery system_woke power_source_change \
            --add item cpu right \
-           --set cpu update_freq=10 icon='' script="$PLUGIN_DIR/cpu.sh"
+           --set cpu update_freq=10 icon='' script="$PLUGIN_DIR/cpu.sh" \
+           --add item kbd right \
+           --set kbd update_freq=2 icon='' script="$PLUGIN_DIR/kbd.sh"
 
 sketchybar --update