diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-08-23 07:34:24 +0300 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-08-23 07:34:24 +0300 |
commit | a0ef799124314a93af373db95c3b904b667bf421 (patch) | |
tree | 8114dfc69db46512e75d7988492aa7df3deb56dd /.config/eww | |
parent | 6636d856b4385bd630118d45c7983d49670fceee (diff) |
eww: Use ‘jq’ instead of ‘sed’
Diffstat (limited to '.config/eww')
-rwxr-xr-x | .config/eww/scripts/keymap-listener | 10 |
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' |