Comments (3)
We could use screeninfo which supports Windows/OSX/Linux if additional requirements are obtained (PyOBJus for OSX and Xinerama for Linux)
from eurotruckautopilot.
Program arguments could be used for monitor number and resolution (i.ie -m 2 -r 1920
). This would be a lazy or simple approach to it. I don't know how much time I will have to help look into this but any resources for this should be placed here @zappybiby.
from eurotruckautopilot.
For someone with two monitors, using the code
from screeninfo import get_monitors
for m in get_monitors():
print(str(m))
will return
monitor(1920x1080+1920+0)
monitor(1920x1080+0+0)
Knowing this, we can return the number of monitors and monitor size with the following code:
from screeninfo import get_monitors
import re
for m in get_monitors():
x = (str(m))
print("number of monitors:", x.count("monitor"))
y = re.sub(r'monitor', '', x)
print(y)
which will return this on a computer with one monitor
number of monitors: 1
(1100x655+0+0)
Not sure how to get rid of parentheses and we would have to interpret this string somehow. Note that screeninfo does not comma separate different monitors but just puts each of them on a new line.
from eurotruckautopilot.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eurotruckautopilot.