From 2d1d364270264d3eac2e176f7e09bc8cc58d89ad Mon Sep 17 00:00:00 2001 From: nevaforget Date: Sat, 28 Mar 2026 09:53:10 +0100 Subject: [PATCH] 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. --- README.md | 48 ++++++++++++++++++++++----------------------- config/moonset.toml | 6 +++--- journal.md | 38 ----------------------------------- 3 files changed, 27 insertions(+), 65 deletions(-) delete mode 100644 journal.md diff --git a/README.md b/README.md index 0877e41..b9e8204 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ # 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** ## Features -- Rust + gtk4-rs + gtk4-layer-shell (OVERLAY Layer — über Waybar) -- Catppuccin Mocha Theme -- Multi-Monitor-Support (Wallpaper auf Sekundärmonitoren) -- Inline-Confirmation für destruktive Aktionen -- Escape oder Hintergrund-Klick zum Schließen -- DE/EN Lokalisierung -- Konfigurierbare Wallpaper (TOML) +- Rust + gtk4-rs + gtk4-layer-shell (OVERLAY layer — above Waybar) +- Catppuccin Mocha theme +- Multi-monitor support (wallpaper on secondary monitors) +- Inline confirmation for destructive actions +- Escape or background click to dismiss +- DE/EN localization +- Configurable wallpaper (TOML) ## Installation @@ -22,48 +22,48 @@ cargo build --release install -Dm755 target/release/moonset /usr/bin/moonset ``` -Oder via PKGBUILD: +Or via PKGBUILD: ```bash cd pkg && makepkg -si ``` -## Verwendung +## Usage ```bash -# Direkt starten +# Launch directly moonset -# Per Niri-Keybind (in ~/.config/niri/config.kdl) +# Via Niri keybind (in ~/.config/niri/config.kdl) # binds { # 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 -# Pfad zum Hintergrundbild (optional) +# Path to background image (optional) 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 # Tests cargo test -# Release-Build +# Release build cargo build --release ``` -## Teil des Moonarch-Ökosystems +## Part of the Moonarch ecosystem -- **moonarch** — Reproduzierbares Arch-Linux-Setup -- **moongreet** — greetd Greeter für Wayland -- **moonlock** — Wayland Lockscreen -- **moonset** — Session Power Menu +- **moonarch** — Reproducible Arch Linux setup +- **moongreet** — greetd greeter for Wayland +- **moonlock** — Wayland lockscreen +- **moonset** — Session power menu diff --git a/config/moonset.toml b/config/moonset.toml index fe03dc6..0a2206a 100644 --- a/config/moonset.toml +++ b/config/moonset.toml @@ -1,6 +1,6 @@ # 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) -# Fallback-Reihenfolge: config → /usr/share/moonarch/wallpaper.jpg → Package-Wallpaper +# Path to background image (optional) +# Fallback order: config → /usr/share/moonarch/wallpaper.jpg → bundled package wallpaper # background_path = "/usr/share/moonarch/wallpaper.jpg" diff --git a/journal.md b/journal.md deleted file mode 100644 index b857c9d..0000000 --- a/journal.md +++ /dev/null @@ -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 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