alex-courtis / xlayoutdisplay

Detects and arranges linux display outputs, using XRandR for detection and xrandr for arrangement.
Apache License 2.0
178 stars 15 forks source link

add feature to limit refresh rate #9

Closed fpaskali closed 3 years ago

fpaskali commented 4 years ago

Added a feature to override refresh rate of all outputs. I hope the implementation is good enough. Feedback is welcome.

fpaskali commented 3 years ago

The test-xrandrutil.cpp is modified and the test is passing now.

alex-courtis commented 3 years ago

Many thanks for your contribution and your patience @fpaskali

Releasing as 1.3.0 to AUR now.

fpaskali commented 3 years ago

Sorry I forgot to update the readme file with the new parameter. Could you do that or I should?

alex-courtis commented 3 years ago

Sorry I forgot to update the readme file with the new parameter. Could you do that or I should?

I don't mind updating master for that; easier than making a PR etc.

Please reply with your changes.

fpaskali commented 3 years ago
Arranges outputs in a left to right manner, using highest resolution and refresh.
DPI is calculated based on the first or primary output's EDID information and rounded to the nearest 12.
Laptop outputs are turned off when the lid is closed.

e.g.  xlayoutdisplay -p DP-4 -o HDMI-0 -o DP-4

CLI:
  -h [ --help ]          print this help text and exit
  -i [ --info ]          print information about current outputs and exit
  -n [ --noop ]          perform a trial run and exit
  -v [ --version ]       print version string

CLI, $XDG_CONFIG_HOME/.xlayoutdisplay, $HOME/.xlayoutdisplay and /etc/xlayoutdisplay:
  -d [ --dpi ] arg       DPI override
  -r [ --rate ] arg      Refresh rate override
  -m [ --mirror ]        mirror outputs using the lowest common resolution
  -o [ --order ] arg     order of outputs, repeat as needed
  -p [ --primary ] arg   primary output
  -q [ --quiet ]         suppress feedback
alex-courtis commented 3 years ago

Thanks for adding $XDG_CONFIG_HOME/.xlayoutdisplay

Updated readme on master.