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.6.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for macos_display-1.1.6-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dcebfa00c6b299a524ba81704b0216e28c5a9cbd2e0d51b468ea9eb133bb188 |
|
MD5 | 2fefd44f740448bf193d808e74b6a923 |
|
BLAKE2b-256 | a119e4d8fd02074b96cc1bc29a8b8e152a47f4e887961c4e234878aec876a593 |