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 hashes)
Built Distribution
Close
Hashes for pymultimonitor-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd210271f26a6b97903bbe4c7467962b223e94131fee1c4f3a4f6d043bcad00 |
|
MD5 | be9169ff61073096b56d61efd1f19ab4 |
|
BLAKE2b-256 | 7572cc5e622772631f542a4500eaa2ea9f278a0cb7d7bebe615b2f5511edad72 |