🐍 Python 3.10+
Disable Taskbar Widgets Icon (Python)
Removes the Widgets icon from the Windows 11 taskbar. Applies the tweak via the stdlib winreg module.
set_disable_taskbar_widgets.py
#!/usr/bin/env python3
"""
set_disable_taskbar_widgets.py
Disable Taskbar Widgets Icon.
Removes the Widgets icon from the Windows 11 taskbar.
Usage:
python set_disable_taskbar_widgets.py
"""
import winreg
def main() -> None:
key = winreg.CreateKeyEx(
winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", 0, winreg.KEY_SET_VALUE
)
winreg.SetValueEx(key, "TaskbarDa", 0, winreg.REG_DWORD, 0)
winreg.CloseKey(key)
print("Disable Taskbar Widgets Icon applied.")
if __name__ == "__main__":
main()