Commit Graph

6 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
3553af257e get-state: Use native Gio APIs to get the current config
Also provide multiple readers into a class that can be expanded to also
configure mutter.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2448>
2022-07-28 09:04:45 +00:00
Marco Trevisan (Treviño)
b02d746512 get-state: Do not require too-modern python version for match stanza
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2448>
2022-07-28 09:04:45 +00:00
Marco Trevisan (Treviño)
40509154fb get-state: Move code into __main__ functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2448>
2022-07-28 09:04:45 +00:00
Jonas Ådahl
8d8694fd08 tools/get-state: Add --short
Often, most of the output consists of a long list of exposed modes for
each monitor. If --short is passed, only pass modes that has properties.
In practice, this means "preferred" modes, "current" modes, and
similarly special cases, which significantly reduces noise.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2448>
2022-07-28 09:04:45 +00:00
Jonas Ådahl
e883046c5f tools/get-state: Change to use argparse
This will make adding more arguments easier.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2448>
2022-07-28 09:04:45 +00:00
Jonas Ådahl
8a4bec767b tools: Add tool for pretty printing DisplayConfig.GetCurrentState
It can pretty print either output from a `gdbus` call, from e.g. a bug
report, or invoke `gdbus` itself and get the state of the running
compositor.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2448>
2022-07-28 09:04:45 +00:00