Initial project setup with core modules
Moonlock lockscreen scaffolding: PAM auth (ctypes), fprintd D-Bus listener, i18n (DE/EN), user detection, power actions. 33 tests passing.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Moonlock
|
||||
|
||||
**Name**: Nyx (Göttin der Nacht — passend zum Lockscreen, der den Bildschirm verdunkelt)
|
||||
|
||||
## Projekt
|
||||
|
||||
Moonlock ist ein sicherer Wayland-Lockscreen, gebaut mit Python + GTK4 + ext-session-lock-v1.
|
||||
Teil des Moonarch-Ökosystems. Visuell und architektonisch inspiriert von Moongreet.
|
||||
|
||||
## Tech-Stack
|
||||
|
||||
- Python 3.11+, PyGObject (GTK 4.0)
|
||||
- Gtk4SessionLock (ext-session-lock-v1) für protokoll-garantiertes Screen-Locking
|
||||
- PAM-Authentifizierung via ctypes-Wrapper (libpam.so.0)
|
||||
- fprintd D-Bus Integration (Gio.DBusProxy) für Fingerabdruck-Unlock
|
||||
- pytest für Tests
|
||||
|
||||
## Projektstruktur
|
||||
|
||||
- `src/moonlock/` — Quellcode
|
||||
- `src/moonlock/data/` — Package-Assets (Default-Avatar, Icons)
|
||||
- `tests/` — pytest Tests
|
||||
- `config/` — Beispiel-Konfigurationsdateien
|
||||
|
||||
## Kommandos
|
||||
|
||||
```bash
|
||||
# Tests ausführen
|
||||
uv run pytest tests/ -v
|
||||
|
||||
# Typ-Checks
|
||||
uv run pyright src/
|
||||
|
||||
# Lockscreen starten (zum Testen)
|
||||
uv run moonlock
|
||||
```
|
||||
|
||||
## Architektur
|
||||
|
||||
- `auth.py` — PAM-Authentifizierung via ctypes (libpam.so.0)
|
||||
- `fingerprint.py` — fprintd D-Bus Listener (Gio.DBusProxy, async im GLib-Mainloop)
|
||||
- `users.py` — Aktuellen User ermitteln, Avatar laden
|
||||
- `power.py` — Reboot/Shutdown via loginctl
|
||||
- `i18n.py` — Locale-Erkennung und String-Tabellen (DE/EN)
|
||||
- `lockscreen.py` — GTK4 UI (Avatar, Passwort-Entry, Fingerprint-Indikator, Power-Buttons)
|
||||
- `main.py` — Entry Point, GTK App, Session Lock Setup (ext-session-lock-v1)
|
||||
|
||||
## Sicherheit
|
||||
|
||||
- ext-session-lock-v1 garantiert: Compositor sperrt alle Surfaces bei lock()
|
||||
- Bei Crash bleibt Screen schwarz (nicht offen)
|
||||
- Passwort wird nach Verwendung im Speicher überschrieben
|
||||
- Kein Schließen per Escape/Alt-F4 — nur durch erfolgreiche Auth
|
||||
Reference in New Issue
Block a user