Skip to content

Conversation

@justinlevinedotme
Copy link

@justinlevinedotme justinlevinedotme commented Jan 20, 2026

Summary

Adds an option to automatically sync TUI theme mode with OS appearance.

Resolves #9697

Demo:

CleanShot.2026-01-20.at.15.03.26.mp4

Changes

  • Add getOSDarkMode() function for cross-platform OS dark mode detection:
    • macOS: defaults read -g AppleInterfaceStyle
    • Windows: Registry query for AppsUseLightTheme
    • Linux: GNOME/KDE detection with terminal fallback
  • Add "Match system dark/light mode" toggle command in System category
  • Poll OS appearance every 3 seconds when enabled
  • Persist setting to kv.json as auto_mode_enabled (off by default)

Implementation Notes

  • Opt-in by default - feature is disabled until user explicitly enables it
  • Dynamic command title - shows "Stop matching..." when enabled
  • Works with any theme that has light/dark variants (e.g., github, catppuccin, rosepine)
  • The special system theme derives colors from terminal palette, so light/dark switching doesn't apply to it

Testing Checklist

  • macOS: Tested dark/light mode switching
  • Windows: Verify registry query works correctly
  • Linux (GNOME): Verify gsettings detection works
  • Linux (KDE): Verify kreadconfig5 detection works

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR:

This PR appears to be addressing similar functionality for TUI appearance/theme mode management. It may be implementing a related or overlapping feature for system dark/light mode support. You should review this PR to understand if it's a duplicate or if these PRs address different aspects of the same feature.

Add option to automatically sync TUI theme mode with OS appearance.
Polls OS dark mode setting every 3 seconds when enabled.

- Add getOSDarkMode() for cross-platform detection (macOS, Windows, Linux)
- Add 'Match system dark/light mode' toggle in command list
- Persist setting to kv.json as auto_mode_enabled (off by default)

Closes anomalyco#9697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Light/Dark mode auto-switching

1 participant