summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVon Random <von@vdrandom.org>2022-01-13 22:59:53 +0300
committerVon Random <von@vdrandom.org>2022-01-13 22:59:53 +0300
commite1c736bf69d8e8a6f84ea10030a9aed712186349 (patch)
treed559dce87107197f5a3236341d445b4209c00094
parent21404a7e2f9073a17d4d0c4e5ccba2ddd1aeef3e (diff)
merge everything into one file, having a separate library is pointless at this point
-rw-r--r--_winresize.ahk24
-rw-r--r--myhotkeys.ahk21
2 files changed, 19 insertions, 26 deletions
diff --git a/_winresize.ahk b/_winresize.ahk
deleted file mode 100644
index 14389f3..0000000
--- a/_winresize.ahk
+++ /dev/null
@@ -1,24 +0,0 @@
-#NoEnv
-#Warn
-SendMode Input
-SetWorkingDir %A_ScriptDir%
-
-; Not only windows titlebar and borders count towards window size
-; shadow also does, so compensate for that, width 16, height 39
-
-ResizeWin(Width = 0,Height = 0,ExtraW = 0,ExtraH = 0,WinW = 16,WinH = 39) {
- WinGetPos,X,Y,W,H,A
-
- if (Width == 0) {
- Width := W
- } else {
- Width += ExtraW + WinW
- }
- if (Height == 0) {
- Height := H
- } else {
- Height += ExtraH + WinH
- }
-
- WinMove,A,,%X%,%Y%,%Width%,%Height%
-} \ No newline at end of file
diff --git a/myhotkeys.ahk b/myhotkeys.ahk
index ed795b8..591cd12 100644
--- a/myhotkeys.ahk
+++ b/myhotkeys.ahk
@@ -3,9 +3,26 @@
#NoEnv
#Warn
SendMode Input
-SetWorkingDir %A_ScriptDir%
-#Include, _winresize.ahk
+; Not only windows titlebar and borders count towards window size
+; shadow also does, so compensate for that, width 16, height 39
+
+ResizeWin(Width = 0,Height = 0,ExtraW = 0,ExtraH = 0,WinW = 16,WinH = 39) {
+ WinGetPos,X,Y,W,H,A
+
+ if (Width == 0) {
+ Width := W
+ } else {
+ Width += ExtraW + WinW
+ }
+ if (Height == 0) {
+ Height := H
+ } else {
+ Height += ExtraH + WinH
+ }
+
+ WinMove,A,,%X%,%Y%,%Width%,%Height%
+}
; always on top
#!t::Winset, Alwaysontop, , A