Metadata-Version: 2.1
Name: macos_display
Version: 1.1.7
Summary: Retrieve information about macOS displays
Home-page: https://github.com/sixty-north/macos-display
Author: rob@sixty-north.com
Author-email: rob@sixty-north.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: zlib/libpng License
Description-Content-Type: text/x-rst
Provides-Extra: dev
License-File: LICENSE.rst

=============
macos_display
=============

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


