forked from denolfe/AutoHotkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Home.ahk
150 lines (126 loc) · 3.75 KB
/
Home.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
#UseHook, On
#WinActivateForce
#SingleInstance force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, RegEx
DetectHiddenWindows, On
SetCapsLockState, AlwaysOff
CheckAdmin()
RunIfExist(A_ScriptDir "\Utilities\VolumeScroll\VolumeScroll.ahk")
RunIfExist(A_ScriptDir "\Core\AutoCorrect.ahk")
Run, %A_ScriptDir%\Utilities\WindowPadX\WindowPadX.ahk %A_ScriptDir%\WindowPadX.Custom.ini
IfWinNotExist, ahk_exe clipx.exe
RunProgFiles("ClipX\clipx.exe")
Notify(A_ScriptName . " Started!","",-3,"Style=Win10")
Editor := "C:\Program Files (x86)\Microsoft VS Code\Code.exe"
UserDir := "C:\Users\" A_UserName
Menu, Tray, Icon, lib\images\Portal.ico
Menu, Tray, Tip, Home Script
SetTimer, IntroSound, -1
SetTimer, IntroLights, -1000
TaskBar_SetAttr(2)
CreateStartupShortcut()
Return ; End Auto-Execute
IntroSound:
SoundPlay, lib\sounds\load.wav
Return
IntroLights:
kbdIndex := 1
Loop, 4 ; flash all LEDs
{
KeyboardLED(4,"on", kbdIndex)
Sleep, 75
KeyboardLED(4,"off", kbdIndex)
Sleep, 75
}
KeyboardLED(0,"off", kbdIndex)
Return
^!s::
RunProgFiles("Everything\Everything.exe")
WinActivate
WinMove, ahk_class EVERYTHING,, 1920,735,1280,705
Return
; Rearrange windows
^!0::
Run, "C:\Program Files (x86)\Steam\Steam.exe" steam://open/friends/
WinMove, Friends,, 4680,44,312,1698
WinMove, ahk_exe Discord.exe,, 1920,44,1536,1698
Return
; Toggle Audio Device
^!Ins::
AudioIniFile := "AudioDevices.ini"
IfNotExist, %AudioIniFile%
FileAppend, [AudioDevices], %AudioIniFile%
IniRead, DefaultDevice, AudioDevices.ini, AudioDevices, DefaultDevice
If (DefaultDevice != "G933")
{
NewDevice := "G933"
IniWrite, "G933", AudioDevices.ini, AudioDevices, DefaultDevice
}
Else
{
NewDevice := "YU3"
IniWrite, "YU3", AudioDevices.ini, AudioDevices, DefaultDevice
}
Run, Utilities\nircmd.exe setdefaultsounddevice %NewDevice%
Notify("New Audio Device:" NewDevice,"",-1,"Style=Win10")
Return
#c::Run, C:\
#p::Run, C:\Program Files (x86)\
:*:pd;::
SendInput, playdemo picks\%clipboard%{Enter}
Return
#l::
Run,%A_WinDir%\System32\rundll32.exe user32.dll`,LockWorkStation
Sleep 1000
SendMessage, 0x112, 0xF170, 2,, Program Manager
Return
CapsLock & /::
RCtrl & Del::Show_Start("- Google Chrome", "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")
CapsLock & SC027::
RCtrl & End::Show_Start("Cmder", "C:\tools\cmdermini\Cmder.exe")
CapsLock & '::
RCtrl & PgDn::Show_Start("- Visual Studio Code", "C:\Program Files (x86)\Microsoft VS Code\Code.exe")
RCtrl & PgUp::Show_Start(" - Discord", UserDir "\AppData\Local\Discord\app-0.0.299\Discord.exe")
; RCtrl & 5::Return
; RCtrl & 6::Return
; RCtrl & 7::Return
; RCtrl & 8::Return
; RCtrl & 9::Return
^!Enter::
loop
{
WinClose, ahk_class CabinetWClass
IfWinNotExist, ahk_class CabinetWClass
break
}
WinClose ahk_class EVERYTHING
Notify("Windows Purged","",-2,"GC=555555 TC=White MC=White")
Return
~*LWin::
Sleep, 200
TaskBar_SetAttr(2)
Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;; Folder Shortcuts ;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!8:: Show_Dir("C:\dev")
!9:: Show_Dir("F:\Downloads\")
!0:: Show_Dir(A_ScriptDir)
^!r:: Reload
^!e:: Edit(A_ScriptName, Editor)
^!t:: Edit("test.ahk", Editor)
!t:: Run %A_ScriptDir%\test.ahk
^!x::AHKPanic(1,0,0,1)
#Include %A_ScriptDir%\Core\AppSpecific.ahk
#Include %A_ScriptDir%\Core\Functions.ahk
#Include %A_ScriptDir%\Core\HotStrings.ahk
#Include %A_ScriptDir%\Shortcuts\Media.ahk
#Include %A_ScriptDir%\Shortcuts\CapsNav.ahk
#Include lib\VA.ahk
#Include lib\Notify.ahk
#Include lib\LedControl.ahk
#Include lib\TaskBar_SetAttr.ahk