Closed 123heihuhu closed 2 years ago
There appears to already be a library to do that called rotate-screen
by Danny Burrows.
Here's a link to the PyPi page and heres a GeeksForGeeks article showing an example of how to use it.
The only issue is that it only supports Windows at the moment. If you want to rotate the screen using Linux then calling xrandr
via subprocess.check_output
is probably your best bet.
Something like subprocess.check_output(['xrandr', '--output', display_name, '--rotate', angle])
I want design a hardware to achieve Screen Rotate. It
s easy to make a hardware. But I don
t know upper computer software. Your library was similar to what I think.