Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] mate-display-properties: A command line option to generate a default ~/.config/monitors.xml #711

Closed
davidhedlund opened this issue Jul 23, 2023 · 3 comments

Comments

@davidhedlund
Copy link

davidhedlund commented Jul 23, 2023

Expected behaviour

  • There is no command to generate a default "$HOME/.config/monitors.xml". A script cannot be written that manages mate-display-properties (the Apply button is not pre-selected for example).

  • Solution: mate-display-properties --make-monitors.xml to generate a default "$HOME/.config/monitors.xml" file. The screen resolution can then be modified (regardless of the values) via Bash:

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"
Notes

xrandr will temporarily change the screen resolution with: screen_resolution="1920x1080"; xrandr --output "$(xrandr --listactivemonitors | tail -1 | awk '{ print $NF }')" --mode "$screen_resolution" Also, it to ~/.bashrc to make it permanently will interfere with "$HOME/.config/monitors.xml" that is generated by mate-display-properties

Actual behaviour

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

Steps to reproduce the behaviour

  • Run mate-display-properties. Click on the Apply button

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.

@GrahamxReed
Copy link

GrahamxReed commented Jul 23, 2023

With the proposed solution, being able to fully automate a script to set up an ergonomic working environment finally seems like a no-brainer.

@davidhedlund
Copy link
Author

davidhedlund commented Jul 23, 2023

No need to open 2 reports, closing this one.

Sorry, these are two completely different issues as I rewrote the first one. This issue is to set the data, while #710 is used to get the data.

I merged this issue to a new "Set data in monitors.xml" section in #710

@raveit65 raveit65 reopened this Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants