Skip to content

Instantly share code, notes, and snippets.

@AyzekUorren
Last active September 15, 2025 13:51
Show Gist options
  • Save AyzekUorren/a25482ac3ef6f721b836a7ad48fe543a to your computer and use it in GitHub Desktop.
Save AyzekUorren/a25482ac3ef6f721b836a7ad48fe543a to your computer and use it in GitHub Desktop.
Simple script to hide / show windows taskbar
import ctypes
import keyboard
FindWindow = ctypes.windll.user32.FindWindowW
ShowWindow = ctypes.windll.user32.ShowWindow
TASKBAR = FindWindow("Shell_TrayWnd", None)
START_BUTTON = FindWindow("Button", None)
visible = True
def toggle_taskbar():
global visible
if visible:
ShowWindow(TASKBAR, 0)
ShowWindow(START_BUTTON, 0)
else:
ShowWindow(TASKBAR, 5)
ShowWindow(START_BUTTON, 5)
visible = not visible
keyboard.add_hotkey('ctrl+alt+t', toggle_taskbar)
keyboard.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment