Skip to content

dclnc/centre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

centre

centre is a tiny Windows tray app for one intentionally simple window-management gesture:

  1. Drag any normal desktop window.
  2. A configurable drop zone appears on the monitor under the pointer.
  3. 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.

Build and run

centre targets .NET 10 for Windows:

dotnet build .\centre\centre.csproj
dotnet run --project .\centre\centre.csproj

Installer

build.ps1 produces a per-user Windows installer (no admin rights needed):

.\build.ps1            # or: .\build.ps1 -Version 1.2.3

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

MVP design

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

Sensible next additions

  • Multiple named layouts and edge zones.
  • Remember a preferred zone per app.

About

centre is a tiny Windows tray app for one intentionally simple window-management gesture.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors