From 2a623b579818c9dc19b1a152c064f17bd1bafda5 Mon Sep 17 00:00:00 2001 From: TheBestPessimist Date: Thu, 29 Jun 2023 11:42:31 +0300 Subject: [PATCH] Windows FUCKING Terminal is retarded and doesn't activate its window at start --- AutoHotkey64.ahk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/AutoHotkey64.ahk b/AutoHotkey64.ahk index b203de3..239f6a7 100644 --- a/AutoHotkey64.ahk +++ b/AutoHotkey64.ahk @@ -83,6 +83,7 @@ CapsLock & 1 Up::{ ;~LWin & ~LControl:: ; for some reason this ordering of keys interferes with Precision touchpad "3 finger tap = Middle click" 🙄. Why is Microshitsoft sending all modifier keys before middle click? WTF ?!?!?!!?!? LControl & LWin Up:: { + ; see https://github.com/seerge/g-helper/issues/512: need this to disable touchpad if(A_PriorKey = "F24") ; in my 2 in 1 laptop, when rotating the screen into tabled only mode, GHelper sends the keys LCtrl Down, LWin Down, F24 Down, then up, which activates this hotkey return if(!ProcessExist(Process.FlowLauncher)) { @@ -115,13 +116,16 @@ CapsLock & LWin Up::Send "^!+l" + ;------------------------------------------------ ; Run Windows Terminal #t:: { - Run("C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.16.10262.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe",,, &pid) - WinWait("ahk_pid " pid, , 5) - WinActivate("ahk_pid " pid) + Run("C:\Users\TheBestPessimist\AppData\Local\Microsoft\WindowsApps\wt.exe --title `"Windows FUCKING Terminal :^)`" ") + windowsFuckingTerminalWindow := "Windows FUCKING Terminal ahk_class CASCADIA_HOSTING_WINDOW_CLASS ahk_exe WindowsTerminal.exe" + + WinWait(windowsFuckingTerminalWindow, , 5) + WinActivate(windowsFuckingTerminalWindow) }