Created
January 16, 2021 16:37
-
-
Save popstas/c4f5aaa7e255262352321f1d9e7df250 to your computer and use it in GitHub Desktop.
Move window by `Ctrl+Alt+Shift+h/j/k/i/o/l/n`
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
LeftX := 0 | |
LeftY := 0 | |
RightX := 2560 | |
RightY := -920 | |
ResetWindowSize() { | |
WinGet activeWin, ID, A | |
posX := 0 | |
posY := 0 | |
width := 1000 | |
height := 800 | |
WinMove,A,,%posX%,%posY%,%width%,%height% | |
} | |
CenterActiveWindowRT() { | |
WinGet activeWin, ID, A | |
;posX := 75 | |
posX := 2560 + 0 | |
posY := -920 + 0 | |
width := 1440 | |
;width := 1080 | |
height := 1000 | |
WinMove,A,,%posX%,%posY%,%width%,%height% | |
} | |
CenterActiveWindowRR() { | |
WinGet activeWin, ID, A | |
posX := 1920 | |
posY := 5 | |
width := 1000 | |
height := 1000 | |
WinMove,A,,%posX%,%posY%,%width%,%height% | |
} | |
CenterActiveWindowRB() { | |
WinGet activeWin, ID, A | |
;posX := 0 | |
;posY := 1005 | |
posX := 2560 + 0 | |
posY := -920 + 1005 | |
width := 1440 | |
;width := 1370 | |
;width := 1080 | |
height := 1515 | |
;height := 875 | |
WinMove,A,,%posX%,%posY%,%width%,%height% | |
} | |
CenterActiveWindowRB_temp() { | |
WinGet activeWin, ID, A | |
;posX := 75 | |
posX := 2560 + 0 | |
;posY := 1308 | |
posY := -920 + 2560 - 810 | |
width := 1440 | |
;width := 1370 | |
;width := 1080 | |
height := 810 - 40 | |
;height := 1555 | |
;height := 632 | |
WinMove,A,,%posX%,%posY%,%width%,%height% | |
} | |
CenterActiveWindowLL() { | |
WinGet activeWin, ID, A | |
;posX := -2560 | |
;posY := 920 | |
posX := 0 + 0 | |
posY := 0 + 0 | |
width := 1250 | |
height := 1080 | |
WinMove,A,,%posX%,%posY%,%width%,%height% | |
} | |
CenterActiveWindowLR() { | |
WinGet activeWin, ID, A | |
posX := 0 + 1250 | |
posY := 0 + 0 | |
width := 1250 | |
height := 1080 | |
WinMove,A,,%posX%,%posY%,%width%,%height% | |
} | |
;+^!y::WinMove, 10, 10 | |
+^!n::ResetWindowSize() | |
+^!i::CenterActiveWindowRT() | |
+^!k::CenterActiveWindowRB() | |
+^!l::CenterActiveWindowRB_temp() | |
+^!j::CenterActiveWindowLR() | |
+^!h::CenterActiveWindowLL() | |
+^!o::CenterActiveWindowRR() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment