An open API service indexing awesome lists of open source software.

https://github.com/humbertoschoenwald/auto-theme-solar-engine

A privacy-first, ultra-lightweight Windows tray utility built with .NET 11 Native AOT that automatically syncs your system theme with the local solar cycle using offline astronomical calculations.
https://github.com/humbertoschoenwald/auto-theme-solar-engine

astronomy auto-theme csharp csharp-15 dark-mode dotnet dotnet-11 dpapi light-mode lightweight native-aot no-telemetry offline-first privacy-first solar-cycle sunrise-sunset system-tray theme-switcher win32-api windows

Last synced: 29 days ago
JSON representation

A privacy-first, ultra-lightweight Windows tray utility built with .NET 11 Native AOT that automatically syncs your system theme with the local solar cycle using offline astronomical calculations.

Awesome Lists containing this project

README

          

# Auto Theme Solar Engine

[![CI Status](https://github.com/humbertoschoenwald/auto-theme-solar-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/humbertoschoenwald/auto-theme-solar-engine/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/humbertoschoenwald/auto-theme-solar-engine?label=latest&color=success)](https://github.com/humbertoschoenwald/auto-theme-solar-engine/releases/latest)
[![.NET](https://img.shields.io/badge/.NET-11.0%20Preview-512BD4?logo=dotnet)](https://dotnet.microsoft.com/en-us/download/dotnet/11.0)
[![Platform](https://img.shields.io/badge/Platform-Windows%20x64-0078D6?logo=windows)](https://learn.microsoft.com/windows/win32/)
[![License: MIT](https://img.shields.io/github/license/humbertoschoenwald/auto-theme-solar-engine)](https://opensource.org/licenses/MIT)

A high-precision, privacy-first Windows tray utility that automatically synchronizes your system theme with the local solar cycle. No cloud APIs, no telemetry—just your PC following the sun.

---

## ⚡ Quick Start

The recommended installation is a **per-user** setup. This allows the application to update itself seamlessly without requiring Administrator privileges.

Run the following command in a **PowerShell** session:

```powershell
# Create target directory and download the baseline release
New-Item -ItemType Directory -Force -Path "$env:LOCALAPPDATA\AutoThemeSolarEngine"
Set-Location "$env:LOCALAPPDATA\AutoThemeSolarEngine"

# Download the executable
Invoke-WebRequest -Uri "https://github.com/humbertoschoenwald/auto-theme-solar-engine/releases/download/v26.05.00/AutoThemeSolarEngine.exe" -OutFile ".\AutoThemeSolarEngine.exe"

# Launch the engine
Start-Process ".\AutoThemeSolarEngine.exe"
```

---

## 💡 Why use it?

Most theme switchers rely on heavy frameworks or external weather APIs. **Auto Theme Solar Engine** is built for those who value performance, system resources, and data sovereignty.

* **☀️ Astronomical Accuracy:** Uses robust NOAA/Meeus equations to calculate sunrise and sunset locally based on your coordinates.
* **🚀 Ultra-Lightweight:** Written in native **.NET 11** and compiled via **Native AOT**. It leverages raw Win32 interop for the UI to keep idle memory usage near absolute zero.
* **🛡️ Privacy by Design:** * **100% Offline:** Core theme-switching behavior requires zero internet connection.
* **DPAPI Encryption:** Coordinates are securely encrypted at rest using the Windows Data Protection API.
* **Data Minimization:** Coordinates are mathematically obfuscated before being stored to protect your exact location.

* **🌗 Seamless Transitions:** Uses undocumented `uxtheme.dll` hooks to ensure the theme switch is incredibly fluid, completely avoiding the harsh flickering common in standard registry-only toggles.

---

## ✨ Key Features

* **Native Settings UI:** A clean, tabbed interface (Home, Configuration, Updates) that dynamically respects your current system theme.
* **Smart Scheduling:** Intelligently handles edge cases like **Polar Night** and **Midnight Sun** for users in extreme latitudes.
* **Auto-Updates:** A built-in update orchestrator securely checks GitHub Releases and applies updates via a transparent, visible PowerShell helper.
* **Bilingual Support:** Full support for **English** and **Spanish**, selectable directly from the settings menu.

---

## 🛠️ Technical Baseline

| Component | Details |
| --- | --- |
| **Runtime** | .NET 11 (Preview 3) |
| **Language** | C# 15 |
| **Platform** | Windows 10 (Build 19041+) x64 |
| **Deployment** | Single, self-contained Native AOT executable |

---

## 🏗️ Development

This repository follows a strict **ADR-first (Architecture Decision Record)** doctrine. We believe in documenting the "why" just as much as the "how". If you wish to contribute, understand our technical choices, or fork the project, please review the `docs/adr/` directory first.

---

## 📄 License

Distributed under the **MIT License**. See `LICENSE` for more information.