#!/bin/sh -e
# TODO completion: tree, outputs, inputs, ...
unbuffer swaymsg -t get_$1 | (test "$1" = tree && jq -C || cat) | less -RF