Skip to main content

Retrieve information about macOS displays

Project description

Fetch information about macOS displays given a display ID, which is available from nsscreen.deviceDescription()["NSScreenNumber"] using pyobjc.

Get the user-visible display name from an id:

>>> import macos_display
>>> macos_display.display_name(69732928)
'Color LCD'

List all display names:

>>> from AppKit import NSScreen
>>> import macos_display
>>> screens = NSScreen.screens()
>>> for screen in screens:
...     screen_id = screen.deviceDescription()["NSScreenNumber"]
...     name = macos_display.display_name(screen_id)
...     print(name)
Color LCD

Project details

Download files

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

Source Distribution

macos_display-1.1.10.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distributions

macos_display-1.1.10-cp310-cp310-macosx_10_14_x86_64.whl (54.2 kB view hashes)

Uploaded CPython 3.10 macOS 10.14+ x86-64

macos_display-1.1.10-cp39-cp39-macosx_10_14_x86_64.whl (54.4 kB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

macos_display-1.1.10-cp38-cp38-macosx_10_14_x86_64.whl (54.2 kB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page