diff options
| author | Robert Günzler <r@gnzler.io> | 2020-06-28 23:45:16 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2020-06-28 23:58:37 +0200 |
| commit | dc85f3841eff0f2b3539c3eb2b59b584f91403c5 (patch) | |
| tree | 756bc55e18aeb3a091ed69e7c13ce4f1abb841e1 /bin/swq | |
| parent | 3d59349d5a302de35527a42ccce5aaffbfca3eec (diff) | |
bin/swq: add 'current output-full' to get output json
Diffstat (limited to 'bin/swq')
| -rwxr-xr-x | bin/swq | 3 |
1 files changed, 2 insertions, 1 deletions
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 <con|workspace|output>\n\n' exit 2 ;; |