Formatting
This commit is contained in:
parent
b37052f3ea
commit
bb3a3a81f3
8
main.ahk
8
main.ahk
@ -1,4 +1,4 @@
|
|||||||
DownloadYoutubeVideo(dataType)
|
DownloadYoutubeVideo(dataType)
|
||||||
{
|
{
|
||||||
; Note: This callback is usually fired twice when copying for some reason
|
; 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.
|
; so we use "RunWait" below to make sure we only launch youtube-dl once.
|
||||||
@ -75,6 +75,9 @@ monitorConfigurations := Map(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
IdentifyMonitorConfiguration() {
|
IdentifyMonitorConfiguration() {
|
||||||
|
; TODO: Improve monitor matching by using the monitor guid.
|
||||||
|
; See https://www.autohotkey.com/boards/viewtopic.php?t=116104
|
||||||
|
|
||||||
count := MonitorGetCount()
|
count := MonitorGetCount()
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
return "standalone"
|
return "standalone"
|
||||||
@ -106,6 +109,7 @@ ArrangeWindows(wParam, lParam, msg, hwnd)
|
|||||||
monitorConfig := monitorConfigurations[monitorConfigName]
|
monitorConfig := monitorConfigurations[monitorConfigName]
|
||||||
ArrangeWindowsInMonitor(monitorConfig)
|
ArrangeWindowsInMonitor(monitorConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
; Listen for the monitor change event
|
; Listen for the monitor change event
|
||||||
OnMessage(0x007E, ArrangeWindows)
|
OnMessage(0x007E, ArrangeWindows)
|
||||||
|
|
||||||
@ -134,4 +138,4 @@ OnMessage(0x007E, ArrangeWindows)
|
|||||||
monitorConfig := monitorConfigurations[Saved.LayoutChoice]
|
monitorConfig := monitorConfigurations[Saved.LayoutChoice]
|
||||||
ArrangeWindowsInMonitor(monitorConfig)
|
ArrangeWindowsInMonitor(monitorConfig)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user