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
SAMSUNG
LCD1970NXp

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.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distributions

macos_display-1.1.1-cp38-cp38-macosx_10_14_x86_64.whl (5.9 kB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

macos_display-1.1.1-cp37-cp37m-macosx_10_13_x86_64.whl (5.8 kB view hashes)

Uploaded CPython 3.7m macOS 10.13+ 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