Crozzers / screen_brightness_control

A Python tool for controlling the brightness of your monitor
https://crozzers.github.io/screen_brightness_control
MIT License
50 stars 9 forks source link

How to control screen rotate with similar way? #15

Closed 123heihuhu closed 2 years ago

123heihuhu commented 2 years ago

I want design a hardware to achieve Screen Rotate. Its easy to make a hardware. But I dont know upper computer software. Your library was similar to what I think.

Crozzers commented 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])