Add Komorebi and wkhd to windows startup #278

Closed
opened 2026-01-05 14:49:26 +01:00 by adam · 4 comments
Owner

Originally created by @Louis047 on GitHub (Jan 9, 2024).

Its kinda annoying to type the command everytime Windows starts manually, its better if we automated it by enabling startup support for both :) which will be convenient for many users who are new to this.

Originally created by @Louis047 on GitHub (Jan 9, 2024). Its kinda annoying to type the command everytime Windows starts manually, its better if we automated it by enabling startup support for both :) which will be convenient for many users who are new to this.
adam added the enhancement label 2026-01-05 14:49:26 +01:00
adam closed this issue 2026-01-05 14:49:26 +01:00
Author
Owner

@wiki-Bird commented on GitHub (Jan 10, 2024):

I got around this by adding some powershell scripts to run on startup. Specially, add startup.cmd to C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup with the contents:

PowerShell -Command "Set-ExecutionPolicy Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1
PowerShell %USERPROFILE%\.config\startup\launch_komorebi.ps1 >> "%TEMP%\StartupLog.txt" 2>&1C

:: PowerShell %USERPROFILE%\.config\startup\launch_yasb.ps1 >> "%TEMP%\StartupLog.txt" 2>&1C & :: ONLY NEEDED FOR YASB

Then, in the filepath referenced in startup.cmd, (%USERPROFILE%\.config\startup\launch_komorebi.ps1 in my case), create a launch_komorebi.ps1 file:

komorebic start -c $Env:KOMOREBI_CONFIG_HOME\komorebi.json --whkd

You might need to alter the file paths slightly from what I have, but this works for me; it'll open a powershell window on startup and run the commands :)


You can also run YASB with the same method (if you use it on top of komorebi) by using the commented out command in startup.cmd and putting your startup command in a launch_yasb.ps1 file.

@wiki-Bird commented on GitHub (Jan 10, 2024): I got around this by adding some [powershell scripts to run on startup](https://stackoverflow.com/a/32189430). Specially, add `startup.cmd` to `C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup` with the contents: ```cmd PowerShell -Command "Set-ExecutionPolicy Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1 PowerShell %USERPROFILE%\.config\startup\launch_komorebi.ps1 >> "%TEMP%\StartupLog.txt" 2>&1C :: PowerShell %USERPROFILE%\.config\startup\launch_yasb.ps1 >> "%TEMP%\StartupLog.txt" 2>&1C & :: ONLY NEEDED FOR YASB ``` Then, in the filepath referenced in `startup.cmd`, (`%USERPROFILE%\.config\startup\launch_komorebi.ps1` in my case), create a `launch_komorebi.ps1` file: ```ps1 komorebic start -c $Env:KOMOREBI_CONFIG_HOME\komorebi.json --whkd ``` You might need to alter the file paths slightly from what I have, but this works for me; it'll open a powershell window on startup and run the commands :) --- You can also run [YASB](https://github.com/da-rth/yasb) with the same method (if you use it on top of komorebi) by using the commented out command in `startup.cmd` and putting your startup command in a `launch_yasb.ps1` file.
Author
Owner

@LGUG2Z commented on GitHub (Jan 10, 2024):

There is a komorebic enable-autostart command for this task, which I just recently fixed an unfortunate typo bug for: f3e41490b2

You can still run this command and make sure that you add a space between "start" and "config" in the generated lnk file in shell:startup (right click and "Properties" to edit).

@LGUG2Z commented on GitHub (Jan 10, 2024): There is a `komorebic enable-autostart` command for this task, which I just recently fixed an unfortunate typo bug for: https://github.com/LGUG2Z/komorebi/commit/f3e41490b25cb73437ec5ce05c1822f6e2fe8224 You can still run this command and make sure that you add a space between "start" and "config" in the generated `lnk` file in `shell:startup` (right click and "Properties" to edit).
Author
Owner

@Louis047 commented on GitHub (Jan 15, 2024):

@LGUG2Z @wiki-Bird Thanks for the suggestions :)
I tried creating a powershell script using the start command for komorebi and wkhd and added it to shell:startup but failed miserably.

Will try your suggestions later tomorrow 👍

Update: Tried all the steps provided but still doesn't seem to work and I don't see any powershell running after windows startup
I have created a new startup directory inside .config and created the powershell script. If there are any alternative methods, please do let me know.

Another Update: Just found out the command @wiki-Bird provided was directed to a different environment KOMOREBI_CONFIG_HOME whereas mine was located in USERPROFILE which is the default one.

@Louis047 commented on GitHub (Jan 15, 2024): @LGUG2Z @wiki-Bird Thanks for the suggestions :) I tried creating a powershell script using the start command for komorebi and wkhd and added it to ``shell:startup`` but failed miserably. Will try your suggestions later tomorrow :+1: Update: Tried all the steps provided but still doesn't seem to work and I don't see any powershell running after windows startup I have created a new startup directory inside `.config` and created the powershell script. If there are any alternative methods, please do let me know. Another Update: Just found out the command @wiki-Bird provided was directed to a different environment ``KOMOREBI_CONFIG_HOME`` whereas mine was located in ``USERPROFILE`` which is the default one.
Author
Owner

@Louis047 commented on GitHub (Jan 15, 2024):

It's working now , so I'll close the issue.

Thanks a lot for showing up and help to fix it :)

Once again, Thank you for referring to another project YASB which I was searching for since my obsession with linux started 😄

@Louis047 commented on GitHub (Jan 15, 2024): It's working now , so I'll close the issue. Thanks a lot for showing up and help to fix it :) Once again, Thank you for referring to another project YASB which I was searching for since my obsession with linux started 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#278