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
Release history Release notifications | RSS feed
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.5.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for macos_display-1.1.5-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64ebec92104d2c153488b2b1468c5395204cef70c0708dc3c6c76f58e783b909 |
|
MD5 | 2e548e7d1b2f381ac0edaae0838d53d2 |
|
BLAKE2b-256 | 175fbad7a542b57053663ba12b8bc84ea87898034e05062f2d815ea62da8e35a |