VEIL Window Manager
VEIL Window Manager (VWM) is a dynamic window management addon for the VEIL platform. It provides automatic BSP tiling, floating, and stacking layouts for Windows — written in Rust with native Win32 API integration.
VWM hooks into Windows accessibility event hooks to react to window events in real time, debounces retile operations for performance, and exposes a YAML config that is watched for changes and hot-reloaded without restarting.
Installation
VWM ships as a VEIL addon. Place the addon folder in your VEIL addons directory and VEIL will discover and launch it automatically.
Addon directory structure
~/ProjectOpen/VEIL/addons/windowmanager/ ├── addon.json # Addon manifest ├── bin/ │ └── veil-windowmanager.exe └── config.yaml # Your configuration
addon.json
The manifest tells VEIL how to load the addon:
{
"id": "veil.addon.windowmanager",
"name": "Window Manager",
"package": "windowmanager",
"exe_path": "bin/veil-windowmanager.exe",
"version": "1.0.0",
"repo": "https://github.com/TheIco2/VWM"
}
Quick Start
Create a minimal config.yaml to get tiling running immediately:
window_manager: enabled: true manager_type: tiling monitor_index: - "*"
Save the file. VWM will detect the change and retile open windows within the configured debounce window.
Config Reference
The full schema for config.yaml:
update_check: true debug: false log_level: warn # trace | debug | info | warn | error universal: exclude_processes: - "ShellExperienceHost.exe" - "taskmgr.exe" - "systemsettings.exe" - "steamwebhelper.exe" - "msiexec.exe" window_manager: enabled: true manager_type: tiling # tiling | floating | stacking monitor_index: - "*" # "*" = all, or "0", "1", etc. animation: enabled: true duration: 150 # ms styling: gap: space: 10 # pixels behavior: "Shared" # Shared | PerWindow events: debounce_ms: 500 filters: min_width: 1 min_height: 1 include_processes: [] exclude_processes: [] exclude_classes: - "Shell_TrayWnd" - "Progman" - "WorkerW" - "Windows.UI.Core" - "ApplicationFrameWindow" exclude_titles: - "Program Manager" - "NVIDIA GeForce Overlay" - "Task Manager" - "Settings"
Universal Filters
The universal block applies exclusions across all VEIL addons, not just the
window manager. Processes listed here are always ignored regardless of addon-level config.
exclude_processes
A list of process executable names to exclude globally. Matching is case-insensitive and exact.
universal: exclude_processes: - "taskmgr.exe" - "systemsettings.exe" - "msiexec.exe"
Window Filters
The filters block under window_manager provides fine-grained
control over which windows VWM manages.
Dimension filters
min_width and min_height define the minimum size a window must have to be managed. Useful for ignoring small utility popups.
Process filters
include_processes — if non-empty, only these processes are managed.
exclude_processes — these processes are always skipped.
include_processes takes priority. If it has entries, all
processes not on the list are excluded even if not in exclude_processes.
Class filters
exclude_classes matches against the Win32 window class name using a substring check. Useful for excluding system shell windows.
Title filters
exclude_titles matches against the window title using a substring check (case-insensitive).
Automatic exclusions
VWM automatically skips windows that are:
- Hidden or minimized
- Cloaked (virtual desktop hidden)
- Tooltips or popup menus
- Borderless / captionless windows
- True fullscreen applications
Animations
VWM smoothly moves windows to their new positions after a retile. The animation block controls this behaviour.
| Key | Type | Default | Description |
|---|---|---|---|
| enabled | bool | true | Toggle all animations on/off |
| duration | integer | 150 | Animation duration in milliseconds |
animation: enabled: true duration: 80
Styling & Gaps
Configure the pixel gap between managed windows and how it is distributed.
| Key | Type | Default | Description |
|---|---|---|---|
| gap.space | integer | 10 | Gap size in pixels |
| gap.behavior | string | Shared | Shared — gap is split between borders. PerWindow — each window gets the full gap on each side. |
Events
VWM listens to Windows accessibility events and retiles whenever windows are opened, closed, moved, or resized. To avoid thrashing during rapid changes, retile operations are debounced.
| Key | Type | Default | Description |
|---|---|---|---|
| debounce_ms | integer | 500 | Milliseconds to wait after the last event before triggering a retile |
BSP Tiling Layout
Set manager_type: tiling to enable the binary space partitioning layout.
Each new window splits the screen (or the focused tile) in half, creating a balanced tree.
How BSP works
- The first window occupies the full work area.
- The second window splits the first tile horizontally or vertically.
- Each subsequent window splits the currently focused tile.
- When a window is closed, its sibling expands to fill the space.
Drag-to-reorder
Drag a window over another managed window to swap their positions in the BSP tree. The layout is updated immediately after the drag is released.
Edge-drag resizing
Grab any window edge and drag to resize. VWM intercepts the resize event and adjusts the BSP split point so that both the dragged window and its sibling resize together, keeping the tree intact.
Floating Layout
Set manager_type: floating to disable automatic tiling. Windows retain
their natural positions and VWM does not move them.
Filters, universal exclusions, and IPC communication remain active in floating mode — only the automatic positioning is disabled.
Stacking Layout
Set manager_type: stacking to stack all managed windows on top of each
other, each filling the full work area. Only the top-most window is visible at a time.
This mode is useful for single-task focus sessions or when combined with IPC commands to programmatically cycle through windows.
Multi-Monitor Support
VWM maintains an independent BSP state for each managed monitor. Windows are assigned to monitors based on which monitor contains the majority of the window's area.
Targeting monitors
Use the monitor_index list to control which monitors VWM manages:
# All monitors monitor_index: - "*" # Only the primary monitor monitor_index: - "0" # Two specific monitors monitor_index: - "0" - "1"
Boundary detection
VWM uses smart boundary-aware edge detection to prevent windows from being dragged across monitor boundaries during edge-resize operations.
Architecture
VWM is structured as a set of focused modules:
main.rs ← IPC listener & event loop entry point bootstrap.rs ← Addon startup, config loading config.rs ← Config deserialization (serde + YAML) layout.rs ← Tiling / Floating / Stacking logic types.rs ← Core data structures (WindowState, Monitor...) display_provider ← Monitor enumeration & geometry ipc_connector ← VEIL IPC integration watchers.rs ← File-system config hot-reload (notify crate) logging.rs ← Structured log output window_events/ ← SetWinEventHook setup, cleanup, dispatch window_ops/ ← Window enumeration, BSP, positioning, resize
Event flow
- Windows fires an accessibility event (window created, moved, etc.).
window_events/event_manager.rsreceives and classifies the event.- A debounce timer resets; after
debounce_mselapses, a retile is triggered. window_ops/window_enumeration.rscollects all visible managed windows.layout.rscomputes the new positions via the active layout algorithm.window_ops/positioning.rscallsSetWindowPosfor each window.
IPC Integration
VWM connects to the VEIL IPC layer on startup. This enables other VEIL components and addons to send commands to the window manager at runtime — for example, to switch the active layout or request a retile.
Building from Source
VWM requires a stable Rust toolchain targeting x86_64-pc-windows-msvc.
# Install Rust (if needed) winget install Rustlang.Rustup # Clone the repo git clone https://github.com/TheIco2/VWM.git cd VWM # Release build cargo build --release # Output target/release/veil-windowmanager.exe
Debug build
cargo build # Outputs: target/debug/veil-windowmanager.exe # Set log_level: debug in config.yaml for verbose output