-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindowTile.ahk
59 lines (54 loc) · 1.12 KB
/
WindowTile.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
^!Numpad4::
WinExist("A") ; Get the active window
WinGetPos,X,,width
WinRestore
if (width = A_ScreenWidth/2 and x = 0)
{
WinMove,,,0,0,(A_ScreenWidth/3),(A_ScreenHeight-60)
}
else
{
if (width = 426)
WinMove,,,0,0,(2*A_ScreenWidth/3),(A_ScreenHeight-60)
else
WinMove,,,0,0,(A_ScreenWidth/2), (A_ScreenHeight-60) ; Move it to top-left
}
return
^!Numpad6::
WinExist("A") ; Get the active window
WinGetPos,x,,width
WinRestore
if (width = A_ScreenWidth/2 and x = A_ScreenWidth/2)
{
WinMove,,,(2*A_ScreenWidth/3),0,(A_ScreenWidth/3),(A_ScreenHeight-60)
}
else
{
if (width = 426)
WinMove,,,(A_ScreenWidth/3),0,(2*A_ScreenWidth/3),(A_ScreenHeight-60)
else
WinMove,,,(A_screenWidth/2),0,(A_ScreenWidth/2),(A_ScreenHeight-60)
}
return
^!Numpad5::
WinExist("A")
WinGet, maximized, MinMax
if maximized = 1
{
WinRestore
WinMove,,,(A_ScreenWidth/4),0,(A_ScreenWidth/2),(A_ScreenHeight-60)
}
else
{
WinGetPos,x,,width
if (width = A_ScreenWidth/2 and x = A_ScreenWidth/4)
WinMove,,,(A_ScreenWidth/3),0,(A_ScreenWidth/3),(A_ScreenHeight-60)
else
WinMaximize
}
return
^!Numpad8::
WinExist("A")
WinRestore
WinMove,,,100,45,1094,757
return