nevaforget 5a6900e85a fix: address audit findings — polling, symlinks, validation, wallpaper removal (v0.7.0)
Three parallel audits (quality, performance, security) identified issues
across the codebase. This commit addresses all remaining findings:

- Replace busy-loop polling in run_command with child.wait() + timeout thread
- Canonicalize ~/.face and AccountsService avatar paths to prevent symlink abuse
- Add detect_locale_with() DI function for testable locale detection
- Move config I/O from activate() to main() to avoid blocking GTK main loop
- Validate background_blur range (0–200), reject invalid values with warning
- Remove embedded wallpaper from GResource — moonarch provides it via filesystem
  (binary size ~3.2MB → ~1.3MB)
2026-03-28 23:09:29 +01:00

Moonset

Wayland Session Power Menu for the Moonarch ecosystem.

A fullscreen overlay triggered by keybind with 5 actions: Lock · Logout · Hibernate · Reboot · Shutdown

Features

  • 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

cargo build --release
install -Dm755 target/release/moonset /usr/bin/moonset

Or via PKGBUILD:

cd pkg && makepkg -si

Usage

# Launch directly
moonset

# Via Niri keybind (in ~/.config/niri/config.kdl)
# binds {
#     Mod+Escape { spawn "moonset"; }
# }

Configuration

Config file: ~/.config/moonset/moonset.toml or /etc/moonset/moonset.toml

# Path to background image (optional)
background_path = "/usr/share/moonarch/wallpaper.jpg"

Wallpaper fallback: config → /usr/share/moonarch/wallpaper.jpg → bundled package wallpaper

Development

# Tests
cargo test

# Release build
cargo build --release

Part of the Moonarch ecosystem

  • moonarch — Reproducible Arch Linux setup
  • moongreet — greetd greeter for Wayland
  • moonlock — Wayland lockscreen
  • moonset — Session power menu
Description
No description provided
Readme 845 KiB
Languages
Rust 95%
CSS 3.6%
Shell 1.4%