Metadata-Version: 2.3
Name: window_snap
Version: 0.1.5
Summary: Snap windows to their configured positions
License: MIT
Author: Maker By Night
Author-email: 2565361+mshafer1@users.noreply.github.com
Requires-Python: >=3.11,<4
Classifier: Operating System :: Microsoft :: Windows
Requires-Dist: click (>=8.4.1,<9.0.0)
Requires-Dist: python-decouple (>=3.8,<4.0)
Requires-Dist: pywin32 (>=312,<313)
Requires-Dist: pyyaml (>=6.0.3,<7.0.0)
Requires-Dist: screeninfo (>=0.8.1,<0.9.0)
Description-Content-Type: text/markdown

# 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 `windows` mapping in `config.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`.
- 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).

Command-line features:

- `window-snap` applies the configured layout from the default config path.
- `window-snap --store-current` captures current top-level window positions and writes:
  - `_config_version`
  - `windows` (captured destinations)
  - `available_exe_names` (title -> executable mapping)
- `-v/--verbose` increases logging verbosity.

