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.

Files for macos-display, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size macos_display-1.1.1-cp37-cp37m-macosx_10_13_x86_64.whl (5.8 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size macos_display-1.1.1-cp38-cp38-macosx_10_14_x86_64.whl (5.9 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size macos_display-1.1.1.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page