[BUG]: Default scoop workflow gives bad config #169

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

Originally created by @SRNissen on GitHub (Jan 12, 2023).

Describe the bug
Going through the default scoop installation flow for Komorebi and AHK gives an error in the AHK script

  • Microsoft Windows 10 Business
  • 10.0.19045 N/A Build 19045

To Reproduce

in powershell:

    winget install scoop
    Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
    Y
    irm get.scoop.sh | iex
    scoop bucket add extras
    scoop install komorebi
    scoop install autohotkey
    iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.sample.ahk -OutFile $Env:USERPROFILE\komorebi.ahk
    iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebic.lib.ahk -OutFile $Env:USERPROFILE\komorebic.lib.ahk
    iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.generated.ahk -OutFile $Env:USERPROFILE\komorebi.generated.ahk
    komorebiv start --await-configuration

Expected behavior

Not quite certain (I've never used komorebi before)

Actual behavior

A popup window appears:

komorebi.ahk

Error: Function calls require a space or "(". Use comma only between parameters.

Text: RunWait, komorebic.exe start %ffm% --await-configuration %await_configuration%-...
Line: 4
File: C:\Users\UserName\komorebic.lib.ahk

The script was not reloaded; the old version will remain in effect.

[Help] [Edit] [Reload] [ExitApp] [Abort]

Additional context
Add any other context about the problem here.

In particular, if you have any other AHK scripts or software running that handle any aspect of window management or manipulation

I don't believe so. I do have a UHK keyboard with some funky macros but I'm almost certain that cannot have any influence - it's all stored in the keyboard.

The contents of the first five lines of file komorebic.lib.ahk:

; Generated by komorebic.exe

Start(ffm, await_configuration, tcp_port) {
    RunWait, komorebic.exe start %ffm% --await-configuration %await_configuration% --tcp-port %tcp_port%, , Hide
}

The contents of the first six lines of file komorebi.ahk:

#SingleInstance Force

; You can generate a fresh version of this file with "komorebic ahk-library"
#Include %A_ScriptDir%\komorebic.lib.ahk
; https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations
#Include %A_ScriptDir%\komorebi.generated.ahk
Originally created by @SRNissen on GitHub (Jan 12, 2023). **Describe the bug** Going through the default scoop installation flow for Komorebi and AHK gives an error in the AHK script * Microsoft Windows 10 Business * 10.0.19045 N/A Build 19045 **To Reproduce** in powershell: ```PowerShell winget install scoop Set-ExecutionPolicy RemoteSigned -Scope CurrentUser Y irm get.scoop.sh | iex scoop bucket add extras scoop install komorebi scoop install autohotkey iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.sample.ahk -OutFile $Env:USERPROFILE\komorebi.ahk iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebic.lib.ahk -OutFile $Env:USERPROFILE\komorebic.lib.ahk iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.generated.ahk -OutFile $Env:USERPROFILE\komorebi.generated.ahk komorebiv start --await-configuration ``` **Expected behavior** Not quite certain (I've never used komorebi before) **Actual behavior** A popup window appears: komorebi.ahk Error: Function calls require a space or "(". Use comma only between parameters. Text: RunWait, komorebic.exe start %ffm% --await-configuration %await_configuration%-... Line: 4 File: C:\Users\UserName\komorebic.lib.ahk The script was not reloaded; the old version will remain in effect. [Help] [Edit] [Reload] [ExitApp] [Abort] **Additional context** *Add any other context about the problem here.* *In particular, if you have any other AHK scripts or software running that handle any aspect of window management or manipulation* I don't believe so. I do have a UHK keyboard with some funky macros but I'm almost certain that cannot have any influence - it's all stored in the keyboard. The contents of the first five lines of file `komorebic.lib.ahk`: ; Generated by komorebic.exe Start(ffm, await_configuration, tcp_port) { RunWait, komorebic.exe start %ffm% --await-configuration %await_configuration% --tcp-port %tcp_port%, , Hide } The contents of the first six lines of file `komorebi.ahk`: #SingleInstance Force ; You can generate a fresh version of this file with "komorebic ahk-library" #Include %A_ScriptDir%\komorebic.lib.ahk ; https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations #Include %A_ScriptDir%\komorebi.generated.ahk
adam added the bug label 2026-01-05 14:48:42 +01:00
adam closed this issue 2026-01-05 14:48:42 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Jan 12, 2023):

Hi, I am traveling without a computer right now so please forgive the brief response. It looks like you have AHK2 installed, you'll need to install 1.1 from the Scoop versions bucket to use the provided library and sample config. It is possible to use AHK2, but for now you'll have to write the entire config from scratch if you want to use it.

@LGUG2Z commented on GitHub (Jan 12, 2023): Hi, I am traveling without a computer right now so please forgive the brief response. It looks like you have AHK2 installed, you'll need to install 1.1 from the Scoop versions bucket to use the provided library and sample config. It is possible to use AHK2, but for now you'll have to write the entire config from scratch if you want to use it.
Author
Owner

@SRNissen commented on GitHub (Jan 12, 2023):

Thank you for the swift response

Please enjoy your travels rather than providing me with tech support, I'll find a way to solve my own problems. I only opened the issue to let you know the suggested scoop workflow results in things not working so it should probably be modified (or removed from the guide entirely)

@SRNissen commented on GitHub (Jan 12, 2023): Thank you for the swift response Please enjoy your travels rather than providing me with tech support, I'll find a way to solve my own problems. I only opened the issue to let you know the suggested scoop workflow results in things not working so it should probably be modified (or removed from the guide entirely)
Author
Owner

@jameds commented on GitHub (Jan 16, 2023):

I've found installing versions/autohotkey1.1 works.

scoop bucket add versions
scoop install autohotkey1.1

EDIT: I realize this was commented before but the command wasn't clear for me.

@jameds commented on GitHub (Jan 16, 2023): I've found installing `versions/autohotkey1.1` works. ``` scoop bucket add versions scoop install autohotkey1.1 ``` EDIT: I realize this was commented before but the command wasn't clear for me.
Author
Owner

@LGUG2Z commented on GitHub (Jan 22, 2023):

I have been working on whkd and using it as a replacement for AHK for all things komorebi for the past few days and I'm pretty happy with it. I'm going to spend some time writing documentation and getting it added to package managers, and then for the next komorebi release whkd will be the recommended hotkey daemon, complete with a sample config.

Anyone who is interested in using whkd now can play around with my personal whkdrc file as a starting point for their own configuration:

.shell cmd

# reload whkd configuration
# alt + o                 : taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden # if shell is pwsh or powershell
alt + o                 : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd
alt + shift + o         : komorebic reload-configuration

# app shortcuts - these require shell to be pwsh or powershell
# the apps will be focused if open, or launched if not open
# alt + f                 : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }
# alt + b                 : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }

alt + m : komorebic minimize

# focus windows
alt + h                 : komorebic focus left
alt + j                 : komorebic focus down
alt + k                 : komorebic focus up
alt + l                 : komorebic focus right
alt + shift + oem_4     : komorebic cycle-focus previous # oem_4 is [
alt + shift + oem_6     : komorebic cycle-focus next # oem_6 is ]

# move windows
alt + shift + h         : komorebic move left
alt + shift + j         : komorebic move down
alt + shift + k         : komorebic move up
alt + shift + l         : komorebic move right
alt + shift + return    : komorebic promote

# stack windows
alt + left              : komorebic stack left
alt + down              : komorebic stack down
alt + up                : komorebic stack up
alt + right             : komorebic stack right
alt + oem_1             : komorebic unstack # oem_1 is ;
alt + oem_4             : komorebic cycle-stack previous # oem_4 is [
alt + oem_6             : komorebic cycle-stack next # oem_6 is ]

# resize
alt + oem_plus          : komorebic resize-axis horizontal increase
alt + oem_minus         : komorebic resize-axis horizontal decrease
alt + shift + oem_plus  : komorebic resize-axis vertical increase
alt + shift + oem_minus : komorebic resize-axis vertical decrease

# manipulate windows
alt + t                 : komorebic toggle-float
alt + shift + f         : komorebic toggle-monocle

# window manager options
alt + shift + r         : komorebic retile
alt + p                 : komorebic toggle-pause
alt + 0                 : komorebic toggle-focus-follows-mouse

# layouts
alt + x                 : komorebic flip-layout horizontal
alt + y                 : komorebic flip-layout vertical

# workspaces
alt + 1                 : komorebic focus-workspace 0
alt + 2                 : komorebic focus-workspace 1
alt + 3                 : komorebic focus-workspace 2
alt + 4                 : komorebic focus-workspace 3

# move windows across workspaces
alt + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2
alt + shift + 4         : komorebic move-to-workspace 3

There is also the feature/whkd branch in this repo which will automatically load configuration from a komorebi.ps1 file (#339) and generates application-specific configs in a PowerShell file that can be imported:

if (!(Get-Process whkd -ErrorAction SilentlyContinue))
{
  Start-Process whkd -WindowStyle hidden
}

. $PSScriptRoot\komorebi.generated.ps1

komorebic alt-focus-hack enable
komorebic window-hiding-behaviour minimize
komorebic cross-monitor-move-behaviour insert

komorebic invisible-borders 7 0 14 7

komorebic workspace-layout 0 0 ultrawide-vertical-stack
komorebic container-padding 0 0 20

komorebic workspace-layout 1 0 rows
komorebic container-padding 1 0 20

komorebic active-window-border-colour 66 165 245 --window-kind single
komorebic active-window-border-colour 256 165 66 --window-kind stack
komorebic active-window-border enable

komorebic global-work-area-offset 0 5 0 0
komorebic monitor-work-area-offset 0 0 5 0 0

komorebic watch-configuration enable

# enable when streaming in widescreen instead of ultra-widescreen
#
# komorebic workspace-layout-rule 0 0 0 bsp
# komorebic monitor-work-area-offset 0 1000 5 1000 0

komorebic complete-configuration
@LGUG2Z commented on GitHub (Jan 22, 2023): I have been working on [`whkd`](https://github.com/LGUG2Z/komorebi) and using it as a replacement for AHK for all things `komorebi` for the past few days and I'm pretty happy with it. I'm going to spend some time writing documentation and getting it added to package managers, and then for the next `komorebi` release `whkd` will be the recommended hotkey daemon, complete with a sample config. Anyone who is interested in using `whkd` now can play around with my personal `whkdrc` file as a starting point for their own configuration: ``` .shell cmd # reload whkd configuration # alt + o : taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden # if shell is pwsh or powershell alt + o : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd alt + shift + o : komorebic reload-configuration # app shortcuts - these require shell to be pwsh or powershell # the apps will be focused if open, or launched if not open # alt + f : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox } # alt + b : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome } alt + m : komorebic minimize # focus windows alt + h : komorebic focus left alt + j : komorebic focus down alt + k : komorebic focus up alt + l : komorebic focus right alt + shift + oem_4 : komorebic cycle-focus previous # oem_4 is [ alt + shift + oem_6 : komorebic cycle-focus next # oem_6 is ] # move windows alt + shift + h : komorebic move left alt + shift + j : komorebic move down alt + shift + k : komorebic move up alt + shift + l : komorebic move right alt + shift + return : komorebic promote # stack windows alt + left : komorebic stack left alt + down : komorebic stack down alt + up : komorebic stack up alt + right : komorebic stack right alt + oem_1 : komorebic unstack # oem_1 is ; alt + oem_4 : komorebic cycle-stack previous # oem_4 is [ alt + oem_6 : komorebic cycle-stack next # oem_6 is ] # resize alt + oem_plus : komorebic resize-axis horizontal increase alt + oem_minus : komorebic resize-axis horizontal decrease alt + shift + oem_plus : komorebic resize-axis vertical increase alt + shift + oem_minus : komorebic resize-axis vertical decrease # manipulate windows alt + t : komorebic toggle-float alt + shift + f : komorebic toggle-monocle # window manager options alt + shift + r : komorebic retile alt + p : komorebic toggle-pause alt + 0 : komorebic toggle-focus-follows-mouse # layouts alt + x : komorebic flip-layout horizontal alt + y : komorebic flip-layout vertical # workspaces alt + 1 : komorebic focus-workspace 0 alt + 2 : komorebic focus-workspace 1 alt + 3 : komorebic focus-workspace 2 alt + 4 : komorebic focus-workspace 3 # move windows across workspaces alt + shift + 1 : komorebic move-to-workspace 0 alt + shift + 2 : komorebic move-to-workspace 1 alt + shift + 3 : komorebic move-to-workspace 2 alt + shift + 4 : komorebic move-to-workspace 3 ``` There is also the `feature/whkd` branch in this repo which will automatically load configuration from a `komorebi.ps1` file (#339) and generates application-specific configs in a PowerShell file that can be imported: ```powershell if (!(Get-Process whkd -ErrorAction SilentlyContinue)) { Start-Process whkd -WindowStyle hidden } . $PSScriptRoot\komorebi.generated.ps1 komorebic alt-focus-hack enable komorebic window-hiding-behaviour minimize komorebic cross-monitor-move-behaviour insert komorebic invisible-borders 7 0 14 7 komorebic workspace-layout 0 0 ultrawide-vertical-stack komorebic container-padding 0 0 20 komorebic workspace-layout 1 0 rows komorebic container-padding 1 0 20 komorebic active-window-border-colour 66 165 245 --window-kind single komorebic active-window-border-colour 256 165 66 --window-kind stack komorebic active-window-border enable komorebic global-work-area-offset 0 5 0 0 komorebic monitor-work-area-offset 0 0 5 0 0 komorebic watch-configuration enable # enable when streaming in widescreen instead of ultra-widescreen # # komorebic workspace-layout-rule 0 0 0 bsp # komorebic monitor-work-area-offset 0 1000 5 1000 0 komorebic complete-configuration ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#169