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.
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 centre CLI to find out window titles, sizes and screen positions.
The CLI will help you to accurately find your window title to set the exact position you want on the screen with your
desired size.
Examples:
# List all active window titles
centre -l
Refresh your config without restarting
You can use the predefined shortcut ctrl+alt+r to reload/refresh your config without restarting the background
process.
This is useful when trying to edit your config.
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": {
"refresh": "ctrl+alt+r",
"center": "ctrl+alt+d",
"minimize": "ctrl+alt+m"
}
},
"logging": false
}
You can change any predefined keyboard shortcut, for example setting refresh to ctrl+shift+f10.
Window presets should be placed inside the "presets" object in config.json.
A window preset should look like this:
{
"PS7": {
"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.
Your final config should look something like this:
{
"presets": {
"1920x1080": {
"PS7": {
"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": {
"refresh": "ctrl+alt+r",
"center": "ctrl+alt+d",
"minimize": "ctrl+alt+m"
}
},
"logging": false
}
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.1.0.tar.gz.
File metadata
- Download URL: centre-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c8bd46fe2ec865e32f5599f799eefcb66b09ece5d13bb9dcc79b6e2e2f45b38
|
|
| MD5 |
64253b9b28bfc0a808c193bcaa17542b
|
|
| BLAKE2b-256 |
9ccc67d708a37da871dd947b27070b2534b1f5fffef7fe5ead5c40cf6a8cd1e9
|
File details
Details for the file centre-0.1.0-py3-none-any.whl.
File metadata
- Download URL: centre-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 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 |
f6800d1976031971c2b4bca15f5d1023d6734e5b37d7fc7518be38b79fbb2105
|
|
| MD5 |
f48820d5f5a391aeb013b8730e8cc215
|
|
| BLAKE2b-256 |
4598bf91e9c98eee9d1ab58342e0d0078cb705bd0d603c549f088f542e54b103
|