nixos_config/util/toggle_xkb.xsh
2026-03-13 20:04:46 +01:00

4 lines
No EOL
173 B
Text

import re
_ = $(swaymsg input "type:keyboard" xkb_switch_layout next)
print("Layout: " + re.search(r'"xkb_active_layout_name": "(.+?)"', $(swaymsg -t get_inputs)).group(1))