Advertisement
jamesonBradfield

komorebi.ahk

Aug 26th, 2023
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 2.48 KB | Software | 0 0
  1. #SingleInstance Force
  2.  
  3. ; Load library
  4. #Include komorebic.lib.ahk
  5. ; Load configuration
  6. #Include komorebi.generated.ahk
  7.  
  8. ; Send the ALT key whenever changing focus to force focus changes
  9. AltFocusHack("enable")
  10. ; Default to cloaking windows when switching workspaces
  11. WindowHidingBehaviour("cloak")
  12. ; Set cross-monitor move behaviour to insert instead of swap
  13. CrossMonitorMoveBehaviour("Insert")
  14. ; Enable hot reloading of changes to this file
  15. WatchConfiguration("enable")
  16.  
  17. ; Create named workspaces I-V on monitor 0
  18. EnsureNamedWorkspaces(0, "I II III IV V")
  19. ; You can do the same thing for secondary monitors too
  20. ; EnsureNamedWorkspaces(1, "A B C D E F")
  21.  
  22. ; Assign layouts to workspaces, possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack
  23. NamedWorkspaceLayout("I", "bsp")
  24.  
  25. ; Set the gaps around the edge of the screen for a workspace
  26. NamedWorkspacePadding("I", 20)
  27. ; Set the gaps between the containers for a workspace
  28. NamedWorkspaceContainerPadding("I", 20)
  29.  
  30. ; You can assign specific apps to named workspaces
  31. ; NamedWorkspaceRule("exe", "Firefox.exe", "III")
  32.  
  33. ; Configure the invisible border dimensions
  34. InvisibleBorders(7, 0, 14, 7)
  35.  
  36. ; Uncomment the next lines if you want a visual border around the active window
  37. ActiveWindowBorderColour(66, 165, 245, "single")
  38. ActiveWindowBorderColour(256, 165, 66, "stack")
  39. ActiveWindowBorderColour(255, 51, 153, "monocle")
  40. NamedWorkspacePadding(1,0)
  41. NamedWorkspaceContainerPadding(1,0)
  42.  
  43. CompleteConfiguration()
  44.  
  45. ; Focus windows
  46. !h::Focus("left")
  47. !j::Focus("down")
  48. !k::Focus("up")
  49. !l::Focus("right")
  50. !+[::CycleFocus("previous")
  51. !+]::CycleFocus("next")
  52.  
  53. ; Move windows
  54. !+h::Move("left")
  55. !+j::Move("down")
  56. !+k::Move("up")
  57. !+l::Move("right")
  58. !+Enter::Promote()
  59.  
  60. ; Stack windows
  61. !Left::Stack("left")
  62. !Right::Stack("right")
  63. !Up::Stack("up")
  64. !Down::Stack("down")
  65. !;::Unstack()
  66. ![::CycleStack("previous")
  67. !]::CycleStack("next")
  68.  
  69. ; Resize
  70. !=::ResizeAxis("horizontal", "increase")
  71. !-::ResizeAxis("horizontal", "decrease")
  72. !+=::ResizeAxis("vertical", "increase")
  73. !+-::ResizeAxis("vertical", "decrease")
  74.  
  75. ; Manipulate windows
  76. !t::ToggleFloat()
  77. !+f::ToggleMonocle()
  78.  
  79. ; Window manager options
  80. !+r::Retile()
  81. !p::TogglePause()
  82.  
  83. ; Layouts
  84. !x::FlipLayout("horizontal")
  85. !y::FlipLayout("vertical")
  86.  
  87. ; Workspaces
  88. !1::FocusWorkspace(0)
  89. !2::FocusWorkspace(1)
  90. !3::FocusWorkspace(2)
  91.  
  92. ; Move windows across workspaces
  93. !+1::MoveToWorkspace(0)
  94. !+2::MoveToWorkspace(1)
  95. !+3::MoveToWorkspace(2)
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement