Auto Light/Dark Theme Switcher Based on System Time

Feature request for product/service

Cursor IDE

Describe the request

Hey Cursor community!

I wanted my editor to automatically switch between light and dark themes depending on the time of day—light during daytime, dark after sunset—without needing a separate extension. So I wired it up using a small startup script and a few custom settings keys.

━━━ How it works ━━━

The script checks the current hour on startup (and every 60 seconds thereafter). If the hour falls between lightStartHour (default: 6) and darkStartHour (default: 18), it applies the light theme; otherwise it switches to the dark theme.

━━━ Configuration (settings.json) ━━━

You can override everything individually in your settings:

“auto-theme-switcher.enabled”: true
“auto-theme-switcher.lightTheme”: “Default Light Modern”
“auto-theme-switcher.darkTheme”: “Default Dark Modern”
“auto-theme-switcher.lightStartHour”: 6
“auto-theme-switcher.darkStartHour”: 18

━━━ Why not just use an extension? ━━━

Fair point—and there are great extensions for this! But I wanted something lightweight that lives entirely in my own config, with no extra marketplace dependency. This approach also makes the thresholds and theme names trivially customizable per project or machine.

Would love to hear if anyone packages this into a proper extension or has a cleaner approach. Happy to share the full snippet!

#cursor #theme #productivity #vscode

Operating System (if it applies)

MacOS

hey @Kihiro_Takahashi, in the IDE, since the interface is based of VScode, couldn’t you find what you wanted with those existing settings? or… do you prefer clear separation between Cursor IDE interface and macos theme switcher?

Got it working! Ended up going with the native VS Code settings approach you mentioned — no extension needed.

"window.autoDetectColorScheme": true,
"workbench.preferredLightColorTheme": "Solarized Light",
"workbench.preferredDarkColorTheme": "Cursor Dark"

Thanks for the nudge in the right direction!

nice, you can mark post fixed! glad it all worked out for you