mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[CLI] ahk fails if there's a space in the path #486
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DovieW on GitHub (Oct 11, 2024).
Summary
I made the dumb mistake of putting a space in my username. When trying to use the
--ahkoption and theKOMOREBI_CONFIG_HOMEis set somewhere in my user directory, I get a popup from AHK saying it can't find the file and the listed path is cut off at the space.Version Information
0.1.29
Komorebi Configuration
Hotkey Configuration
#Requires AutoHotkey v2.0.2
#SingleInstance Force
Komorebic(cmd) {
RunWait(format("komorebic.exe {}", cmd), , "Hide")
}
!q::Komorebic("close")
!m::Komorebic("minimize")
; Focus windows
!h::Komorebic("focus left")
!j::Komorebic("focus down")
!k::Komorebic("focus up")
!l::Komorebic("focus right")
!+[::Komorebic("cycle-focus previous")
!+]::Komorebic("cycle-focus next")
; Move windows
!+h::Komorebic("move left")
!+j::Komorebic("move down")
!+k::Komorebic("move up")
!+l::Komorebic("move right")
; Stack windows
!Left::Komorebic("stack left")
!Down::Komorebic("stack down")
!Up::Komorebic("stack up")
!Right::Komorebic("stack right")
!;::Komorebic("unstack")
![::Komorebic("cycle-stack previous")
!]::Komorebic("cycle-stack next")
; Resize
!=::Komorebic("resize-axis horizontal increase")
!-::Komorebic("resize-axis horizontal decrease")
!+=::Komorebic("resize-axis vertical increase")
!+_::Komorebic("resize-axis vertical decrease")
; Manipulate windows
!t::Komorebic("toggle-float")
!f::Komorebic("toggle-monocle")
; Window manager options
!+r::Komorebic("retile")
!p::Komorebic("toggle-pause")
; Layouts
!x::Komorebic("flip-layout horizontal")
!y::Komorebic("flip-layout vertical")
; Workspaces
!1::Komorebic("focus-workspace 0")
!2::Komorebic("focus-workspace 1")
!3::Komorebic("focus-workspace 2")
!4::Komorebic("focus-workspace 3")
!5::Komorebic("focus-workspace 4")
!6::Komorebic("focus-workspace 5")
!7::Komorebic("focus-workspace 6")
!8::Komorebic("focus-workspace 7")
; Move windows across workspaces
!+1::Komorebic("move-to-workspace 0")
!+2::Komorebic("move-to-workspace 1")
!+3::Komorebic("move-to-workspace 2")
!+4::Komorebic("move-to-workspace 3")
!+5::Komorebic("move-to-workspace 4")
!+6::Komorebic("move-to-workspace 5")
!+7::Komorebic("move-to-workspace 6")
!+8::Komorebic("move-to-workspace 7")
Output of komorebic check
KOMOREBI_CONFIG_HOME detected: C:/tools/komorebi
Looking for configuration files in C:/tools/komorebi
Found komorebi.json; this file can be passed to the start command with the --config flag
Found C:\Users\Dovie Weinstock.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag
@LGUG2Z commented on GitHub (Oct 11, 2024):
26a8912fc3/komorebic/src/main.rs (L2000-L2005)I would have thought that enclosing the config path argument with single quotes here would have handled spaces in paths. Open to ideas from people who know more about how PowerShell and AHK interact to make this more robust.
@CtByte commented on GitHub (Oct 11, 2024):
@LGUG2Z would it work with double quotes?
@LGUG2Z commented on GitHub (Oct 11, 2024):
21a5be0404Apparently the single quotes were supposed to have fixed it but if someone can try this out with double quotes and see if it works we can make the change (I don't have spaces in my username 😅 )
@CtByte commented on GitHub (Oct 11, 2024):
I don't use AHK, but what if you just move the config to a folder with spaces in its name, then you can test without spaces in the username.
@DovieW commented on GitHub (Oct 11, 2024):
Yeah that triggers it too. I would test it but have never compiled a rust program and would need a second to look into it. Maybe someone can tell me what command to run to compile komorebic.
@LGUG2Z commented on GitHub (Oct 11, 2024):
https://lgug2z.github.io/komorebi/installation.html#building-from-source
You can follow the build from source guide here ^