Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.
/ swww Public archive
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

[Feature Request] Option to output swww query information as json #471

@BelimFaux

Description

@BelimFaux

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions