Originally created by @gldtn on GitHub (Mar 29, 2023).
Can someone help/explain and maybe @LGUG2Z can add to the readme on how to launch komorebi at startup?
Yabai does it through brew services, does scoop have anything similar?
@LGUG2Z Thanks for creating this, been looking for something alike for years to run on my work computer 😄
Originally created by @gldtn on GitHub (Mar 29, 2023).
Can someone help/explain and maybe @LGUG2Z can add to the readme on how to launch komorebi at startup?
Yabai does it through brew services, does scoop have anything similar?
@LGUG2Z Thanks for creating this, been looking for something alike for years to run on my work computer 😄
My solution was to add an shortcut into my user startup folder which opens up PowerShell with the given start command
here is my code to generate the shortcut file with the start command and other parameters:
# create shortcuts in startup for komorebi and nircmd
# path to windows startup folder
$startupPath = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"
# scriptblock for creating a shortcut
$createLink = {
param($name,$sourceExe,$argumentsExe,$destination)
$WshShell = New-Object -comObject WScript.Shell
$shortcut = $WshShell.CreateShortcut("$destination\$name.lnk")
$shortcut.TargetPath = $sourceExe
$shortcut.Arguments = $argumentsExe
$shortcut.Save()
}
# init $list as arraylist
$list = [System.Collections.ArrayList]::new()
# add nircmd to list
[void]$list.Add(@{
name = 'nircmd'
sourceExe = (Get-Command nircmd).Path
argumentsExe = 'win trans class Shell_TrayWnd 255'
destination = $startupPath
})
# add komorebi to list
[void]$list.Add(@{
name = 'komorebi'
sourceExe = "powershell.exe"
argumentsExe = '-WindowStyle hidden -Command komorebic start --await-configuration'
destination = $startupPath
})
# create shortcut for every item in $list
foreach ($item in $list) {
if (!(Test-Path -Path "$startupPath\$($item.name).lnk")) {
& $createLink @item
} else {
$null = Remove-Item -Path "$startupPath\$($item.name).lnk"
& $createLink @item
}
}
then use the .config folder to add your configuration to komorebi,
its explained in the README / Install manual how to do so
@hanzsalat commented on GitHub (Apr 1, 2023):
My solution was to add an shortcut into my user startup folder which opens up PowerShell with the given start command
here is my code to generate the shortcut file with the start command and other parameters:
```
# create shortcuts in startup for komorebi and nircmd
# path to windows startup folder
$startupPath = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"
# scriptblock for creating a shortcut
$createLink = {
param($name,$sourceExe,$argumentsExe,$destination)
$WshShell = New-Object -comObject WScript.Shell
$shortcut = $WshShell.CreateShortcut("$destination\$name.lnk")
$shortcut.TargetPath = $sourceExe
$shortcut.Arguments = $argumentsExe
$shortcut.Save()
}
# init $list as arraylist
$list = [System.Collections.ArrayList]::new()
# add nircmd to list
[void]$list.Add(@{
name = 'nircmd'
sourceExe = (Get-Command nircmd).Path
argumentsExe = 'win trans class Shell_TrayWnd 255'
destination = $startupPath
})
# add komorebi to list
[void]$list.Add(@{
name = 'komorebi'
sourceExe = "powershell.exe"
argumentsExe = '-WindowStyle hidden -Command komorebic start --await-configuration'
destination = $startupPath
})
# create shortcut for every item in $list
foreach ($item in $list) {
if (!(Test-Path -Path "$startupPath\$($item.name).lnk")) {
& $createLink @item
} else {
$null = Remove-Item -Path "$startupPath\$($item.name).lnk"
& $createLink @item
}
}
```
then use the .config folder to add your configuration to komorebi,
its explained in the README / Install manual how to do so
@devkinetic commented on GitHub (Apr 10, 2023):
You can do the same thing in task scheduler

@omaru-ok If you can't edit settings, for example from a limited account, your best bet would be to just make a desktop shortcut.
@devkinetic commented on GitHub (May 7, 2023):
@omaru-ok If you can't edit settings, for example from a limited account, your best bet would be to just make a desktop shortcut.
i put a startup.bat in shell:startup folder with the following context: komorebic start --await-configuration
It works fine. I just can't run it completely silent yet.
@azinsharaf commented on GitHub (May 9, 2023):
i put a `startup.bat` in `shell:startup` folder with the following context:
`komorebic start --await-configuration`
It works fine. I just can't run it completely silent yet.
TBH I simply added this lines to beginning of my AutoHotkey configuration:
Stop()
Run, komorebic.exe start, , Hide
The Hide option makes it completely silent @azinsharaf.
The Stop() instruction handles AHK script reloads
And the shortcut to my AHK configuration I just put into shell:startup. Works like a charm.
Sidenote for anyone wondering what the heck does shell:startup means: If you press Windows+R then the Run window will popup. If you type in shell:startup and press enter it will open your autostart directory - any executable file placed there would run at Windows startup. Pic related:
Maybe some hints on how to run on startup could be placed in the readme or some docs to help others?
@marad commented on GitHub (May 13, 2023):
TBH I simply added this lines to beginning of my AutoHotkey configuration:
```
Stop()
Run, komorebic.exe start, , Hide
```
The `Hide` option makes it completely silent @azinsharaf.
The `Stop()` instruction handles AHK script reloads
And the shortcut to my AHK configuration I just put into `shell:startup`. Works like a charm.
Sidenote for anyone wondering what the heck does `shell:startup` means: If you press `Windows+R` then the `Run` window will popup. If you type in `shell:startup` and press enter it will open your autostart directory - any executable file placed there would run at Windows startup. Pic related:

Maybe some hints on how to run on startup could be placed in the readme or some docs to help others?
not sure why auto start is not working for me. If i double click on vbs file it works but it doesn't auto start (it is in shel:startup folder)
@azinsharaf commented on GitHub (May 17, 2023):
>
not sure why auto start is not working for me. If i double click on vbs file it works but it doesn't auto start (it is in shel:startup folder)
@QuinnCiccoretti commented on GitHub (May 23, 2023):
TBH I simply added this lines to beginning of my AutoHotkey configuration:
@marad
Are you referring to the komorebi.ahk? Or a different autohotkey configuration? Thanks.
@QuinnCiccoretti commented on GitHub (May 23, 2023):
> TBH I simply added this lines to beginning of my AutoHotkey configuration:
@marad
Are you referring to the komorebi.ahk? Or a different autohotkey configuration? Thanks.
Yes I have this in my hotkey configuration script at the top.
If you add Ahk code BEFORE first hotkey definition it will run at startup.
@marad commented on GitHub (Jul 13, 2023):
Yes I have this in my hotkey configuration script at the top.
If you add Ahk code BEFORE first hotkey definition it will run at startup.
v0.1.17 has been released which includes static configuration loading.
I would be interested to see feedback from you all about the reliability of autostarting when using the komorebic start --config your-config.json --whkd command.
@LGUG2Z commented on GitHub (Jul 15, 2023):
`v0.1.17` has been released which includes static configuration loading.
I would be interested to see feedback from you all about the reliability of autostarting when using the `komorebic start --config your-config.json --whkd` command.
@LGUG2Z commented on GitHub (Aug 9, 2023):
I have verified the following method as working on a W11 VM:
* Win + R to bring up the Run menu, then `shell:startup` to bring up the Startup folder in Explorer
* Right click in Explorer, File -> New -> Shortcut
* Set the location to `C:\Users\User\scoop\apps\komorebi\current\komorebic.exe start --config C:\Users\User\komorebi.json --whkd`
* Finish creating the shortcut
* Restart
* 🚀
I believe this is pretty much what @hanzsalat suggested in an earlier post.
I'll be closing this and related issues, and working towards commands that automate the creation of this shortcut file for autostarting komorebi on boot, based on espanso's approach (https://github.com/espanso/espanso/commit/64886ff436c9d0af4758a0cc6f04d991b8ad0134), which also uses the Startup folder shortcut method.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @gldtn on GitHub (Mar 29, 2023).
Can someone help/explain and maybe @LGUG2Z can add to the readme on how to launch komorebi at startup?
Yabai does it through brew services, does scoop have anything similar?
@LGUG2Z Thanks for creating this, been looking for something alike for years to run on my work computer 😄
@hanzsalat commented on GitHub (Apr 1, 2023):
My solution was to add an shortcut into my user startup folder which opens up PowerShell with the given start command
here is my code to generate the shortcut file with the start command and other parameters:
then use the .config folder to add your configuration to komorebi,
its explained in the README / Install manual how to do so
@devkinetic commented on GitHub (Apr 10, 2023):
You can do the same thing in task scheduler

@gldtn commented on GitHub (Apr 11, 2023):
Thanks for the reply guys.. got it to work 😁
@NormTurtle commented on GitHub (Apr 19, 2023):
any easy ? way
without tweaking system internal settings?
@devkinetic commented on GitHub (May 7, 2023):
@omaru-ok If you can't edit settings, for example from a limited account, your best bet would be to just make a desktop shortcut.
@NormTurtle commented on GitHub (May 7, 2023):
not that one @devkinetic i mean to say , can i put
*.ps1inshell:startup@azinsharaf commented on GitHub (May 9, 2023):
i put a
startup.batinshell:startupfolder with the following context:komorebic start --await-configurationIt works fine. I just can't run it completely silent yet.
@marad commented on GitHub (May 13, 2023):
TBH I simply added this lines to beginning of my AutoHotkey configuration:
The
Hideoption makes it completely silent @azinsharaf.The
Stop()instruction handles AHK script reloadsAnd the shortcut to my AHK configuration I just put into
shell:startup. Works like a charm.Sidenote for anyone wondering what the heck does

shell:startupmeans: If you pressWindows+Rthen theRunwindow will popup. If you type inshell:startupand press enter it will open your autostart directory - any executable file placed there would run at Windows startup. Pic related:Maybe some hints on how to run on startup could be placed in the readme or some docs to help others?
@azinsharaf commented on GitHub (May 17, 2023):
not sure why auto start is not working for me. If i double click on vbs file it works but it doesn't auto start (it is in shel:startup folder)
@QuinnCiccoretti commented on GitHub (May 23, 2023):
@marad
Are you referring to the komorebi.ahk? Or a different autohotkey configuration? Thanks.
@marad commented on GitHub (Jul 13, 2023):
Yes I have this in my hotkey configuration script at the top.
If you add Ahk code BEFORE first hotkey definition it will run at startup.
@LGUG2Z commented on GitHub (Jul 15, 2023):
v0.1.17has been released which includes static configuration loading.I would be interested to see feedback from you all about the reliability of autostarting when using the
komorebic start --config your-config.json --whkdcommand.@LGUG2Z commented on GitHub (Aug 9, 2023):
I have verified the following method as working on a W11 VM:
shell:startupto bring up the Startup folder in ExplorerC:\Users\User\scoop\apps\komorebi\current\komorebic.exe start --config C:\Users\User\komorebi.json --whkdI believe this is pretty much what @hanzsalat suggested in an earlier post.
I'll be closing this and related issues, and working towards commands that automate the creation of this shortcut file for autostarting komorebi on boot, based on espanso's approach (https://github.com/espanso/espanso/commit/64886ff436c9d0af4758a0cc6f04d991b8ad0134), which also uses the Startup folder shortcut method.