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.8.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for macos_display-1.1.8-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1516784243ca61ebaf6d37346ae27a20a92aac8995c0ef30af9e946926fedff |
|
MD5 | ea6a6ac01aa98bd427fa0452e44d021c |
|
BLAKE2b-256 | ea6526a2b99385d4074d72e1012af3bf385f1573368e50f4e56e84fa06605bcc |