Files
MyI3Config-fork/scripts/layout-toggle.sh
2026-02-10 09:23:11 +00:00

14 lines
320 B
Bash
Executable File

#!/bin/bash
# layout-toggle.sh
if [ -n "$SWAYSOCK" ]; then
swaymsg input type:keyboard xkb_switch_layout next
else
current=$(setxkbmap -query | awk '/layout/{print $2}')
if [ "$current" = "ch" ]; then
setxkbmap -layout us -variant workman
else
setxkbmap -layout ch -variant de
fi
fi