-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes for AHK2 + used my own config
- Loading branch information
1 parent
6510f0b
commit 2c96971
Showing
13 changed files
with
994 additions
and
474 deletions.
There are no files selected for viewing
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
; Adapted from https://github.com/LGUG2Z/komorebi/blob/master/komorebi.sample.ahk | ||
#SingleInstance Force | ||
#Include "%A_ScriptDir%\lib\komorebic.lib.ahk" | ||
|
||
; Open/Close windows | ||
!+q:: Close() | ||
!Enter:: { | ||
if (PID := ProcessExist("wezterm-gui.exe")) { | ||
} else { | ||
Run("wezterm-gui") | ||
} | ||
; Jump to the process | ||
FocusMonitorWorkspace(0, 0) | ||
} | ||
|
||
; Focus windows | ||
!h:: Focus("left") | ||
!j:: Focus("down") | ||
!k:: Focus("up") | ||
!l:: Focus("right") | ||
!f:: ToggleMaximize() | ||
|
||
; Move windows | ||
!+h:: Move("left") | ||
!+j:: Move("down") | ||
!+k:: Move("up") | ||
!+l:: Move("right") | ||
|
||
; Resize | ||
!=:: ResizeAxis("horizontal", "increase") | ||
!-:: ResizeAxis("horizontal", "decrease") | ||
!+=:: ResizeAxis("vertical", "increase") | ||
!+-:: ResizeAxis("vertical", "decrease") | ||
|
||
; Workspaces | ||
!1:: FocusWorkspace(0) | ||
!2:: FocusWorkspace(1) | ||
!3:: FocusWorkspace(2) | ||
!4:: FocusWorkspace(3) | ||
!5:: FocusWorkspace(4) | ||
!6:: FocusWorkspace(5) | ||
!7:: FocusWorkspace(6) | ||
!8:: FocusWorkspace(7) | ||
!9:: FocusWorkspace(8) | ||
|
||
; Move windows across workspaces | ||
!+1:: MoveToWorkspace(0) | ||
!+2:: MoveToWorkspace(1) | ||
!+3:: MoveToWorkspace(2) | ||
!+4:: MoveToWorkspace(3) | ||
!+5:: MoveToWorkspace(4) | ||
!+6:: MoveToWorkspace(5) | ||
!+7:: MoveToWorkspace(6) | ||
!+8:: MoveToWorkspace(7) | ||
!+9:: MoveToWorkspace(8) | ||
|
||
; Scroll taskbar to cycle workspaces (disabled since I don't want to use it) | ||
; #Hotif MouseIsOver("ahk_class Shell_TrayWnd") || MouseIsOver("ahk_class Shell_SecondaryTrayWnd") | ||
; WheelUp:: ScrollWorkspace("next") | ||
; WheelDown:: ScrollWorkspace("previous") | ||
; #Hotif | ||
|
||
; Alt + scroll to cycle workspaces | ||
!WheelUp:: ScrollWorkspace("next") | ||
!WheelDown:: ScrollWorkspace("previous") | ||
|
||
LastTaskbarScroll := 0 | ||
ScrollWorkspace(dir) { | ||
global LastTaskbarScroll | ||
; This adds a state-dependent debounce timer to adress an issue where a single wheel | ||
; click spawns multiple clicks when a web browser is in focus. | ||
_isBrowser := WinActive("ahk_class Chrome_WidgetWin_1") || WinActive("ahk_class MozillaWindowClass") | ||
_t := _isBrowser ? 800 : 100 | ||
; Total debounce time = _t[this_call] + _t[last_call] to address interim focus changes | ||
if (A_PriorKey != A_ThisHotkey) || (A_TickCount - LastTaskbarScroll > _t) { | ||
LastTaskbarScroll := A_TickCount + _t | ||
MouseFollowsFocus(false) | ||
CycleWorkspace(dir) | ||
; ToDo: only re-enable if it was enabled before | ||
MouseFollowsFocus(true) | ||
} | ||
} | ||
|
||
; ====================================================================== | ||
; Auxiliary Functions | ||
; ====================================================================== | ||
|
||
MouseIsOver(WinTitle) { | ||
MouseGetPos(, , &Win) | ||
return WinExist(WinTitle . " ahk_id " . Win) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.24/schema.json", | ||
"app_specific_configuration_path": "$Env:USERPROFILE/applications.yaml", | ||
"window_hiding_behaviour": "Cloak", | ||
"cross_monitor_move_behaviour": "Insert", | ||
"default_workspace_padding": 0, | ||
"default_container_padding": 0, | ||
"border_offset": -1, | ||
"border_width": 1, | ||
"active_window_border": false, | ||
"active_window_border_colours": { | ||
"single": "#42a5f5", | ||
"stack": "#00a542", | ||
"monocle": "#ff3399" | ||
}, | ||
"focus_follows_mouse": "Komorebi", | ||
"monitors": [ | ||
{ | ||
"workspaces": [ | ||
{ | ||
"name": "Coding", | ||
"layout": "VerticalStack", | ||
"workspace_rules": [ | ||
{ | ||
"kind": "Exe", | ||
"id": "wezterm-gui.exe" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Browser", | ||
"layout": "BSP", | ||
"workspace_rules": [ | ||
{ | ||
"kind": "Exe", | ||
"id": "waterfox.exe" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Teams/Discord", | ||
"layout": "BSP", | ||
"workspace_rules": [ | ||
{ | ||
"kind": "Exe", | ||
"id": "Discord.exe" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Anything goes", | ||
"layout": "BSP" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.