Snap windows to their configured positions
Project description
window-snap
Installation:
pipx install window_snap
Configuring
By default, the program looks at %userprofile%\.config\window-snap\config.yaml.
The folder to look in for config.yaml is configurable with the WINDOW_SNAP_CONFIG_DIR environment variable.
Current Feature Set
This module currently supports the following:
- YAML-driven window layout management using a
windowsmapping inconfig.yaml. - Window matching by title (default) or executable name (
find_by_exe). - Moving windows to a target monitor (monitor index in config is 1-based).
- Leftmost monitor is 1, numbered increasing moving to the right
- absolute pixel values (integer [0,monitor-width]), or
- fractional values (0-1] relative to monitor work area.
- Maximize handling via
maximized: true. - Temporary on-top handling via
on_top: true. - Partial updates where unspecified values keep the window's current position/size.
- Multi-monitor awareness with monitor detection from window geometry.
- Safe handling when windows are missing or configuration entries are invalid (logs and continues).
Example config snippet:
windows:
chrome.exe:
find_by_exe: true
on_top: true
monitor: 2
left: 0
top: 0
width: 0.5
height: 1
on_top only puts the window on top at the moment during processing.
Command-line features:
-
window-snapapplies the configured layout from the default config path. -
Snapping is skipped when running inside a Windows Remote Desktop session.
window-snap --forceapplies the configured layout even during a Remote Desktop session. -
window-snap --store-currentcaptures current top-level window positions and writes:_config_versionwindows(captured destinations)available_exe_names(title -> executable mapping)
-
-v/--verboseincreases logging verbosity.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file window_snap-0.3.1.tar.gz.
File metadata
- Download URL: window_snap-0.3.1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88d0ef1e1b5010aab66d909d317d9eafe15a25a44a2d2a386b16c29125e53e77
|
|
| MD5 |
8d147e5953cba96565e1c1210a051894
|
|
| BLAKE2b-256 |
c9da971f4d510f99222db0b8eed944e5d0ae7e7b8c474755086ff744c5132e02
|
Provenance
The following attestation bundles were made for window_snap-0.3.1.tar.gz:
Publisher:
release.yml on mshafer1/py_window_snap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
window_snap-0.3.1.tar.gz -
Subject digest:
88d0ef1e1b5010aab66d909d317d9eafe15a25a44a2d2a386b16c29125e53e77 - Sigstore transparency entry: 1960898952
- Sigstore integration time:
-
Permalink:
mshafer1/py_window_snap@5e1219b83396e1b39d9afec77f73a54b123644fd -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/mshafer1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5e1219b83396e1b39d9afec77f73a54b123644fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file window_snap-0.3.1-py3-none-any.whl.
File metadata
- Download URL: window_snap-0.3.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0caaf0148086e64e3b88a1ed7692792e11be824e76cea79d48073044d4a1ea8d
|
|
| MD5 |
718704cf3ef61e36dd3d011141811186
|
|
| BLAKE2b-256 |
2d9d365bf443b91a8432717b8d6b593a0696d60590516b2d41f482a560d9e4f0
|
Provenance
The following attestation bundles were made for window_snap-0.3.1-py3-none-any.whl:
Publisher:
release.yml on mshafer1/py_window_snap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
window_snap-0.3.1-py3-none-any.whl -
Subject digest:
0caaf0148086e64e3b88a1ed7692792e11be824e76cea79d48073044d4a1ea8d - Sigstore transparency entry: 1960899085
- Sigstore integration time:
-
Permalink:
mshafer1/py_window_snap@5e1219b83396e1b39d9afec77f73a54b123644fd -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/mshafer1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5e1219b83396e1b39d9afec77f73a54b123644fd -
Trigger Event:
release
-
Statement type: