Skip to content

Commit acbe9fa

Browse files
committed
Merge branch 'master' of github.com:bushnerd/q-dir_ahk
2 parents ff6c9dd + f7384af commit acbe9fa

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

q-dir_ahk.ahk

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,46 @@ Return
129129
#If WinActive("ahk_exe Obsidian.exe") or ("ahk_exe code.exe")
130130
^Space::#Space
131131
Return
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

0 commit comments

Comments
 (0)