dotfiles/home/user/.config/i3blocks/scripts/layout_change_handler.sh
2026-02-19 20:23:22 +03:00

9 lines
200 B
Bash
Executable File

#!/bin/sh
swaymsg -m -t SUBSCRIBE "['input']" | \
jq --unbuffered -r '.change' | while read -r line; do
if echo "${line}" | grep -q "xkb_layout"; then
pkill -RTMIN+1 i3blocks
fi
done