Commit Graph

9 Commits

Author SHA1 Message Date
Daniel van Vugt
9a2c5d7d74 tools/get-state: Round refresh rates to three decimal places
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2465>
2022-08-19 15:28:56 +00:00
Jonas Ådahl
d692c9e0f5 tools/get-state: Use named arguments in print functions
Makes things a bit more readable not having to guess what the passed
numbers or booleans mean.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2448>
2022-07-28 09:04:45 +00:00
Marco Trevisan (Treviño)
d3b26a5914 get-state: Move printing functions into main MonitorConfig class
Data should then be parsed in proper structures that would be used for
both printing and changing them for re-configuring the screen

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