From a0ef799124314a93af373db95c3b904b667bf421 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 23 Aug 2023 07:34:24 +0300 Subject: eww: Use ‘jq’ instead of ‘sed’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/eww/scripts/keymap-listener | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to '.config/eww/scripts/keymap-listener') 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' -- cgit v1.2.3