From c65e9ded7f24b2b137c1151a392abb06dc58e1c6 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 18 Nov 2023 18:57:54 +0100 Subject: chkb: Merge invocations to ‘jq’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .local/bin/chkb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.local/bin/chkb b/.local/bin/chkb index 7bfefcc..b2f0d64 100755 --- a/.local/bin/chkb +++ b/.local/bin/chkb @@ -8,10 +8,9 @@ s="$( { hyprctl -j getoption input:kb_layout hyprctl -j getoption input:kb_variant - } | jq ' - .str | split(",\\s*"; "g") - ' | jq -rn ' + } | jq -rn ' [inputs] + | map(.str | split(",\\s*"; "g")) | transpose | map("\(.[0]) (\(.[1]))") | .[] -- cgit v1.2.3