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.4.tar.gz
(5.6 kB
view hashes)
Built Distributions
Close
Hashes for macos_display-1.1.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85236f1ffc3a063686c5575a246569ce756f26bf6666de0ddf74e8f2725115e4 |
|
MD5 | 4583ecf579b3cf9092db4155d406203b |
|
BLAKE2b-256 | 037b8ea3378778233046128b33bc161c940de5356aa9c339683c9a6a584fbbcd |
Close
Hashes for macos_display-1.1.4-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15dc8bd59dcc92986f682c7d4d52d918ca052139f571b3f79ad1dd1983a31988 |
|
MD5 | 14d07800f393c822df38e793f5d7d3d3 |
|
BLAKE2b-256 | 1613c0d00827a6c1b3284a0f902ed0c71229c276dcd76e79aecb179b64d45358 |