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.7.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
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 |