Wasn't there a way to auto-convert xrandr output to a xrandr command?

The cats in my ADHD insist I saw on the web somewhere that there was a flag for xrandr that automatically printed the current screen configuration as what the xrandr command string would look like to create that same configuration. I suspect it might have been for another X command like xinput or xsetwacom or something, as I can’t find any flag in man xrandr that does precisely that…But is there an extra script or package that does in fact convert the current screen configuration into an xrandr script?

Please edit the post title.

I’m not sure if there is a utility to do that exactly, but if you want to be able to save and switch profiles, you can use autorandr or ARandR.

Fixed title (using “How do I do this” felt like I was asking for help with a problem that affected I and noone else…)

Well, it’s just an example. How does one…? could be used instead of How do I…? Thanks for updating it.

The whole point is to prompt a question to those that might have an answer. :wink:

You mean cvt?

As you didn’t provide any xrandr output from your machine, here’s one from mine:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-4 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080     60.02*+

So if I want to add 1280x720, I execute:

cvt 1280 720 60

and then get:

# 1280x720 59.86 Hz (CVT 0.92M9) hsync: 44.77 kHz; pclk: 74.50 MHz
Modeline "1280x720_60.00"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync

Is that what you mean?


No, but arandr indirectly helped figure out what the right flags were to use. And big data and stalkers don’t need any more help in identifiying me by the accounts I use thanks to my sharing the same info like my xrandr output…But I don’t see how sharing that info would be relevant to my line of questioning anyway. Since what I’m wanting is to take everything xrandr outputs and covert it via xrandr or pipe to xrandr --output blah --mode/pos/size/scale/etc bleh...

arandr figured out most of it except for the --scale parts, which I still had to manually type into the xrandr command string…