Skip to content

Instantly share code, notes, and snippets.

@kulvind3r
Created January 11, 2026 15:43
Show Gist options
  • Select an option

  • Save kulvind3r/f8bf7bace28b4d211535f9070cc8d3a1 to your computer and use it in GitHub Desktop.

Select an option

Save kulvind3r/f8bf7bace28b4d211535f9070cc8d3a1 to your computer and use it in GitHub Desktop.
Bunch of Auto Hot Key v2 shortcuts for various nick nacks. Serves as backup and implementation examples.
; Toggle Navigation pane in Windows Explorer
!n::
{
Send('!vn{enter}')
}
; End
; Toggle Power Profile
^!p::
{
Run 'powershell.exe -File "D:\Portable Apps\PerfSwitcher\PerfSwitcher.ps1"', , "Hide", &pid
}
; End
; Screenshot
^!PrintScreen::
{
Run 'nircmd.exe savescreenshot "E:\Downloads\scr~$currdate.MM_dd_yyyy$-~$currtime.HH_mm_ss$.png"'
}
; End
; Display Controls
^!0::
{
Run 'nircmd.exe monitor off'
}
^!PgUp:: ; Switch to External
{
Run 'C:\Windows\System32\DisplaySwitch.exe /external'
}
^!PgDn:: ; Switch to Internal
{
Run 'C:\Windows\System32\DisplaySwitch.exe /internal'
}
^!Home:: ; Extend
{
Run 'C:\Windows\System32\DisplaySwitch.exe /extend'
}
^!1:: ;Switch to HDMI 1
{
Run '"D:\Portable Apps\ControlMyMonitor\ControlMyMonitor.exe" /SetValue "DELL S2725HS" 60 17'
}
^!2:: ;Switch to HDMI 2
{
Run '"D:\Portable Apps\ControlMyMonitor\ControlMyMonitor.exe" /SetValue "DELL S2725HS" 60 18'
}
^!5:: ;Set Audio volume to 50%
{
Run '"D:\Portable Apps\ControlMyMonitor\ControlMyMonitor.exe" /SetValue "DELL S2725HS" 62 50'
}
^!Up:: ;Increase Brightness to 30%
{
Run '"D:\Portable Apps\ControlMyMonitor\ControlMyMonitor.exe" /SetValue "DELL S2725HS" 10 30'
}
^!Down:: ;Decrease Brightness to 5%
{
Run '"D:\Portable Apps\ControlMyMonitor\ControlMyMonitor.exe" /SetValue "DELL S2725HS" 10 5'
}
; End
; Toggle DesktopOverlayHost
^!o::
{
if ProcessExist("DesktopOverlayHost.exe")
{
ProcessClose "DesktopOverlayHost.exe"
RefreshTray
}
else
{
Run 'C:\Program Files (x86)\RivaTuner Statistics Server\DesktopOverlayHost.exe'
}
}
; End
; Refresh Tray Icons
RefreshTray() {
WM_MOUSEMOVE := 0x200
detectHiddenWin := A_DetectHiddenWindows
DetectHiddenWindows true
allTitles := ["ahk_class Shell_TrayWnd", "ahk_class NotifyIconOverflowWindow"]
allControls := ["ToolbarWindow321", "ToolbarWindow322", "ToolbarWindow323", "ToolbarWindow324"]
allIconSizes := [24, 32]
for _, title in allTitles {
for _, controlName in allControls {
for _, iconSize in allIconSizes {
try {
ControlGetPos(&xTray, &yTray, &wdTray, &htTray, controlName, title)
} catch {
continue ; skip to next control if not found
}
y := htTray - 10
while (y > 0) {
x := wdTray - iconSize // 2 ; use integer division
while (x > 0) {
lParam := (y << 16) | (x & 0xFFFF)
PostMessage(WM_MOUSEMOVE, 0, lParam, controlName, title)
x -= iconSize // 2
}
y -= iconSize // 2
}
}
}
}
DetectHiddenWindows(detectHiddenWin)
}
;End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment