centre is a tiny Windows tray app for one intentionally simple window-management gesture:
- Drag any normal desktop window.
- A configurable drop zone appears on the monitor under the pointer.
- Release inside the zone to resize the window to that area.
The usable area excludes the taskbar. The app works across monitors and uses Windows' native move/resize event hooks rather than continuously scanning every open window.
centre targets .NET 10 for Windows:
dotnet build .\centre\centre.csproj
dotnet run --project .\centre\centre.csprojbuild.ps1 produces a per-user Windows installer (no admin rights needed):
.\build.ps1 # or: .\build.ps1 -Version 1.2.3It generates the app icon, publishes a self-contained single-file exe, and compiles
installer\centre.iss with Inno Setup 6 into
artifacts\installer\centre-Setup-<version>.exe (plus a .sha256 checksum).
The script looks for dotnet.exe and ISCC.exe in a repo-local .tools\ folder first,
then in known sibling installs, then on PATH.
The installer puts the app in %LOCALAPPDATA%\Programs\centre, creates Start-menu
entries for the app and its uninstaller, and registers it in Apps & Features.
Uninstalling stops a running instance, then removes the program, its settings
(%LOCALAPPDATA%\centre), and the sign-in autostart entry.
Right-click the tray icon and choose Exit to stop it.
Double-click the tray icon, or right-click it and choose Settings, to change:
- Zone width and height. The zone is always centred on the active monitor.
- Overlay visibility and opacity.
- Whether Shift must be held while dragging.
- Whether centre starts when you sign in.
- Whether the preview zone stays visible while settings is open.
Use Preview zone to display the current zone for two seconds — or keep it on screen for as
long as settings is open by enabling the permanent-preview toggle. Use export / import
to copy your settings to another machine. Settings are stored in
%LOCALAPPDATA%\centre\settings.json.
- Interaction: one configurable zone, visible only while a window is being moved.
- Visuals: terminal-style theme — near-black surfaces, Cascadia Mono, amber accent;
the drop zone is a translucent amber rectangle with a
[ drop to center ]label. - Placement: defaults to 70% × 75% in the center of the current monitor's work area.
- Architecture: WPF overlay + Win32
SetWinEventHook+SetWindowPos. - Safety: no administrator rights, no window content access, and no background service.
- Multiple named layouts and edge zones.
- Remember a preferred zone per app.