Your Window Position Manager
Project description
Centre
Centre is your window position manager.
Take control of your windows by choosing where they appear, how they’re arranged, and what size they should be.
Consistency is centre's goal.
Preview
https://github.com/user-attachments/assets/d088a951-8c6b-4731-8228-80b063f1a6e5
What Centre Tries to Achieve
Centre was built for users who want consistent window placement across desktop sessions.
Install
pip install centre
Start Centre Automatically
To do that, create a Windows Task Scheduler task.
Run the following command as Administrator in PowerShell/cmd to create a Task in Windows Task Scheduler.
schtasks /Create /TN "centre" /SC ONLOGON /TR "centre -s" /RL LIMITED /F
Usage
After your window configuration is ready, start the listener:
centre -s
The CLI
You can use the centre CLI to inspect open windows and read the active
configuration.
Examples:
# List active windows, including their titles, sizes, and positions
centre -l
# Print the loaded configuration
centre -c
Automatic Configuration Reload
While Centre is running, it watches config.json for changes. Saving the file
causes Centre to read the configuration again without restarting the process.
Window Configuration (config.json)
Your config will be created at the first startup in:
CMD
%USERPROFILE%\.centre\config.json
PowerShell
$env:USERPROFILE\.centre\config.json
The default config includes these values:
- The resolution key is based on your display resolution.
{
"presets": {
"1920x1080": {}
},
"predefined_keybindings": {
"enabled": true,
"bindings": {
"center": "ctrl+alt+d",
"minimize": "ctrl+alt+m",
"capture": "ctrl+alt+p",
"ignore_preset": "ctrl+alt+i"
}
},
"logging": false,
"ignored_presets": []
}
You can change any predefined keyboard shortcut in the bindings object.
Window presets should be placed inside the "presets" object in config.json.
Capture a Window
Focus the window you want to capture and press ctrl+alt+p. Centre stores its
current position and size under the current display resolution.
Captured windows are identified by their executable name without the .exe
extension. The name is normalized to uppercase, for example:
notepad++.exebecomesNOTEPAD++WindowsTerminal.exebecomesWINDOWSTERMINAL
Executable names remain stable when an application changes its window title, such as when switching tabs in Notepad++.
Capturing the same application again updates its existing preset.
Ignore a Window Preset
Focus the window you want Centre to ignore and press ctrl+alt+i. Centre adds
the active application's executable name to ignored_presets.
Ignored applications are skipped when you press the center shortcut. Centre will
not apply the application's custom preset or Default_Position.
To allow Centre to manage the application again, remove its executable name from
ignored_presets in config.json.
A window preset should look like this:
{
"NOTEPAD++": {
"LEFT": 224,
"TOP": 168,
"SIZE_X": 1473,
"SIZE_Y": 697
},
"Default_Position": {
"LEFT": 25,
"TOP": 34,
"SIZE_X": 1860,
"SIZE_Y": 980
}
}
-
Be sure to add
Default_Positionin your presets under the generated default resolution. When Centre does not find the active window in your presets, it usesDefault_Positionas the fallback size and position. -
Default_Positionis useful when you have a list of apps that you have set a custom position for, but intend to keep all other apps in one specific location.
Default Shortcuts
| Action | Shortcut | Description |
|---|---|---|
| Center | ctrl+alt+d |
Apply the active application's preset or Default_Position. |
| Minimize | ctrl+alt+m |
Minimize the active window. |
| Capture | ctrl+alt+p |
Save or update the active application's position and size. |
| Ignore | ctrl+alt+i |
Add the active application to ignored_presets. |
Your final config should look something like this:
{
"presets": {
"1920x1080": {
"WINDOWSTERMINAL": {
"LEFT": 224,
"TOP": 168,
"SIZE_X": 1473,
"SIZE_Y": 697
},
"Default_Position": {
"LEFT": 25,
"TOP": 34,
"SIZE_X": 1860,
"SIZE_Y": 980
}
}
},
"predefined_keybindings": {
"enabled": true,
"bindings": {
"center": "ctrl+alt+d",
"minimize": "ctrl+alt+m",
"capture": "ctrl+alt+p",
"ignore_preset": "ctrl+alt+i"
}
},
"logging": false,
"ignored_presets": [
"NOTEPAD++"
]
}
Caveats
Some windows may overlap even when they use the same configured position and size.
This is due to some apps having a bigger actual window than the rendered UI.
License
This project is licensed under the MIT License. See LICENSE for details.
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 centre-0.3.0.tar.gz.
File metadata
- Download URL: centre-0.3.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9192de0eb46fd5e9fd06e8bc94688f2489aab36a4486d9ef22ff406cf63deda
|
|
| MD5 |
13a0fd5c92147d050afd49e42f88b295
|
|
| BLAKE2b-256 |
04a81556eb6817eb0fd529d35d646cfb944681aa407aa73689439c0d3de0f1f8
|
File details
Details for the file centre-0.3.0-py3-none-any.whl.
File metadata
- Download URL: centre-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3fcb7cccc649523efd9afe69b68720840dbbaf7bc07cc7f677c34b6ddf0330c
|
|
| MD5 |
7b59ea477a0121df1db0150742ef2691
|
|
| BLAKE2b-256 |
b37c4771e800d6b8bf9dbb60380f34d49f71adb99b345a1b3bb176b86b371b24
|