#!/bin/bash layout=$(setxkbmap -query | grep -oP 'layout:\s*\K\w+') echo "key: $layout "