import re print("Layout: " + re.search(r'"xkb_active_layout_name": "(.+?)"', $(swaymsg -t get_inputs)).group(1))