KomorebiShellExtension is a Python-based tool that extends the functionality of the Komorebi tiling window manager by integrating rule management directly into the Windows context menu. This extension allows users to easily add or remove "Manage" and "Ignore" rules for applications without manually editing the komorebi.json
configuration file.
- Context Menu Integration: Adds "Manage with Komorebi" and "Don't manage with Komorebi" options to the Windows context menu for files.
- Dynamic Rule Management: Updates Komorebi's configuration file (
komorebi.json
) to include or exclude specified applications. - Automatic Restart: Restarts Komorebi to apply changes after rules are updated.
- Customizable Hotkey Handler: Reads settings from
settings.ini
to configure Komorebi's hotkey handler.
- Python 3.x
- Komorebi installed and configured
- Windows operating system
git clone https://github.com/Zira3l137/KomorebiShellExtension.git
cd KomorebiShellExtension
Create a settings.ini
file in the same directory as KomorebiRuleManager.py
with the following structure:
[settings]
hotkey_handler = "your-hotkey-handler"
use_bar = true
Replace your-hotkey-handler
with your Komorebi hotkey handler. It's usually either ahk
or whkd
.
Decide whether or not to use the Komorebi bar by setting use_bar
to true
or false
.
Note: This can be changed anytime.
Run the included PowerShell script to set up the context menu entries:
.\KomorebiShell.ps1
This script:
- Locates
KomorebiRuleManager.py
and Python. - Adds registry entries to integrate context menu options.
-
Right-Click a File: Navigate to any file in File Explorer, right-click, and choose:
- "Manage this file with Komorebi"
- "Don't manage this file with Komorebi"
-
Command Line Options: You can also run the script manually:
python KomorebiRuleManager.py <id> <kind> [--manage | --ignore]
<id>
: Application ID (e.g., exe name, window title, or class).<kind>
: Type of ID (exe
,title
, orclass
).--manage
: Add a manage rule.--ignore
: Add an ignore rule.
- The script parses
komorebi.json
to updatemanage_rules
orignore_rules
. - It removes conflicting rules to ensure consistency.
- Komorebi is stopped and restarted to apply the changes.
- Python Not Found: Ensure Python is installed and available in your system's PATH.
- Komorebi Configuration File Not Found: Verify that
komorebic config
returns the correct path tokomorebi.json
. - Permissions: Run the PowerShell script with administrator privileges if registry modifications fail.
Feel free to submit issues or pull requests to improve this project. Contributions are welcome!
- Komorebi for the tiling window manager.
- The Python and PowerShell communities for their tools and support.