Skip to main content

A Python AHK extension providing monitor functionality

Project description

ahk-wmutil

This is an extension package intended to be used with the Python ahk package. It adds functionality provided by the wmutil package into a convenient ahk extension.

Installation

pip install ahk-wmutil

Usage

from ahk import AHK
import wmutil
from ahk_wmutil import wmutil_extension

ahk = AHK(extensions=[wmutil_extension])

win = ahk.active_window

primary_monitor = wmutil.get_primary_monitor()

# move a window to a given monitor
win.move_to_monitor(primary_monitor)

# Get the monitor the window is using
mon = win.get_monitor() 
assert mon == primary_monitor # True

# Get the monitor that the mouse cursor is on
mon = ahk.monitor_from_mouse_position()

Possible future work:

  • A customized Monitor class that provides additional functionality, like listing all windows on a monitor
  • Easy positioning of windows within a monitor (e.g., split left/right, quadrants, etc.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ahk_wmutil-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

ahk_wmutil-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ahk_wmutil-0.1.0.tar.gz.

File metadata

  • Download URL: ahk_wmutil-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ahk_wmutil-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c8a7b631f9d73f2dae13c8c8a3e25eec3a71986f6a00bdd4cb961a171adb3bf
MD5 720aee7f50d4bc9a4b83b276d2533995
BLAKE2b-256 6bc8f2d3a51d3c0b8bacfbbf67a592485ed22980596cc4be670624dec6b3f710

See more details on using hashes here.

File details

Details for the file ahk_wmutil-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ahk_wmutil-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ahk_wmutil-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27051adc081331697e6afb79bbbdd8272d1e737e45c900250522e05ec126bd97
MD5 876dac831aa199aa57d091c6108780f6
BLAKE2b-256 73f8bea4978951b05953c0c5cfe125f66ff602f26914d050183d4afd26f923f6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page