summaryrefslogtreecommitdiff
path: root/.config/eww/scripts/keymap-listener
blob: 82304b245ada6e0239e207c7152e71407e6c2a8e (plain) (blame)
1
2
3
4
5
6
7
#!/bin/sh

readonly IPC=/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock
readonly KBD=at-translated-set-2-keyboard

hyprctl devices -j | jq -r '.keyboards[-1].active_keymap'
socat -u UNIX-CONNECT:"$IPC" - | sed -En "s/^activelayout>>$KBD,//p"