Skip to content

Instantly share code, notes, and snippets.

@ZackStone
Last active January 30, 2026 18:19
Show Gist options
  • Select an option

  • Save ZackStone/a8d3dae01368519d718189a5e70b4cc6 to your computer and use it in GitHub Desktop.

Select an option

Save ZackStone/a8d3dae01368519d718189a5e70b4cc6 to your computer and use it in GitHub Desktop.
Custom shortcuts using AutoHotKey
#NoEnv, #Persistent, #SingleInstance
; ======================================================================
; Winkey + J
; Script para alterar nivel de brilho da tela do notebook
#j::Run C:\manu\scripts\change-brightness-level.ps1
; ======================================================================
; Winkey + Y
; Abre o Windows Terminal
#y::Run C:\manu\links\Windows Terminal.lnk
; ======================================================================
; Winkey + Z / Tecla multimídia STOP
; Ativa/desativa o microfone
#z::
vkB2::
SoundSet, +1, MASTER, mute, 3
SoundGet, microphone_mute, MASTER, mute, 3
if (microphone_mute = "Off")
{
microphone_mute = LISTETING
SoundBeep, 700, 10
autoTooltip("Mic ON", 500)
}
else
{
microphone_mute = MUTED
SoundBeep, 400, 10
autoTooltip("Mic OFF", 500)
}
return
; ======================================================================
autoTooltip(Text, Time, which=1){
ToolTip, % Text, , , % which
SetTimer,% "Tooltipoff" which ,% Time
}
; ======================================================================
TooltipOff:
TooltipOff1:
TooltipOff2:
TooltipOff3:
TooltipOff4:
TooltipOff5:
TooltipOff6:
TooltipOff7:
TooltipOff8:
TooltipOff9:
TooltipOff10:
TooltipOff11:
SetTimer, % A_ThisLabel, Off
ToolTip,,,, % ( Substr(A_ThisLabel, 0) == "f" ) ? 1 : RegExReplace(A_ThisLabel, "TooltipOff")
return
#NoEnv, #Persistent, #SingleInstance
; + Shift
; ^ Ctrl
; ! Alt
; # Win
; ======================================================================
; win + f/y - layout 1: large window + narrow window
#f:: moveAndResize( 0, 0, 2400, getMonitorHeight() )
#y:: moveAndResize( 2394, 0, 1052, getMonitorHeight() )
; win + shift + f/y - layout 2: full hd + right window
#+f:: moveAndResize( 0, 0, 1920, getMonitorHeight() )
#+y:: moveAndResize( 1920, 0, 1520, getMonitorHeight() )
; win + c - center window on main left area
#c:: moveAndResize( 300, 100, 1800, 1200 )
; win + alt + y - small window on narrow right area
#!y:: moveAndResize( 2440, 100, 1000, 1000 )
moveWindow(x, y) {
WinGet, active_id, ID, A
WinMove, ahk_id %active_id%, , x, y
}
resizeWindow(width, height) {
WinGet, active_id, ID, A
WinMove, ahk_id %active_id%, , , , width, height
}
moveAndResize(x, y, width, height) {
WinGet, active_id, ID, A
WinMove, ahk_id %active_id%, , x, y, width, height
}
getMonitorHeight() {
SysGet, Monitor, MonitorWorkArea
return MonitorBottom - MonitorTop
}
; DEBUG
; Show the position and size of the current window
#^!y::
WinGetTitle, Title, A ; Get window title
WinGetPos, X, Y, Width, Height, A ; Get position and size
SysGet, Monitor, MonitorWorkArea
; Show the information
MsgBox, Window: %Title%`n`nX: %X%`nY: %Y%`nWidth: %Width%`nHeight: %Height%`n`nMonitor: %MonitorBottom% %MonitorTop%
return
; ======================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment