summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbreadcat2013-08-17 13:38:51 +0100
committerbreadcat2013-08-17 13:38:51 +0100
commit1142d9f7e5f2784981acaedf3f40b1637642934f (patch)
tree9d3d464d6422c581d06783fff8ab94ade7456734
parent26d515c1135374a668cb2edafe98099004ec6dda (diff)
downloadahka-1142d9f7e5f2784981acaedf3f40b1637642934f.tar.gz
ahka-1142d9f7e5f2784981acaedf3f40b1637642934f.tar.bz2
ahka-1142d9f7e5f2784981acaedf3f40b1637642934f.zip
Tiling
Initial commit
-rw-r--r--tiling.ahk46
1 files changed, 46 insertions, 0 deletions
diff --git a/tiling.ahk b/tiling.ahk
new file mode 100644
index 0000000..a1f1cea
--- /dev/null
+++ b/tiling.ahk
@@ -0,0 +1,46 @@
+
+Shift(Pos)
+{
+ WinGetClass, class, A
+ IfInString , shell_TrayWnd,Progman,Button,DV2ControlHost, %class%
+ Return
+ IfWinExist,ahk_class Shell_TrayWnd
+ SysGet, m, MonitorWorkArea
+ Else SysGet, m, Monitor
+ WinGetPos, MWT_X, MWT_Y, MWT_W, MWT_H, A
+ SendMessage, 0x1F,,,, A
+ WinGet, MWT_active, MinMax, A
+ if (MWT_active = 1)
+ WinRestore, A
+ If (Pos = "T")
+ WinMove, A,, 0, 0, mRight, mBottom/2
+ If (Pos = "B")
+ WinMove, A,, 0, mBottom/2, mRight, mBottom/2
+ If (Pos = "L")
+ WinMove, A,, 0, 0, mRight/2, mBottom
+ If (Pos = "R")
+ WinMove, A,, mRight/2, 0, mRight/2, mBottom
+ If (Pos = "TL")
+ WinMove, A,, 0, 0, mRight/2, mBottom/2
+ If (Pos = "TR")
+ WinMove, A,, mRight/2, 0, mRight/2, mBottom/2
+ If (Pos = "BR")
+ WinMove, A,, mRight/2, mBottom/2, mRight/2, mBottom/2
+ If (Pos = "BL")
+ WinMove, A,, 0, mBottom/2, mRight/2, mBottom/2
+}
+Return
+
+#Up::WinMaximize, A
+#Down::WinMinimize, A
+#Left::Shift("L")
+#Right::Shift("R")
+#Numpad1::Shift("BL")
+#Numpad2::Shift("B")
+#Numpad3::Shift("BR")
+#Numpad4::Shift("L")
+#Numpad5::WinMaximize, A
+#Numpad6::Shift("R")
+#Numpad7::Shift("TL")
+#Numpad8::Shift("T")
+#Numpad9::Shift("TR") \ No newline at end of file