i18n: migrate German text to English, remove stale journal

Translate README.md and config/moonset.toml comments from German
to English to enforce the repo language policy. Remove journal.md
as it was a one-time snapshot, not an actively maintained document.
This commit is contained in:
nevaforget 2026-03-28 09:53:10 +01:00
parent b22172c3a0
commit 2d1d364270
3 changed files with 27 additions and 65 deletions

View File

@ -1,19 +1,19 @@
# Moonset # Moonset
Wayland Session Power Menu für das Moonarch-Ökosystem. Wayland Session Power Menu for the Moonarch ecosystem.
Per Keybind aufrufbares Fullscreen-Overlay mit 5 Aktionen: A fullscreen overlay triggered by keybind with 5 actions:
**Lock** · **Logout** · **Hibernate** · **Reboot** · **Shutdown** **Lock** · **Logout** · **Hibernate** · **Reboot** · **Shutdown**
## Features ## Features
- Rust + gtk4-rs + gtk4-layer-shell (OVERLAY Layer — über Waybar) - Rust + gtk4-rs + gtk4-layer-shell (OVERLAY layer — above Waybar)
- Catppuccin Mocha Theme - Catppuccin Mocha theme
- Multi-Monitor-Support (Wallpaper auf Sekundärmonitoren) - Multi-monitor support (wallpaper on secondary monitors)
- Inline-Confirmation für destruktive Aktionen - Inline confirmation for destructive actions
- Escape oder Hintergrund-Klick zum Schließen - Escape or background click to dismiss
- DE/EN Lokalisierung - DE/EN localization
- Konfigurierbare Wallpaper (TOML) - Configurable wallpaper (TOML)
## Installation ## Installation
@ -22,48 +22,48 @@ cargo build --release
install -Dm755 target/release/moonset /usr/bin/moonset install -Dm755 target/release/moonset /usr/bin/moonset
``` ```
Oder via PKGBUILD: Or via PKGBUILD:
```bash ```bash
cd pkg && makepkg -si cd pkg && makepkg -si
``` ```
## Verwendung ## Usage
```bash ```bash
# Direkt starten # Launch directly
moonset moonset
# Per Niri-Keybind (in ~/.config/niri/config.kdl) # Via Niri keybind (in ~/.config/niri/config.kdl)
# binds { # binds {
# Mod+Escape { spawn "moonset"; } # Mod+Escape { spawn "moonset"; }
# } # }
``` ```
## Konfiguration ## Configuration
Konfigurationsdatei: `~/.config/moonset/moonset.toml` oder `/etc/moonset/moonset.toml` Config file: `~/.config/moonset/moonset.toml` or `/etc/moonset/moonset.toml`
```toml ```toml
# Pfad zum Hintergrundbild (optional) # Path to background image (optional)
background_path = "/usr/share/moonarch/wallpaper.jpg" background_path = "/usr/share/moonarch/wallpaper.jpg"
``` ```
Wallpaper-Fallback: Konfiguration → `/usr/share/moonarch/wallpaper.jpg` → eingebettetes Package-Wallpaper Wallpaper fallback: config → `/usr/share/moonarch/wallpaper.jpg` → bundled package wallpaper
## Entwicklung ## Development
```bash ```bash
# Tests # Tests
cargo test cargo test
# Release-Build # Release build
cargo build --release cargo build --release
``` ```
## Teil des Moonarch-Ökosystems ## Part of the Moonarch ecosystem
- **moonarch** — Reproduzierbares Arch-Linux-Setup - **moonarch** — Reproducible Arch Linux setup
- **moongreet** — greetd Greeter für Wayland - **moongreet** — greetd greeter for Wayland
- **moonlock** — Wayland Lockscreen - **moonlock** — Wayland lockscreen
- **moonset** — Session Power Menu - **moonset** — Session power menu

View File

@ -1,6 +1,6 @@
# Moonset — Wayland Session Power Menu # Moonset — Wayland Session Power Menu
# Konfigurationsdatei: ~/.config/moonset/moonset.toml oder /etc/moonset/moonset.toml # Config file: ~/.config/moonset/moonset.toml or /etc/moonset/moonset.toml
# Pfad zum Hintergrundbild (optional) # Path to background image (optional)
# Fallback-Reihenfolge: config → /usr/share/moonarch/wallpaper.jpg → Package-Wallpaper # Fallback order: config → /usr/share/moonarch/wallpaper.jpg → bundled package wallpaper
# background_path = "/usr/share/moonarch/wallpaper.jpg" # background_path = "/usr/share/moonarch/wallpaper.jpg"

View File

@ -1,38 +0,0 @@
# Hekate — Journal
## 2026-03-27 — Rust Rewrite
Rewrite von Python auf Rust (gtk4-rs + gtk4-layer-shell). Motivation: ~800ms Startzeit der Python-Version durch Interpreter-Overhead.
Alle Module 1:1 portiert:
- `power.rs` — Command::new statt subprocess.run, PowerError enum statt Exceptions
- `i18n.rs` — Static Strings statt Dataclass, parse_lang_prefix() separat testbar (kein env::set_var nötig)
- `config.rs` — serde::Deserialize für TOML, GResource-Pfad als letzter Fallback
- `users.rs` — nix-crate für getuid/getpwuid, GResource-Pfad für default-avatar
- `panel.rs` — Freie Funktionen statt Klassen, Rc<RefCell> für Confirm-State, glib::spawn_future_local + gio::spawn_blocking für async Power-Actions
- `main.rs` — GResource-Registration, LayerShell trait statt Gtk4LayerShell-Modul
45 Unit-Tests grün. Release-Binary: 3.1 MB.
Gelernt:
- gtk4-rs 0.11 braucht Rust ≥1.92 (system hatte 1.91 → rustup update)
- `ContentFit` und `Widget::color()` brauchen Feature-Flags (`v4_8`, `v4_10`)
- GTK-Objekte (WeakRef) sind nicht Send → glib::spawn_future_local statt std::thread für UI-Updates
- `set_from_paintable` heißt jetzt `set_paintable` in gtk4-rs 0.11
- GResource-Bundle kompiliert CSS/Wallpaper/Avatar in die Binary — kein importlib.resources mehr nötig
## 2026-03-27 — Initiale Python-Version
Erster Tag. Moonset von Null auf v0.1.0 gebracht. TDD durchgezogen — alle 54 Tests grün, bevor der erste manuelle Start passiert ist. Das Pattern aus moongreet/moonlock hat sich bewährt: power.py, i18n.py, config.py sind fast 1:1 übernommen, nur mit den 5 Aktionen erweitert.
Layer Shell brauchte `LD_PRELOAD` — selbes Thema wie bei moongreet. GI-Import allein reicht nicht, weil die Linker-Reihenfolge stimmen muss. Erster Start ohne LD_PRELOAD gab die bekannten Warnings, mit LD_PRELOAD lief alles sauber: Overlay auf allen Monitoren, Escape schließt, Buttons da.
Designentscheidung: Lock ohne Confirmation, alles andere mit Inline-Confirm. Fühlt sich richtig an — Lock ist sofort reversibel, Shutdown nicht.
v0.2.0 direkt hinterher. Viel gelernt:
- `exclusive_zone = -1` ist Pflicht, sonst respektiert man Waybars Zone
- Monitor-Detection über `is_primary()` ist unzuverlässig auf Niri — stattdessen kein `set_monitor()` und den Compositor entscheiden lassen
- Icon-Theme-Lookup: 22px-Variante laden und per GdkPixbuf auf 64px skalieren, damit die gleichen Icons wie bei moonlock erscheinen
- CSS Fade-In Animationen auf Layer Shell Surfaces wirken ruckelig (wenige FPS) — rausgenommen
- `loginctl lock-session` braucht einen D-Bus-Listener der schwer aufzusetzen ist — moonlock direkt aufrufen ist einfacher und zuverlässiger
- LD_PRELOAD über den Niri-Keybind setzen spart den Reexec und damit ~1s Startzeit