#!/usr/bin/env bash # 26.03.11 :: klevstul # ------------------------------------------------------------------------------------- # This command: # # Retrieves device information via hyprctl devices -j. # Filters for the main keyboard using select(.main == true). # Extracts the active layout (active_keymap). # Cuts the first two characters (e.g., us, de) and converts them to uppercase. # ------------------------------------------------------------------------------------- hyprctl devices -j | jq -r '.keyboards[] | select(.main == true) | .active_keymap' | cut -c1-2 | tr 'a-z' 'A-Z'