https://github.com/vahor/organizer-py
https://github.com/vahor/organizer-py
macos python yabai
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vahor/organizer-py
- Owner: Vahor
- Created: 2024-12-02T11:30:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-16T19:13:43.000Z (5 months ago)
- Last Synced: 2026-02-17T01:28:59.246Z (5 months ago)
- Topics: macos, python, yabai
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Organizer
Organizer is a Python tool to focus your windows with keyboard shortcuts on macOS.
**Example:** Open Firefox by pressing `ctrl+1`, discord by pressing `ctrl+2`, etc, and go back to the previous window by pressing `page_down`.

## Requirements
- Python 3.10+
- Yabai: https://github.com/koekeishiya/yabai
- Poetry: https://python-poetry.org/docs/ _(optional, you can use `pip` instead and install the dependencies manually)_
## How to use
1. Clone the repository
2. `uv pip install -r requirements.txt`
3. `source .venv/bin/activate`
4. `python src/app.py`
5. Configure the shortcuts in `config.toml`
## Configuration
Edit the `config.toml` file to configure the shortcuts.
```toml title="config.toml"
[shortcut]
next = "+1"
prev = "+2"
1 = "+1"
2 = "+2"
3 = "+3"
4 = "+4"
5 = "+5"
6 = "+6"
7 = "+7"
8 = "+8"
9 = "+9"
[organizer.1]
app_name = "firefox"
title = "vahor"
[organizer.2]
app_name = "discord"
[organizer.3]
title = "spotify"
```
Here's a description of the configuration options:
| Block | Field | Description |
| --- | --- | --- |
| `shortcut` | next | The keyboard shortcut to switch to the next window. |
| `shortcut` | prev | The keyboard shortcut to switch to the previous window. |
| `shortcut` | `[number]` | The keyboard shortcut to switch to the specified window. |
| `organizer.[number]` | app_name? | The name of the application. |
| `organizer.[number]` | title? | The title of the window. |
The tool will search open windows for the specified application and title, and switch to the first one it finds.\
`app_name` and `title` are optional, and can be used to narrow down the search.\
`number` is the order in which the windows will be switched, should be unique.
You can find a full list of keyboard shortcuts [here](https://pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key).