Compare commits
3 Commits
f60696abd9
...
main
Author | SHA1 | Date | |
---|---|---|---|
661ee354e9 | |||
c5c5b53ddd | |||
a11ec34202 |
34
main.ahk
34
main.ahk
@ -19,6 +19,28 @@ DownloadYoutubeVideo(dataType)
|
|||||||
}
|
}
|
||||||
OnClipboardChange DownloadYoutubeVideo
|
OnClipboardChange DownloadYoutubeVideo
|
||||||
|
|
||||||
|
; Focus the web browser if there is one open.
|
||||||
|
^!+#b:: ; Capslock+b to open a browser
|
||||||
|
{
|
||||||
|
browserID := WinExist("ahk_exe firefox.exe")
|
||||||
|
|
||||||
|
if (browserID) {
|
||||||
|
WinActivate(browserID)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
; Focus VS Code if there is one open.
|
||||||
|
; This may not work properly if there are more than one instances of VS Code running.
|
||||||
|
^!+#v:: ; Capslock+v to open a browser
|
||||||
|
{
|
||||||
|
vscodeID := WinExist("ahk_exe code.exe")
|
||||||
|
|
||||||
|
if (vscodeID) {
|
||||||
|
WinActivate(vscodeID)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
; Open a terminal over the currently focused VS Code window.
|
; Open a terminal over the currently focused VS Code window.
|
||||||
; If there is an open Windows Terminal, use that, otherwise create a new one.
|
; If there is an open Windows Terminal, use that, otherwise create a new one.
|
||||||
@ -50,6 +72,16 @@ prevWindow := 0
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Focus Discord if there is one open.
|
||||||
|
^!+#d:: ; Capslock+d to open a browser
|
||||||
|
{
|
||||||
|
discordID := WinExist("Discord")
|
||||||
|
|
||||||
|
if (discordID) {
|
||||||
|
WinActivate(discordID)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
; Arrange windows into my preferred location, based on what monitors are connected.
|
; Arrange windows into my preferred location, based on what monitors are connected.
|
||||||
monitorConfigurations := Map(
|
monitorConfigurations := Map(
|
||||||
@ -58,6 +90,7 @@ monitorConfigurations := Map(
|
|||||||
"Workrave", [0, 2056, 94, 56],
|
"Workrave", [0, 2056, 94, 56],
|
||||||
"Discord", [-7, 0, 900, 750],
|
"Discord", [-7, 0, 900, 750],
|
||||||
"Signal", [-7, 742, 900, 750],
|
"Signal", [-7, 742, 900, 750],
|
||||||
|
"Visual Studio Code", [886, 0, 2954, 2110],
|
||||||
"ahk_exe WindowsTerminal.exe", [886, 0, 2954, 2110],
|
"ahk_exe WindowsTerminal.exe", [886, 0, 2954, 2110],
|
||||||
"Mozilla Firefox", [881, 0, 2963, 2117],
|
"Mozilla Firefox", [881, 0, 2963, 2117],
|
||||||
"TickTick", [-7, 1484, 900, 635]
|
"TickTick", [-7, 1484, 900, 635]
|
||||||
@ -67,6 +100,7 @@ monitorConfigurations := Map(
|
|||||||
"Workrave", [0, 1498, 94, 56],
|
"Workrave", [0, 1498, 94, 56],
|
||||||
"Discord", [-7, 0, 900, 750],
|
"Discord", [-7, 0, 900, 750],
|
||||||
"Signal", [-7, 742, 900, 750],
|
"Signal", [-7, 742, 900, 750],
|
||||||
|
"Visual Studio Code", [472, 0, 2085, 1550],
|
||||||
"ahk_exe WindowsTerminal.exe", [472, 0, 2085, 1550],
|
"ahk_exe WindowsTerminal.exe", [472, 0, 2085, 1550],
|
||||||
"Mozilla Firefox", [467, 0, 2099, 1557],
|
"Mozilla Firefox", [467, 0, 2099, 1557],
|
||||||
"TickTick", [0, 731, 942, 821],
|
"TickTick", [0, 731, 942, 821],
|
||||||
|
Reference in New Issue
Block a user