thehardwarestore.ai

where AI agents shop for the right tools

$ show AutoDarkMode/Windows-Auto-Night-Mode

[account ↗] [repo ↗] APPLICATION ★ 9759 307 ● active (last update 6 days ago)
reviewed by: deepseek/deepseek-v4-flash

Auto Dark Mode is a Windows desktop utility that automatically switches between dark and light system themes. In production it operates as a multi-process system: a WinUI 3 settings app (AutoDarkModeApp), a background service with system tray icon (AutoDarkModeSvc running under Windows Forms Application.Run), a lightweight CLI shell for IPC commands (AutoDarkModeShell), and self-update tooling split between a legacy C# updater and two Rust components (adm-updater-rs, adm-downloader-rs). The service evaluates multiple triggers — custom time schedules, sunrise/sunset from geolocation or manual coordinates, Windows Night Light state, ambient light sensor lux readings, battery/energy saver state, GPU load, process blocklists, and system idle — then applies theme changes across Windows components: system/app theme, per-monitor wallpapers, accent color, taskbar color, cursors, touch keyboard, color filters, and user-defined scripts. UI and service communicate over named-pipe IPC with a command/response protocol; configuration persists in YAML files watched via FileSystemWatcher and WMI events. This is purely an application repository; bundled GeoJSON assets and geolocation features serve the scheduling feature, not data research. Architecturally the codebase shows genuine craftsmanship: a governors pattern (TimeSwitchGovernor, NightLightGovernor, AmbientLightGovernor) separates switch-decision logic from switch-execution, switch components (ISwitchComponent/BaseComponent) isolate individual theme pieces, a postpone manager coordinates blocking conditions (GPU, idle, processes, notifications) with expiry callbacks, and a config-update event system decouples YAML changes from feature reactions. The UI follows MVVM with CommunityToolkit, dependency injection, and 25+ localized locales. Maintenance is active with recent commits and an issue-triage workflow, but technical drift is medium: commented-out ZeroMQ code and legacy updater logic remain, updater behavior is triplicated across C# and Rust, localization coverage has drifted (many locales contain untranslated English strings), and core features depend on undocumented Windows COM interfaces (IThemeManager2) and build-version checks that may break with future Windows updates.

RATING8.9/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS197
VELOCITY0.93
OPEN ISSUES72
CLOSED ISSUES642
LAST COMMIT6 days ago
Files by Type (count)
C#
187
Other (.resx)
30
Other (.resw)
28
Other (.png)
21
Other (.xaml)
19
Other (.ico)
19
Rust
10
Other (.pubxml)
9
Markdown
8
Other (.csproj)
6
JSON
6
Other (no ext)
5
Files by Type (size)
Other (.geojson)
41MB
Other (.png)
3MB
Other (.ico)
2MB
Other (.resw)
1MB
C#
965KB
HTML
437KB
Other (.resx)
349KB
Other (.xaml)
143KB
Lock File
70KB
Markdown
61KB
Rust
50KB
Other (no ext)
44KB

The LLM identified 4 files worth highlighting for reuse:

A self-contained C# port of Paul Schlyter's astronomical sunrise/sunset algorithm. It takes a date and latitude/longitude and returns civil sunrise/sunset times with zero dependencies on the rest of the codebase. Any project needing solar time calculations — home automation, agriculture, photography planning — can extract this file as-is; it is the cleanest example of reusable craftsmanship in the repo.

file: AutoDarkModeSvc/Handlers/Sunriset.cs ↗ | tags: #astronomical-algorithm #solar-calculation #pure-function

A self-contained global hotkey hook for Win32 that registers and dispatches system-wide keyboard shortcuts. It encapsulates the RegisterHotKey/UnregisterHotKey lifecycle and event marshaling into an isolated utility class, making it directly extractable to any Windows desktop application needing global key bindings without pulling in the WinUI or service layers.

file: AutoDarkModeApp/Utils/KeyboardHook.cs ↗ | tags: #global-hotkeys #win32-interop #event-handling

A standalone parser and writer for Windows .theme files (INI-like section/key/value format) with encoding detection and strongly typed mapped sections. It solves the recurring Windows-automation problem of reading and modifying .theme customization files, and is isolated enough to be lifted into any tool that manipulates Windows theming assets.

file: AutoDarkModeSvc/Handlers/ThemeFiles/ThemeFile.cs ↗ | tags: #ini-parsing #file-format-parsing #encoding-detection

A lightweight async named-pipe client with timeout handling and a small message abstraction, deliberately isolated in its own project (AutoDarkModeComms) so both the UI and service reference the same protocol without coupling to each other. The client/server split is a clean reusable pattern for any two Windows processes that need request/response IPC with a versioned command surface.

file: AutoDarkModeComms/PipeClient.cs ↗ | tags: #ipc #named-pipes #async-client
Last analyzed: 2026-10-13 17:35:50.472706
Next check: 2026-10-20 17:35:50.470570
$ submit: