Skip to main content

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.)

Metadata

Release files for ahk-wmutil 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ahk-wmutil 0.1.0
File Size Uploaded
ahk_wmutil-0.1.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ahk-wmutil 0.1.0
File Interpreter ABI Platform
ahk_wmutil-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / ahk_wmutil-0.1.0.tar.gz

Download URL ahk_wmutil-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2c8a7b631f9d73f2dae13c8c8a3e25eec3a71986f6a00bdd4cb961a171adb3bf
BLAKE2b-256 checksum
How to use checksums
6bc8f2d3a51d3c0b8bacfbbf67a592485ed22980596cc4be670624dec6b3f710
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / ahk_wmutil-0.1.0-py3-none-any.whl

Download URL ahk_wmutil-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27051adc081331697e6afb79bbbdd8272d1e737e45c900250522e05ec126bd97
BLAKE2b-256 checksum
How to use checksums
73f8bea4978951b05953c0c5cfe125f66ff602f26914d050183d4afd26f923f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page