Compare commits
4 Commits
4a887dd1e2
...
778b793b34
Author | SHA1 | Date | |
---|---|---|---|
778b793b34 | |||
bb3a3a81f3 | |||
b37052f3ea | |||
6acdfcd904 |
17
main.ahk
17
main.ahk
@ -1,4 +1,7 @@
|
||||
DownloadYoutubeVideo(dataType)
|
||||
; Replace a common TODO type
|
||||
::TOOD::TODO
|
||||
|
||||
DownloadYoutubeVideo(dataType)
|
||||
{
|
||||
; Note: This callback is usually fired twice when copying for some reason
|
||||
; so we use "RunWait" below to make sure we only launch youtube-dl once.
|
||||
@ -22,7 +25,7 @@ OnClipboardChange DownloadYoutubeVideo
|
||||
; Pressing the hotkey again goes back to the previously focused window.
|
||||
|
||||
prevWindow := 0
|
||||
CapsLock & t:: ; Capslock+t to open a terminal
|
||||
^!+#t:: ; Capslock+t to open a terminal
|
||||
{
|
||||
global prevWindow
|
||||
|
||||
@ -56,6 +59,7 @@ monitorConfigurations := Map(
|
||||
"Discord", [-7, 0, 900, 750],
|
||||
"Signal", [-7, 742, 900, 750],
|
||||
"Visual Studio Code", [886, 0, 2954, 2110],
|
||||
"ahk_exe WindowsTerminal.exe", [886, 0, 2954, 2110],
|
||||
"Mozilla Firefox", [881, 0, 2963, 2117],
|
||||
"TickTick", [712, 2892, 942, 821],
|
||||
"Atrium", [1654, 2160, 1620, 1552]
|
||||
@ -66,6 +70,7 @@ monitorConfigurations := Map(
|
||||
"Discord", [-7, 0, 900, 750],
|
||||
"Signal", [-7, 742, 900, 750],
|
||||
"Visual Studio Code", [472, 0, 2085, 1550],
|
||||
"ahk_exe WindowsTerminal.exe", [472, 0, 2085, 1550],
|
||||
"Mozilla Firefox", [467, 0, 2099, 1557],
|
||||
"TickTick", [0, 731, 942, 821],
|
||||
"Atrium", [983, 0, 1577, 1552],
|
||||
@ -73,6 +78,9 @@ monitorConfigurations := Map(
|
||||
)
|
||||
)
|
||||
IdentifyMonitorConfiguration() {
|
||||
; TODO: Improve monitor matching by using the monitor guid.
|
||||
; See https://www.autohotkey.com/boards/viewtopic.php?t=116104
|
||||
|
||||
count := MonitorGetCount()
|
||||
if (count == 1) {
|
||||
return "standalone"
|
||||
@ -104,10 +112,11 @@ ArrangeWindows(wParam, lParam, msg, hwnd)
|
||||
monitorConfig := monitorConfigurations[monitorConfigName]
|
||||
ArrangeWindowsInMonitor(monitorConfig)
|
||||
}
|
||||
|
||||
; Listen for the monitor change event
|
||||
OnMessage(0x007E, ArrangeWindows)
|
||||
|
||||
CapsLock & a:: ; Capslock+a to arrange windows
|
||||
^!+#a:: ; Capslock+a to arrange windows
|
||||
{
|
||||
keyArr := []
|
||||
For Key In monitorConfigurations
|
||||
@ -132,4 +141,4 @@ CapsLock & a:: ; Capslock+a to arrange windows
|
||||
monitorConfig := monitorConfigurations[Saved.LayoutChoice]
|
||||
ArrangeWindowsInMonitor(monitorConfig)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user