Skip to content

Commit

Permalink
Resize to Cascade size now on HOME (instead of DEL).
Browse files Browse the repository at this point in the history
Resize HOME now uses 3/4 screen width and height.
  • Loading branch information
justcla committed Jul 10, 2020
1 parent 5354b65 commit 4b1b732
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Window Move HotKeys.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ LimitX := Screen_X - EdgeBuffer
LimitY := Screen_Y - EdgeBuffer

MoveAmount = 50 ; The number of pixels to move when resizing windows
ResizeRatio := 3/4 ; The portion of the window to cover when resizing to Home

; ================================
; ==== Move Window commands ====
Expand Down Expand Up @@ -266,12 +267,12 @@ NewH := WinH + (MoveAmount * XDir)
WinMove, A, , , , NewW, NewH
return

; Resize to a quarter of the screen size
!+#Del::
; Resize to three-quarters of the screen size
!+#Home::
EnsureWindowIsRestored()
WinGetPos, WinX, WinY, WinW, WinH, A ; "A" to get the active window's pos.
NewW := Screen_X / 2 ; Half window width
NewH := Screen_Y / 2 ; Half window height
NewW := Screen_X * ResizeRatio ; three-quarters of window width
NewH := Screen_Y * ResizeRatio ; three-quarters of window height
WinMove, A, , , , NewW, NewH
return

Expand Down

0 comments on commit 4b1b732

Please sign in to comment.