From 298822d61da119d652bb15904a71fd8408ee6122 Mon Sep 17 00:00:00 2001 From: "committer@tuxwarrior" Date: Wed, 11 Mar 2026 05:10:18 -0500 Subject: [PATCH] + display current keyboard layout --- dots/bin/displayKeyboardLayout.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 dots/bin/displayKeyboardLayout.sh diff --git a/dots/bin/displayKeyboardLayout.sh b/dots/bin/displayKeyboardLayout.sh new file mode 100755 index 0000000..bfcc4c8 --- /dev/null +++ b/dots/bin/displayKeyboardLayout.sh @@ -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' \ No newline at end of file