#!/usr/bin/env python3
"""
check_disable_windows_spotlight_status.py

Checks whether "Disable Windows Spotlight on Desktop" is currently applied.

Usage:
    python check_disable_windows_spotlight_status.py
"""

import winreg


def main() -> None:
    try:
        key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Policies\Microsoft\Windows\CloudContent")
        value, _ = winreg.QueryValueEx(key, "DisableSpotlightCollectionOnDesktop")
        winreg.CloseKey(key)
        print(f"Current value of 'DisableSpotlightCollectionOnDesktop': {value}")
    except FileNotFoundError:
        print("'DisableSpotlightCollectionOnDesktop' is not set (using the Windows default).")


if __name__ == "__main__":
    main()