7dae48f6cc
Default `loginctl terminate-session $XDG_SESSION_ID`; `logout_command` TOML override for other compositors.
30 lines
1.1 KiB
Markdown
30 lines
1.1 KiB
Markdown
# Moonset
|
|
|
|
Wayland session power menu, part of the Moonarch ecosystem.
|
|
Keybind-invoked overlay with 5 actions: Lock, Logout, Hibernate, Reboot, Shutdown.
|
|
|
|
Stack: Rust / gtk4-rs / gtk4-layer-shell (OVERLAY layer). Versions live in `Cargo.toml`.
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
cargo test # unit tests
|
|
cargo build --release # release build
|
|
LD_PRELOAD=/usr/lib/libgtk4-layer-shell.so ./target/release/moonset # run (in Niri)
|
|
```
|
|
|
|
## Source (`src/`)
|
|
|
|
- `main.rs` — entry point, GTK app, Layer Shell, multi-monitor, journal logging (`MOONSET_DEBUG`), `GRESOURCE_PREFIX`
|
|
- `power.rs` — 5 power-action wrappers (absolute paths, 30s timeout)
|
|
- `panel.rs` — GTK4 UI (action buttons, inline confirmation, WallpaperWindow)
|
|
- `users.rs` — user detection, avatar loading (AccountsService, ~/.face, GResource fallback)
|
|
- `config.rs` — TOML config + wallpaper fallback
|
|
- `i18n.rs` — locale detection, DE/EN string tables
|
|
|
|
`resources/` holds the GResource bundle (style.css, default-avatar.svg); `config/` holds example configs.
|
|
|
|
## Decisions
|
|
|
|
See `DECISIONS.md` for the full decision log (layer choice, Niri logout, async power actions, journal logging, …).
|