# hyprsunset-qt

A Qt6 GUI to edit `~/.config/hypr/hyprsunset.conf`, fetch sunrise/sunset times for your location, and restart the hyprsunset daemon.

## Features

- Profile manager: add, remove, and edit day/night profiles
- Auto or manual geolocation
- Fetch sunrise -> day / sunset -> night times
- Live preview via `hyprctl`
- Save + restart daemon

## Requirements

- Python 3.11+
- PyQt6
- A running hyprsunset (v0.3.3+) under Hyprland

## Install

```
pip install .
```

Or run directly without installing:

```
python3 -m hyprsunset_qt
```

Once installed, the app is also available via the `hyprsunset-qt` entry point.

## Configuration

hyprsunset-qt reads and writes two files:

- `~/.config/hypr/hyprsunset.conf` — the hyprsunset daemon config. This file is rewritten on save; comments in it are regenerated by the app.
- `~/.config/hyprsunset-qt/config` — the app's own settings, in INI format. Stores location (`lat`/`lon`/`auto_detect`), the sunrise/sunset cache path, and the daemon command.

The sunrise/sunset JSON cache lives under `~/.config` (not `~/.cache`), and is only refreshed when you press Fetch manually.

## Credits

- Sunrise/sunset times provided by the free [sunrise-sunset.org](https://sunrise-sunset.org/) API.
- IP geolocation by [ip-api.com](https://ip-api.com/).

## License

GPLv2-only. Copyright (C) 2026 Danilo M. <danix@danix.xyz>. See [LICENSE](LICENSE).

## Development Approach

This project is developed using AI-assisted tools. Code is generated with the help of AI based on human-provided specifications, design decisions, and iterative feedback.

All contributions are reviewed, tested, and curated by the maintainer before being included in the codebase. AI is used as a productivity and exploration tool, while human oversight remains central to all decisions.

The goal is to combine the flexibility of AI-assisted development with standard open-source practices such as transparency, review, and accountability.
