Currently, swww query outputs the data in this format:
OUTPUT: SIZE, scale: SCALE, currently displaying: IMAGE_OR_COLOR
When parsing this data with scripts to retrieve e.g. the current background image, this makes it pretty unintuitive to do:
swww query | awk '{print $8}'
I think a -j/--json option for this command, that would output the information as json structured data that can easily be parsed by jq would be nice to have.
Example output of swww query -j:
{
"output": "eDP-1",
"scale": "1",
"image": "background.png",
"color": ""
}
This way you could solve the same problem as above by using:
swww query -j | jq -r .image
Currently,
swww queryoutputs the data in this format:When parsing this data with scripts to retrieve e.g. the current background image, this makes it pretty unintuitive to do:
I think a
-j/--jsonoption for this command, that would output the information as json structured data that can easily be parsed byjqwould be nice to have.Example output of
swww query -j:{ "output": "eDP-1", "scale": "1", "image": "background.png", "color": "" }This way you could solve the same problem as above by using:
swww query -j | jq -r .image