Skip to content

Instantly share code, notes, and snippets.

@nistvan86
Last active March 27, 2021 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nistvan86/7cfc4564e75ef434f6d1155e98546fe3 to your computer and use it in GitHub Desktop.
Save nistvan86/7cfc4564e75ef434f6d1155e98546fe3 to your computer and use it in GitHub Desktop.
Makes the auto-hiding Windows taskbar essentially invisible
; Makes the auto-hiding Windows taskbar essentially invisible (or very dim, you can configure it)
; Helps with OLED burn-in since even the auto-hiding taskbar has two lines visible, this makes it super dim
; and if you have an animated background it pretty much overrides the taskbar pixels.
; To make it autostart with the system:
; - create a shortcut for this file
; - put the shortcut it into the startup folder (Win+R, "shell:startup")
; Configure hidden transparency here, 1 is basically invisible, 254 does kind of nothing
HiddenTransparency := 1
; Configure fade out threshold in pixels here, how much of the taskbar's size should disappear before transparency kicks in
ThresholdPixels := 20
; Code starts here, don't change
IsTransparent := false
OnExit, ExitRoutine
Loop
{
WinGetPos x, y, w, h, ahk_class Shell_TrayWnd
IsHidden:=(x<-w+ThresholdPixels) or (y<-h+ThresholdPixels) or (x>A_ScreenWidth-w+(w-ThresholdPixels)) or (y>A_ScreenHeight-h+(h-ThresholdPixels))
if (IsTransparent != IsHidden) {
IsTransparent := IsHidden
TransparencyValue := IsTransparent ? HiddenTransparency : 255
WinSet, Transparent, %TransparencyValue%, ahk_class Shell_TrayWnd
}
Sleep, 30
}
ExitRoutine:
WinSet, Transparent, 255, ahk_class Shell_TrayWnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment