-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.ahk
executable file
·108 lines (73 loc) · 2.67 KB
/
config.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
;You can bind your own hotkeys to certain positions using
; MoveWindowToTile(window-title, x0-index, x1-index, y0-index, y1-index)
;For example:
; NumpadIns:: MoveWindowToTile("A", 1, 3, 1, 2)
; current grid
; +----+----+
; | | |
; +----+----+
; | | |
; +----+----+
; V[n]:= [ x-coord, y0-index, y1-index, corner?, resize-only?]
V := []
V[1] := [ ScreenX, 1, 3, 1, 0 ]
V[2] := [ ScreenX+ScreenW/2, 1, 3, 0, 0 ]
V[3] := [ ScreenX+ScreenW, 1, 3, 1, 0 ]
; H[n]:= [ y-coord, x0-index, x1-index, corner?, resize-only?]
H := []
H[1] := [ ScreenY, 1, 3, 1, 0 ]
H[2] := [ ScreenY+(ScreenH)/2, 1, 3, 0, 0 ]
H[3] := [ ScreenY+ScreenH, 1, 3, 1, 0 ]
; Gaps (px)
MarginWidth := 15
; Margin between windows at edges (px)
MarginWidthHalf := MarginWidth//2
; Minimum distance from lines/windows before snapping (px)
SnapDistance := 10
; Minimum distance before starting to move/resize window (px)
MinimumMovement := 1
; Enable snapping to grid?
SnapToGrid := True
; Enable snapping to surrounding windows?
SnapToWindows := True
; Enable maximizing window if moved to top of screen?
MoveToTopToMaximize := False
; Minimize the window if it is moved to the bottom of the screen?
MoveToBottomToClose := False
; Enable display of grid? (useful for debugging)
VisibleGrid := False
; Colour of grid
ColorGrid := 0xA2B2A1
; Transparency of grid
TransparencyGrid := 128
; Colour of window preview
ColorPreview := 0xD0D0D0
; Transparency of window preview
TransparencyPreview := 128
; Preview animation duration (ms)
AnimationDuration := 0
; HotkeyModifier is prefixed to each hotkey, but can be released once the hotkey has activated.
HotkeyModifier := "#"
; Move window hotkey (leave blank to disable)
HotkeyMove := "MButton"
; Resize window hotkey (leave blank to disable)
HotkeyResize := "RButton"
; Move Resize window hotkey (leave blank to disable)
; When moving window, press this to switch to grid resize mode (different from normal resize)
HotkeyMoveResize := ""
; tiling/moving/resizing variables
MovePix := 50
SlowMovePix := 10
LowerOffset := A_ScreenHeight/2+MarginWidth/2
WindowFullHeight := A_ScreenHeight-MarginWidth*2
if mod (MarginWidth,2) = 0 {
WindowHalfHeight := WindowFullHeight/2-MarginWidth/2
} else {
WindowHalfHeight := WindowFullHeight/2-MarginWidth/2+1
}
WindowNormalWidth := A_ScreenWidth/2-(MarginWidth+MarginWidth/2)+1
NormalFarLeftOffset := A_ScreenWidth/2+MarginWidth/2
WindowSmallWidth := WindowNormalWidth-MarginWidth*7
SmallFarLeftOffset := NormalFarLeftOffset+MarginWidth*7
WindowLargeWidth := A_ScreenWidth-WindowSmallWidth-(MarginWidth*3)
LargeFarLeftOffset := A_ScreenWidth-SmallFarLeftOffset+MarginWidth