This feature was rejected from i3 because apparently michael wanted to not break programs that checked for exact json strings.
I could do it with a wrapper script, but it's nicer to have it built in.
What do you think?
I'm okay with pretty printing. Any program that depends on exact string matches for JSON output was written by an idiot anyway.
I also would like to see non-JSON pretty printing happen sometime, so you could do something like this:
$ swaymsg -ht get_outputs
DVI-I-1: 1920x1080+3840,0 x1
Visible: true
Active: true
Primary: false
Current workspace: 3
DVI-D-1: 1920x1080+0,0 x1
Visible: true
Active: true
Primary: false
Current workspace: 2
HDMI-A-1: 1920x1080+1920,0 x1
Visible: true
Active: true
Primary: false
Current workspace: 1
Would also be useful for inputs.
Sure, is yaml good enough for that?
No, machine readable isn't a goal of a human-friendly output mode.
Do we want the ipc itself to give pretty printed json to clients or just reparse and pretty print in swaymsg? I think you could make an argument for either way.
Better to have swaymsg do the pretty printing imo.
Most helpful comment
I'm okay with pretty printing. Any program that depends on exact string matches for JSON output was written by an idiot anyway.