No project description provided
Project description
PyMultiMonitor
This module can be used to interact with Windows Display. Currently, it supports:
- Getting and setting current display topology (i.e. CLONE, EXTERNAL, INTERNAL, EXTENDED)
- Getting display name
- Getting and setting current display brightness
Example
Getting current display topology
>>> from pymultimonitor.core.DisplayTopology import DisplayTopology
>>> from pymultimonitor.cinterface.constants import DisplayConfigTopology
>>> dt = DisplayTopology()
>>> dt.get_display_topology()
< DisplayConfigTopology.DISPLAYCONFIG_TOPOLOGY_EXTEND: 4 >
>>> dt.get_display_topology() == DisplayConfigTopology.DISPLAYCONFIG_TOPOLOGY_EXTEND
True
Setting display topology
>>> from pymultimonitor.core.DisplayTopology import DisplayTopology
>>> from pymultimonitor.cinterface.constants import DisplayConfigTopology
>>> dt = DisplayTopology()
>>> dt.set_topology_extend()
>>> dt.get_display_topology() == DisplayConfigTopology.DISPLAYCONFIG_TOPOLOGY_EXTEND
True
>>> dt.set_topology_external()
>>> dt.get_display_topology() == DisplayConfigTopology.DISPLAYCONFIG_TOPOLOGY_EXTERNAL
True
Getting current display device friendly name
>>> from pymultimonitor.core.DisplayInfo import DisplayInfo
>>> di = DisplayInfo()
>>> di.get_display_names()
{'\\\\.\\DISPLAY1': 'LG ULTRAWIDE'}
Getting and setting current display brightness for a particular monitor
>>> from pymultimonitor.core.DisplayMonitors import DisplayMonitors
>>> dm = DisplayMonitors()
>>> physical_monitors = dm.get_physical_monitor_handles()
>>> physical_monitors
[PhysicalMonitor(hPhysicalMonitor=1, szPhysicalMonitorDescription='Generic PnP Monitor')]
>>> from pymultimonitor.core.DisplayBrightness import DisplayBrightness
>>> db = DisplayBrightness()
>>> db.get_display_brightness_for_monitor(physical_monitors[0])
Brightness(minimum=0, current=20, maximum=100)
>>> db.set_display_brightness_for_monitor(physical_monitors[0], 50)
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
pymultimonitor-0.2.0.tar.gz
(19.2 kB
view details)
Built Distribution
File details
Details for the file pymultimonitor-0.2.0.tar.gz
.
File metadata
- Download URL: pymultimonitor-0.2.0.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.11.0-1020-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8babb95875c8260d490e0d3e8a3811f0d36eec0b8a36b66b2e6d91ce62f1583d |
|
MD5 | b12994aa41d9d2e349e727a1b6dfa03f |
|
BLAKE2b-256 | ac5620e8f33689517aa0a94ac76bebb59792c48ec4e529b3f3e241879a7602ff |
File details
Details for the file pymultimonitor-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pymultimonitor-0.2.0-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.11.0-1020-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd210271f26a6b97903bbe4c7467962b223e94131fee1c4f3a4f6d043bcad00 |
|
MD5 | be9169ff61073096b56d61efd1f19ab4 |
|
BLAKE2b-256 | 7572cc5e622772631f542a4500eaa2ea9f278a0cb7d7bebe615b2f5511edad72 |