5 Power-Aktionen (lock, logout, hibernate, reboot, shutdown), GTK4 + Layer Shell UI mit Catppuccin Mocha Theme, Multi-Monitor-Support, Inline-Confirmation, DE/EN i18n, TOML-Config mit Wallpaper-Fallback. 54 Tests grün.
1.6 KiB
1.6 KiB
Moonset
Name: Hekate (Göttin der Wegkreuzungen — passend zum Power-Menu, das den Weg der Session bestimmt)
Projekt
Moonset ist ein Wayland Session Power Menu, gebaut mit Python + GTK4 + gtk4-layer-shell. Teil des Moonarch-Ökosystems. Per Keybind aufrufbares Overlay mit 5 Aktionen: Lock, Logout, Hibernate, Reboot, Shutdown.
Tech-Stack
- Python 3.11+, PyGObject (GTK 4.0)
- gtk4-layer-shell für Wayland Layer Shell (OVERLAY Layer)
- pytest für Tests
Projektstruktur
src/moonset/— Quellcodesrc/moonset/data/— Package-Assets (Fallback-Wallpaper)tests/— pytest Testsconfig/— Beispiel-Konfigurationsdateien
Kommandos
# Tests ausführen
uv run pytest tests/ -v
# Typ-Checks
uv run pyright src/
# Power-Menu starten (in Niri-Session)
uv run moonset
Architektur
power.py— 5 Power-Action-Wrapper (lock, logout, hibernate, reboot, shutdown)i18n.py— Locale-Erkennung und String-Tabellen (DE/EN)config.py— TOML-Config + Wallpaper-Fallbackpanel.py— GTK4 UI (Action-Buttons, Inline-Confirmation, WallpaperWindow)main.py— Entry Point, GTK App, Layer Shell Setup, Multi-Monitorstyle.css— Catppuccin Mocha Theme
Design Decisions
- OVERLAY statt TOP Layer: Waybar liegt auf TOP, moonset muss darüber
- Niri-spezifischer Logout (
niri msg action quit): Moonarch setzt fest auf Niri - Einmal-Start per Keybind: Kein Daemon, GTK
application_idverhindert Doppelstart - System-Icons: Adwaita/Catppuccin liefern alle benötigten symbolischen Icons
- Lock ohne Confirmation: Lock ist sofort reversibel, braucht kein Confirm