-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsoftware.ahk
94 lines (90 loc) · 2.45 KB
/
software.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
;=====================================================================
; Frequently Used Softwares
;---------------------------------------------------------------------
CapsLock & c:: ;VSCode
{
if WinActive("ahk_class CabinetWClass") {
selectedFilePath := Explorer_GetSelection()
ShellRun(code,selectedFilePath,A_WorkingDir)
}
else {
ShellRun(code,,A_WorkingDir)
}
return
}
CapsLock & e:: ;Editor
selectedFilePath := Explorer_GetSelection()
Run "%editor%" "%selectedFilePath%"
return
CapsLock & t:: ; terminal
if WinActive("ahk_class CabinetWClass") {
folder := GetFolder()
if GetKeyState("shift") != 0 {
run "%cmd%" /start %folder%
; run "%cmd%" -dir %folder%
} else {
; not work run "%cmd%" /single "%folder%" -cur_console:d:%folder%
run "%cmd%" /start %folder%
}
} else {
if GetKeyState("shift") != 0 { ;Search
run "%cmd%" /start %userProfile%
} else {
run "%cmd%" /single %userProfile%
}
}
return
; Run "%cmd%"
;-----------------------------------o
CapsLock & d:: Send, +!d ;Dictionary
;-----------------------------------o Web Search
CapsLock & w::
if GetKeyState("shift") != 0 {
ShellRun(searchEngineSecondary)
} else {
ShellRun(searchEngine)
}
return
;-----------------------------------o
CapsLock & r:: Run Powershell ;Run Shell
;-----------------------------------o
#include %A_LineFile%\..\search-with-everything.ahk.
;-----------------------------------o
CapsLock & q:: ; quick note
IfWinExist Untitled - Notepad
IfWinActive Untitled - Notepad
WinMinimize
else
WinActivate
else
Run Notepad
return
CapsLock & m::
Input Key, L1 M
If Key = r
{
Run, "%ruler%" ;screen ruler
return
}
else if Key= s
{
if GetKeyState("alt") = 0
Run "%snippingTool%" ;Sniping
else
Run "%gifTool%" ;screen to gif
return
}
else if Key = v ;visualStudio
{
if WinActive("ahk_class CabinetWClass")
folder := GetFolder()
Loop Files, %folder%\*.sln
Run,"%visualStudio%" %A_LoopFileFullPath%, %folder%
return
}
else if Key = t
{
Run "%processExplorer%" ;Task Manager
return
}
return