mate-desktop / mate-control-center

Utilities to configure the MATE desktop
https://mate-desktop.org
GNU General Public License v2.0
68 stars 59 forks source link

[Feature request] mate-display-properties: Command line options for monitors.xml management #710

Open davidhedlund opened 1 year ago

davidhedlund commented 1 year ago

The source files for mate-display-properties are located in the mate-control-center/capplets/display directory of the MATE source code repository.

Expected behaviour

Generate monitors.xml

This is of highest importance.

variable_name="width"; variable_value="1920"; sed -i "s/$variable_name.*$variable_name/$variable_name>$variable_value<\/$variable_name/g" "$HOME/.config/monitors.xml"
variable_name="height"; variable_value="1080"; sed -i "s/$variable_name.*$variable_name/$variable_name>$variable_value<\/$variable_name/g" "$HOME/.config/monitors.xml"

Get data from monitors.xml

Google Bard:

"The mate-display-properties --get-xrandr-output-config option was introduced in Mate Display Properties 1.24. This version was released in April 2020.

The option was removed in Mate Display Properties 1.26, which was released in October 2021. This is because the mate-display-properties command was updated in this release to use a new backend that does not support this option.

Here is a script with xrandr that generates identical output of monitors.xml as mate-display-properties:

#!/bin/sh
output_config=$(mate-display-properties --get-xrandr-output-config)

for output in $output_config; do
xrandr --output output−−mode"(mate-display-properties --get-xrandr-mode output)"−−pos"(mate-display-properties --get-xrandr-pos output)"−−rotate"(mate-display-properties --get-xrandr-rotate $output)"
done

"

Actual behaviour

"$HOME/.config/monitors.xml" is generated

Steps to reproduce the behaviour

MATE general version

1.26.0

Package version

1.26.0

Linux Distribution

Ubuntu MATE 22.04

Link to bugreport of your Distribution (requirement)

Not applicable as this is a feature request.

davidhedlund commented 1 year ago
lukefromdc commented 1 year ago

Note that we are a small team and could always use more coders and testers. These feature requests tell us what people are interested in (something commercial software is known to resort to telemetry just to find out!) but to turn them into code requires effort that can range from trivial to a major rewrite. In this case, which of these it is would be determined by exactly what changed in xrandr. Feature removals in libraries maintained by others can be a real headache at times.

Obviously, more team members would speed all work up, as do the outside contributions we get and welcome.

davidhedlund commented 1 year ago

Note that we are a small team and could always use more coders and testers. These feature requests tell us what people are interested in (something commercial software is known to resort to telemetry just to find out!) but to turn them into code requires effort that can range from trivial to a major rewrite. In this case, which of these it is would be determined by exactly what changed in xrandr. Feature removals in libraries maintained by others can be a real headache at times.

Obviously, more team members would speed all work up, as do the outside contributions we get and welcome.

I might find someone who can help. Which source(s) file is responsible for mate-display-properties ?

lukefromdc commented 1 year ago

All of mate-control-center/capplets/display relates to it. in Makefile.am we list

mate_display_properties_SOURCES =   \
    xrandr-capplet.c        \
    scrollarea.c            \
    scrollarea.h

and we also build in gresources