Skip to content

Instantly share code, notes, and snippets.

View bgastelo's full-sized avatar

Brandon Gastelo bgastelo

View GitHub Profile
@bgastelo
bgastelo / grayscale.ahk
Created November 19, 2025 02:35
Windows Grayscale Digital wellbeing AHK script
#SingleInstance Force
; Function to check if workstation is locked
IsWorkstationLocked() {
;DllCall("wtsapi32.dll\WTSGetActiveConsoleSessionId", "UInt")
Return !DllCall("user32.dll\OpenInputDesktop", "UInt", 0, "Int", False, "UInt", 0x10000000)
}
OnMessage(0x218, WM_POWERBROADCAST)