Closed kylewlacy closed 3 months ago
Thanks a lot! I'll test this out in a moment.
Btw, I remember you talked earlier about scripting. You'll be glad to know that I plan to make some bindings for languages, e.g. Python, so it's fully scriptable. A great way to allow full customizability with scripts (instead of trying to parse a cli)
Looks great! Thank you for taking the time to do this, I appreciate it <3
This PR should close out the final pieces from https://github.com/MolotovCherry/virtual-display-rs/issues/48, namely these bullet points:
Basically, adding a monitor or mode now uses a compact string, so these are all valid commands:
add 1920x1080@60/90 3840x2160
add-mode 0 1920x1080@60/90 3840x2160
Removing modes uses the same string format, but there's one small difference: if you leave off the refresh rate, it removes all modes (not just
@60
)remove-mode 0 1920x1080@60
remove-mode 0 1920x1080
I also tweaked
add-mode
,remove
, andremove-mode
to support using a monitor's name instead of its ID. So, this series of commands should work:(Also, I really should've opened this PR earlier... I originally wrote all this code in December but forgot to submit it, sorry!)