Skip to main content

screeninfo

Build

Fetch location and size of physical screens.

Supported environments

  • MS Windows
  • MS Windows: Cygwin
  • GNU/Linux: X11 (through Xinerama)
  • GNU/Linux: DRM (experimental)
  • OSX: (through AppKit)

I don't plan on testing OSX or other environments myself. For this reason, I strongly encourage pull requests.

Installation

pip install screeninfo

Usage

from screeninfo import get_monitors
for m in get_monitors():
    print(str(m))

Output:

Monitor(x=3840, y=0, width=3840, height=2160, width_mm=1420, height_mm=800, name='HDMI-0', is_primary=False)
Monitor(x=0, y=0, width=3840, height=2160, width_mm=708, height_mm=399, name='DP-0', is_primary=True)

Forcing environment

In some cases (emulating X server on Cygwin etc.) you might want to specify the driver directly. You can do so by passing extra parameter to get_monitors() like this:

from screeninfo import get_monitors, Enumerator
for m in get_monitors(Enumerator.OSX):
    print(str(m))

Available drivers: windows, cygwin, x11, osx.

Contributing

git clone https://github.com/rr-/screeninfo.git # clone this repo
cd screeninfo
poetry install # to install the local venv
poetry run pre-commit install # to setup pre-commit hooks
poetry shell # to enter the venv

This project uses poetry for packaging, install instructions at poetry#installation

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

screeninfo-0.8.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

screeninfo-0.8.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file screeninfo-0.8.1.tar.gz.

File metadata

  • Download URL: screeninfo-0.8.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.15-arch1-1

File hashes

Hashes for screeninfo-0.8.1.tar.gz
Algorithm Hash digest
SHA256 9983076bcc7e34402a1a9e4d7dabf3729411fd2abb3f3b4be7eba73519cd2ed1
MD5 d50a6278a42de0594c4abd078c146b74
BLAKE2b-256 ecbbe69e5e628d43f118e0af4fc063c20058faa8635c95a1296764acc8167e27

See more details on using hashes here.

File details

Details for the file screeninfo-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: screeninfo-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.15-arch1-1

File hashes

Hashes for screeninfo-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e97d6b173856edcfa3bd282f81deb528188aff14b11ec3e195584e7641be733c
MD5 7ce6d7c072b6270db27ba0648d6972ab
BLAKE2b-256 6ebfc5205d480307bef660e56544b9e3d7ff687da776abb30c9cb3f330887570

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 files

0.8

2 files

0.7

1 file

0.6.7

1 file

0.6.6

1 file

0.6.5

1 file

0.6.4

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6

1 file

0.5

1 file

0.4.2

1 file

0.4.1

1 file

0.4

1 file

0.3.1

1 file

0.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2

1 file

0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page