summaryrefslogtreecommitdiff
path: root/.config/eww/scripts/keymap-listener
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-23 07:34:24 +0300
committerThomas Voss <mail@thomasvoss.com> 2023-08-23 07:34:24 +0300
commita0ef799124314a93af373db95c3b904b667bf421 (patch)
tree8114dfc69db46512e75d7988492aa7df3deb56dd /.config/eww/scripts/keymap-listener
parent6636d856b4385bd630118d45c7983d49670fceee (diff)
eww: Use ‘jq’ instead of ‘sed’
Diffstat (limited to '.config/eww/scripts/keymap-listener')
-rwxr-xr-x.config/eww/scripts/keymap-listener10
1 files changed, 1 insertions, 9 deletions
diff --git a/.config/eww/scripts/keymap-listener b/.config/eww/scripts/keymap-listener
index a9666aa..e526d03 100755
--- a/.config/eww/scripts/keymap-listener
+++ b/.config/eww/scripts/keymap-listener
@@ -4,13 +4,5 @@ set -e
readonly IPC=/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock
-hyprctl devices | sed -En '/Keyboard at/ {
- :loop
- n
- /active keymap:/! b loop
- s/.*active keymap: //p
- q
-}
-'
-
+hyprctl devices -j | jq -r '.keyboards[-1].active_keymap'
socat -u UNIX-CONNECT:"$IPC" - | sed -En 's/^activelayout>>[^,]+,//p'