Skip to content

Instantly share code, notes, and snippets.

@QuinnCiccoretti
Last active August 18, 2024 17:09
Show Gist options
  • Save QuinnCiccoretti/d22230303ad08f6247dfce48d46d9914 to your computer and use it in GitHub Desktop.
Save QuinnCiccoretti/d22230303ad08f6247dfce48d46d9914 to your computer and use it in GitHub Desktop.
i3-like configuration for the komorebi window manager
; @author quinn ciccoretti
#SingleInstance Force
#Include %A_ScriptDir%\komorebic.lib.ahk
; https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations
#Include %A_ScriptDir%\komorebi.generated.ahk
; Hide windows when switching workspaces (faster than playing minimize animation)
WindowHidingBehaviour("hide")
; Set cross-monitor move behaviour to insert instead of swap
CrossMonitorMoveBehaviour("insert")
; Enable hot reloading of changes to this file
WatchConfiguration("disable")
ContainerPadAmount := 1
WorkspacePadAmount := 0
Loop 2 {
Monitor := A_INDEX-1
; autohotkey loop scope is weird!
; if i save A_INDEX-1 in the outer loop,
; i can access this value in the inner loop with "Monitor"
; and the inner loop has its own unrelated A_INDEX
EnsureWorkspaces(Monitor, 5)
Loop 6 {
;no padding on any monitor/workspace
Workspace := A_INDEX-1
ContainerPadding(Monitor, Workspace, ContainerPadAmount)
WorkspacePadding(Monitor, Workspace, WorkspacePadAmount)
}
}
^1::
MoveToMonitor(0)
return
^2::
MoveToMonitor(1)
; Switch/Move to workspace
; Switch: Alt + 1~5
; Move: Alt + 1~5
!+1::
MoveToWorkspace(0)
return
!1::
FocusWorkspace(0)
return
!+2::
MoveToWorkspace(1)
return
!2::
FocusWorkspace(1)
return
!+3::
MoveToWorkspace(2)
return
!3::
FocusWorkspace(2)
return
!+4::
MoveToWorkspace(3)
return
!4::
FocusWorkspace(3)
return
!+5::
MoveToWorkspace(4)
return
!5::
FocusWorkspace(4)
return
!+r::
Retile()
return
; Change the focused window, Alt + Vim direction keys (HJKL)
!h::
Focus("left")
return
!j::
CycleFocus("previous")
return
!k::
CycleFocus("next")
return
!l::
Focus("right")
return
; Move the focused window in a given direction, Alt + Shift + Vim direction keys (HJKL)
; or cycle
!+h::
Resize("left", "increase")
Resize("right", "decrease")
return
!+j::
CycleMove("previous")
return
!+k::
CycleMove("next")
return
!+l::
Resize("left", "decrease")
Resize("right", "increase")
return
; Allow komorebi to start managing windows
CompleteConfiguration()
@NormTurtle
Copy link

how do i get ?
komorebic.lib.ahk

@reduktr
Copy link

reduktr commented May 18, 2023

Nice config. What are the keybindings in this to resize a window? I can't seem to figure it out.

@QuinnCiccoretti
Copy link
Author

how do i get ? komorebic.lib.ahk

https://github.com/LGUG2Z/komorebi#quickstart

@QuinnCiccoretti
Copy link
Author

@NeonMinnen
(My mod key is left alt)
Alt + Shift + L and Alt + Shift + H for left and right resize
Don't have a vertical resize lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment