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