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.7.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

macos_display-1.1.7-cp39-cp39-macosx_10_14_x86_64.whl (54.4 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

File details

Details for the file macos_display-1.1.7.tar.gz.

File metadata

  • Download URL: macos_display-1.1.7.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for macos_display-1.1.7.tar.gz
Algorithm Hash digest
SHA256 82378279864f0e67dbd766c982b978f34e7b4f98606320bf2902757a46916fdc
MD5 dec3e8f099da46883d3247a5a46f6967
BLAKE2b-256 638b5daa09f6929302543004305472782500cabf830645214e2f9d841d56c312

See more details on using hashes here.

File details

Details for the file macos_display-1.1.7-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: macos_display-1.1.7-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 54.4 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for macos_display-1.1.7-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 76c8e6d033fa1b79afcdad0ae2b7dc5b4cd4ee9ac9e73f2a19a2cae5cd70bc4e
MD5 b2873b24a84ccf917217ff1f4135f124
BLAKE2b-256 da38d501d30ee690413e1511e49c00b398e4fc4d6656d44ab203ee4336fbeb52

See more details on using hashes here.

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