+ display current keyboard layout

This commit is contained in:
committer@tuxwarrior
2026-03-11 05:10:18 -05:00
parent 33ddcf878e
commit 298822d61d

View File

@@ -0,0 +1,14 @@
#!/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'