How to Automatically Hide the Taskbar When Idle in Windows 11?

January 3, 2026 4 answers
Asked by AstralMisprint
I'm using Windows 11 and I've been trying to find a way to autohide my taskbar when no windows are open and there's no keyboard or mouse activity. I've used some apps before, but they ended up hiding the taskbar at the wrong times, which wasn't useful. I thought about using AutoHotkey, but I'm not sure how to code or set it up to run on startup. Any advice would be much appreciated!

Answers

Wobblish
Thanks a lot, the script works like a charm! Just curious, how do I set this script to run automatically every time I start my PC? And is there a specific line I should change to adjust the time before the taskbar disappears?
Reply to this answer
fiscalQ3
You can use the AutoHotkey script to achieve this! Hereโ€™s a simple one: ```ahk Persistent DetectHiddenWindows True SetTimer(CheckTaskbar, 500) CheckTaskbar() { TaskbarClass := "ahk_class Shell_TrayWnd" IsDesktopActive := WinActive("ahk_class WorkerW") or WinActive("ahk_class Progman") if (IsDesktopActive and A_TimeIdle > 3000) { if WinExist(TaskbarClass) WinHide(TaskbarClass) } else if (!IsDesktopActive or A_TimeIdle < 500) { if WinExist(TaskbarClass) WinShow(TaskbarClass) } } ``` This script will hide the taskbar after 3 seconds of inactivity. You can tweak the `3000` value to adjust the idle time in milliseconds! As for running it at startup, you can place your AutoHotkey script in the startup folder.
Reply to this answer
+renew the lease
By default, if you set the taskbar to autohide in Windows, it'll only show when you hover over it, even when windows are open. It sounds like you're looking for something a bit different. It won't behave like that out of the box, unfortunately.
Reply to this answer
Papercraft
Yes, autohiding the taskbar is a built-in feature in Windows. You can find more details in the support documentation. However, it seems like you want it to show only when youโ€™re interacting with the desktop and not just on mouse movement, which isn't a standard option.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions