From dc85f3841eff0f2b3539c3eb2b59b584f91403c5 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 28 Jun 2020 23:45:16 +0200 Subject: bin/swq: add 'current output-full' to get output json --- bin/swq | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/swq b/bin/swq index ba6e382..39a594a 100755 --- a/bin/swq +++ b/bin/swq @@ -119,7 +119,8 @@ _current() ws) _current workspace ;; workspace) swtree | jq '.. | select(.type?=="workspace") | . as $parent | $parent.nodes[]?, $parent.floating_nodes[]? | if .focused? then $parent else empty end' ;; - output) $0 current workspace | jq -r '.output' ;; + output) $0 current workspace | jq -r '.output' ;; + output-full) $0 list output | jq ".[] | select((.type?==\"output\") and (.name?==\"$($0 current output)\"))" ;; *) printf 'usage: swq current \n\n' exit 2 ;; -- cgit 1.4.1