#!/bin/bash
hyprctl \
--batch "$(
hyprctl devices -j |
jq -r '.keyboards[] | .name' |
while IFS= read -r keyboard; do
printf '%s %s %s;' 'switchxkblayout' "${keyboard}" 'next'
done
)"