File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -129,3 +129,46 @@ Return
129129#If WinActive("ahk_exe Obsidian.exe") or ("ahk_exe code.exe")
130130 ^Space ::# Space
131131Return
132+
133+ !3 ::
134+ if WinActive (" ahk_exe Telegram.exe" ) {
135+ WinClose , ahk_exe Telegram.exe
136+ } else {
137+ run " D:\scoop\apps\telegram\current\Telegram.exe"
138+ }
139+ return
140+
141+ ; 这里会影响Esc键在其他程序中的使用,按代码来看,应该只有Telegram.exe活动的时候才对Esc做了映射的
142+ ; if WinActive("ahk_exe Telegram.exe")
143+ ; Esc::
144+ ; WinClose , ahk_exe Telegram.exe
145+ ; Return
146+
147+ ; 针对Q-dir做的研究,后面可以继续扩展到Microsoft Terminal
148+ ; 按下 Alt+1 隐藏窗口或将窗口调到最前面
149+ ; !1::
150+ ; #IfWinExist, ahk_exe Q-Dir_x64.exe
151+ ; if WinExist("ahk_exe Q-Dir_x64.exe") {
152+ ; if WinActive("ahk_exe Q-Dir_x64.exe") {
153+ ; WinHide
154+ ; } else {
155+ ; WinActivate
156+ ; WinShow
157+ ; }
158+ ; } else {
159+ ; Run, "D:\Programs\Q-Dir\Q-Dir_x64.exe"
160+ ; }
161+ ; #IfWinExist
162+ ; return
163+
164+ ; 按下 Alt+1 隐藏窗口
165+ ; !1::
166+ ; if WinExist("ahk_exe Q-Dir_x64.exe") {
167+ ; WinHide , ahk_exe Q-Dir_x64.exe
168+ ; }
169+ ; return
170+
171+ ; ; 按下 Alt+2 恢复窗口
172+ ; !2::
173+ ; WinShow , ahk_exe Q-Dir_x64.exe
174+ ; return
You can’t perform that action at this time.
0 commit comments