🐍 Python 3.10+
Show Seconds in Taskbar Clock (Python)
Adds a seconds display to the taskbar clock. Applies the tweak via the stdlib winreg module.
set_show_seconds_in_taskbar_clock.py
#!/usr/bin/env python3
"""
set_show_seconds_in_taskbar_clock.py
Show Seconds in Taskbar Clock.
Adds a seconds display to the taskbar clock.
Usage:
python set_show_seconds_in_taskbar_clock.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, "ShowSecondsInSystemClock", 0, winreg.REG_DWORD, 1)
winreg.CloseKey(key)
print("Show Seconds in Taskbar Clock applied.")
if __name__ == "__main__":
main()