Komorebi should open on startup #102

Closed
opened 2026-01-05 14:48:20 +01:00 by adam · 3 comments
Owner

Originally created by @johnnaaron on GitHub (Jun 26, 2022).

Since Komorebic doesn't have an associated startup service and Komorebi.exe does not start Komorebic upon execution, there isn't a great way to enable dynamic tiling on startup like Yabai does (brew service).

Current solutions appear to involve running Powershell scripts (disabled by default) via a startup .cmd, or via task scheduler. My current setup doesn't actually start correctly through scripting though, but it does show Start-Process komorebi -WindowStyle hidden as expected.

~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\komorebic-start.cmd
--> powerShell -windowstyle hidden "C:\Users\Aaron\komorebic-start.ps1"

C:\Users\Aaron\komorebic-start.ps1
--> komorebic start

What solution do you all use?

Originally created by @johnnaaron on GitHub (Jun 26, 2022). Since Komorebic doesn't have an associated startup service and Komorebi.exe does not start Komorebic upon execution, there isn't a great way to enable dynamic tiling on startup like Yabai does (brew service). Current solutions appear to involve running Powershell scripts (disabled by default) via a startup .cmd, or via task scheduler. My current setup doesn't actually start correctly through scripting though, but it does show `Start-Process komorebi -WindowStyle hidden` as expected. ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\komorebic-start.cmd --> `powerShell -windowstyle hidden "C:\Users\Aaron\komorebic-start.ps1"` C:\Users\Aaron\komorebic-start.ps1 --> `komorebic start` What solution do you all use?
adam closed this issue 2026-01-05 14:48:20 +01:00
Author
Owner

@calendulish commented on GitHub (Jun 27, 2022):

I'm using a .bat script and nircmd, like that:

@echo off
title startup script
nircmd win hide title "startup script"
komorebic start

:: "komorebic start" currently is not waiting for everything be ready before return, so the
:: following lines prevent running commands bellow on startup before komorebi is ready to accept them
:wait_komorebi
komorebic state >nul 2>&1 || goto wait_komorebi

...
<your config, rules, etc>
e.g:
komorebic watch-configuration disable
komorebic invisible-borders 7 0 14 7
komorebic float-rule class WixStdBA
komorebic float-rule class MsiDialogCloseClass
...

:: optional, if you want to keep this script running for some reason
:: e.g.: I use this to auto restart my startup script if komorebi exit
nircmd waitprocess komorebi.exe

you can put it on startup folder or as a task on task scheduler

@calendulish commented on GitHub (Jun 27, 2022): I'm using a .bat script and [nircmd](https://www.nirsoft.net/utils/nircmd.html), like that: ``` @echo off title startup script nircmd win hide title "startup script" komorebic start :: "komorebic start" currently is not waiting for everything be ready before return, so the :: following lines prevent running commands bellow on startup before komorebi is ready to accept them :wait_komorebi komorebic state >nul 2>&1 || goto wait_komorebi ... <your config, rules, etc> e.g: komorebic watch-configuration disable komorebic invisible-borders 7 0 14 7 komorebic float-rule class WixStdBA komorebic float-rule class MsiDialogCloseClass ... :: optional, if you want to keep this script running for some reason :: e.g.: I use this to auto restart my startup script if komorebi exit nircmd waitprocess komorebi.exe ``` you can put it on startup folder or as a task on task scheduler
Author
Owner

@tsingakbar commented on GitHub (Nov 17, 2022):

I setup the autohotkey script following thre README, insert these code at the beginning to launch komorebi and wait it until ready.
Then generate a symbolic link to this script, place it to windows's start folder.
Hope this helps.

Process, Exist, komorebi.exe
If ErrorLevel = 0
    RunWait, komorebic.exe start, , Hide

Loop
{
    RunWait, komorebic.exe state, , Hide UseErrorLevel
    If ErrorLevel = 0
    {
        Break
    }
    Else
    {
        Sleep 1000
    }
}
@tsingakbar commented on GitHub (Nov 17, 2022): I setup the autohotkey script following thre README, insert these code at the beginning to launch komorebi and wait it until ready. Then generate a symbolic link to this script, place it to windows's start folder. Hope this helps. ```autohotkey Process, Exist, komorebi.exe If ErrorLevel = 0 RunWait, komorebic.exe start, , Hide Loop { RunWait, komorebic.exe state, , Hide UseErrorLevel If ErrorLevel = 0 { Break } Else { Sleep 1000 } } ```
Author
Owner

@rickywu commented on GitHub (Jan 17, 2024):

Autohotkey v2:
RunWait('komorebic.exe start -c komorebi.json --whkd', , "Hide")

@rickywu commented on GitHub (Jan 17, 2024): Autohotkey v2: RunWait('komorebic.exe start -c komorebi.json --whkd', , "Hide")
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#102