45 Commits

Author SHA1 Message Date
0789e8fc27 fix: audit MEDIUM fixes — timeout guard, POSIX locale, button gate, wallpaper allowlist (v0.8.4)
- power: RAII DoneGuard sets done=true on every wait() exit path, so the
  timeout thread no longer sleeps its full 30 s holding a spawn_blocking
  slot when child.wait() errors. A separate timed_out AtomicBool marks
  our own SIGKILL so we do not misclassify an external OOM-kill. Memory
  ordering on the flags is now Release/Acquire.
- i18n: detect_locale now reads LC_ALL, LC_MESSAGES, LANG in POSIX
  priority order before falling back to /etc/locale.conf, so systems
  installed in English with LC_ALL=de_DE.UTF-8 pick up the correct UI.
- panel: execute_action desensitizes button_box on entry and re-enables
  it on error paths, so double-click or keyboard repeat cannot fire the
  same power action twice.
- config: accept_wallpaper helper applies an extension allowlist (jpg,
  jpeg, png, webp) plus symlink rejection and a 10 MB size cap, applied
  to both the user-configured path and the Moonarch ecosystem fallback.
  Bounds worst-case decode latency and narrows the gdk-pixbuf parser
  attack surface.
v0.8.4
2026-04-24 13:49:48 +02:00
13b5ac1704 fix: audit fix — avoid latent stdout pipe deadlock in run_command (v0.8.3)
Piping stdout without draining while blocking in child.wait() risks deadlock
if a command writes more than one OS pipe buffer (~64 KB on Linux). Current
callers (systemctl, niri msg, loginctl) stay well under that, but the
structure was fragile. stdout is now discarded; stderr continues to be
captured for error reporting.
v0.8.3
2026-04-24 13:01:48 +02:00
a47fdff1dd docs: drop Hekate persona, unify attribution on ClaudeCode
Remove the Hekate persona block from CLAUDE.md and rewrite prior
DECISIONS entries from Hekate and leftover Ragnar to ClaudeCode
for consistency with the rest of the ecosystem.
2026-04-21 09:03:22 +02:00
d030f1360a fix: restore keyboard focus on action buttons after dismiss (v0.8.2)
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
After cancelling a confirmation prompt, the focused widget was removed
from the tree without restoring focus to the action buttons. With
layer-shell exclusive keyboard mode, GTK does not recover focus
automatically — the UI became keyboard-unreachable.
v0.8.2
2026-04-06 22:36:36 +02:00
e97535e41b Remove unnecessary pacman git install from CI workflow
Git is already available in the runner image.
2026-04-02 08:28:08 +02:00
b518572d0f Revert CI workaround: remove pacman install step
Some checks failed
Update PKGBUILD version / update-pkgver (push) Failing after 0s
The act_runner now uses a custom Arch-based image with git
pre-installed, so per-workflow installs are no longer needed.
2026-04-01 16:17:48 +02:00
b3ed7fb292 chore: update Cargo.lock for v0.8.1
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
2026-03-31 12:53:20 +02:00
358c228645 fix: audit fixes — release profile, GResource compression, lock stderr, sync markers (v0.8.1)
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 1s
- Add [profile.release] with LTO, codegen-units=1, strip
- Add compressed="true" to GResource CSS/SVG entries
- Inherit moonlock stderr instead of /dev/null (errors visible in journal)
- Add SYNC comments to duplicated blur/background functions
2026-03-31 11:08:43 +02:00
a4564f2b71 docs: add v0.8.0 changelog entry, fix build.rs comment
CHANGELOG was missing the v0.8.0 entry (symlink-safe avatars, blur
downscale + padding fix, config validation). build.rs comment still
referenced removed wallpaper.jpg.
2026-03-31 09:36:01 +02:00
8aca2bf331 fix: audit fixes — symlink-safe avatars, blur downscale + padding, config validation (v0.8.0)
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
- Replace canonicalize() with symlink_metadata + is_file + !is_symlink for avatar
  lookup (prevents symlink traversal to arbitrary files)
- Fix blur padding offset from (0,0) to (-pad,-pad) to prevent edge darkening
- Add MAX_BLUR_DIMENSION (1920px) downscale before GPU blur
- Validate blur per config source (invalid user value preserves system default)
- Wallpaper: use symlink_metadata + is_file + !is_symlink in resolve_background_path
v0.8.0
2026-03-30 16:08:50 +02:00
f01c6bd25d ci: also update .SRCINFO in pkgver workflow
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 1s
paru reads .SRCINFO (not PKGBUILD) for version comparison during
sysupgrade. Without updating .SRCINFO, paru never detects upgrades
for PKGBUILD repository packages.
2026-03-30 13:49:16 +02:00
7cd1f8cb6d ci: replace actions/checkout with plain git clone (no node needed)
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
2026-03-29 23:02:58 +02:00
c22bc5bca1 ci: use moonarch runner label instead of ubuntu-latest
Some checks failed
Update PKGBUILD version / update-pkgver (push) Failing after 18s
2026-03-29 23:02:09 +02:00
069387761b ci: add workflow to auto-update pkgver in moonarch-pkgbuilds
Some checks failed
Update PKGBUILD version / update-pkgver (push) Failing after 1m23s
2026-03-29 22:55:48 +02:00
e59ed53d7a fix: use systemctl for reboot/shutdown — loginctl lacks these verbs (v0.7.3) 2026-03-29 18:59:00 +02:00
2ca572773e fix: elevate CSS priority to override GTK4 user theme (v0.7.2)
Colloid-Catppuccin theme loaded via ~/.config/gtk-4.0/gtk.css at
PRIORITY_USER (800) was overriding moonset's PRIORITY_APPLICATION (600),
causing action buttons to lose their circular border-radius.

- Use STYLE_PROVIDER_PRIORITY_USER for app CSS provider
- Replace border-radius: 50% with 9999px (GTK4 CSS percentage quirk)
v0.7.2
2026-03-29 14:23:33 +02:00
efc55aa372 fix: prevent edge darkening on GPU-blurred wallpaper (v0.7.1)
GskBlurNode samples pixels outside texture bounds as transparent,
causing visible darkening at wallpaper edges. Fix renders the texture
with 3x-sigma padding before blur, then clips back to original size.
2026-03-28 23:15:47 +01:00
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
71670eb263 feat: switch to systemd-journal-logger, add debug logging (v0.6.0)
Replace env_logger with systemd-journal-logger for consistent logging
across moonset/moonlock/moongreet. Add MOONSET_DEBUG env var and debug
statements across all modules. Also includes shared blur cache for
multi-monitor and detached moonlock spawn for lock action.
v0.6.0
2026-03-28 22:58:25 +01:00
14affb1533 perf: replace CPU blur with GPU blur via GskBlurNode (v0.5.0)
Replace image crate + disk cache blur with GPU-side GskBlurNode,
symmetric with moonlock and moongreet. Removes ~15 transitive
dependencies and ~160 lines of caching code. Blur now happens once
on the GPU at widget realization — zero startup latency, no cache
management needed.
2026-03-28 22:35:18 +01:00
4d8e306b74 feat: add fade-out animation on dismiss for smooth visual exit
Without this, app.quit() destroys windows instantly, creating a jarring
pop-out. Now all windows fade out over 250ms (matching the fade-in)
before the app exits. Uses the same CSS opacity transition — just
removes the "visible" class and defers quit via glib timeout.
2026-03-28 21:50:03 +01:00
2e88a9b6c4 feat: activate fade-in animation for panel and wallpaper windows
The Rust code already adds a "visible" CSS class on map, but the
stylesheet had no corresponding opacity transition. Add 250ms ease-in
fade via GPU-accelerated CSS opacity to eliminate the visual pop-in.
2026-03-28 21:46:08 +01:00
412ed159a4 fix: address audit findings — blur channel mismatch, logout quit, config error logging
- Fix BGRA→RGBA channel swap in apply_blur so image::RgbaImage semantics
  match the actual pixel data from GDK texture download
- Logout now calls app.quit() like lock does, via new quit_after field on
  ActionDef (replaces fragile magic string comparison)
- Log TOML parse errors to stderr instead of silently ignoring
- Remove pointless zlib compression of JPEG wallpaper in GResource
- Add tests for quit_after behavior and config error handling
2026-03-28 21:39:34 +01:00
478caed8e0 perf: cache blurred wallpaper to disk to avoid re-blur on startup
First launch with blur blurs and saves to ~/.cache/moonset/. Subsequent
starts load the cached PNG directly (~9x faster). Cache invalidates
when wallpaper path, size, mtime, or sigma changes.
2026-03-28 21:22:48 +01:00
622b06da3f chore: bump version to 0.4.0 v0.4.0 2026-03-28 14:55:17 +01:00
529a1a54ae feat: add optional background blur via image crate
Gaussian blur applied at texture load time when `background_blur` is
set in moonset.toml. Blur runs once, result is shared across monitors.
2026-03-28 14:53:04 +01:00
473bed479a docs: add CHANGELOG.md, DECISIONS.md, bump version to 0.1.1
Add CHANGELOG documenting all changes since 0.1.0 and the initial
release. Add DECISIONS.md as an architectural decision log. Update
CLAUDE.md to reflect current architecture. Bump to 0.1.1 for the
security and correctness fixes in the previous commit.
2026-03-28 10:17:22 +01:00
496a7a4c72 fix: address audit findings — security, performance, and correctness
- Use absolute paths for all binaries in power.rs to prevent PATH hijacking
- Implement POWER_TIMEOUT via try_wait() polling (was declared but unused)
- Fix potential panic in load_background_texture when GResource path
  fails to_str() — now falls back to known wallpaper resource path
- Compress wallpaper.jpg in GResource bundle (saves ~374 KB in binary)
- Merge double idle_add_local_once into single cycle for faster focus
- Centralize GRESOURCE_PREFIX as pub(crate) const in main.rs
- Fix fallback user UID from 0 (root) to u32::MAX
- Fix CSS comment: "square card" → "circular card" (border-radius: 50%)
2026-03-28 10:13:18 +01:00
2d1d364270 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.
2026-03-28 09:53:10 +01:00
b22172c3a0 perf: optimize startup by caching icons, texture, and async avatar
- Replace manual icon theme lookup + Pixbuf scaling with native
  GTK4 Image::from_icon_name() (uses internal cache + GPU rendering)
- Decode wallpaper texture once and share across all windows
  instead of N+1 separate JPEG decodes
- Load file-based avatars asynchronously via gio::spawn_blocking
  to avoid blocking the UI thread
2026-03-28 09:47:47 +01:00
d6979c1792 chore: remove Python implementation and build config
Rust rewrite provides full feature parity. Python sources,
tests, pyproject.toml, and uv.lock are no longer needed.
v0.3.0
2026-03-27 16:11:54 +01:00
c2e3077159 merge: rust-rewrite branch into main 2026-03-27 16:10:41 +01:00
e66ef76b4d feat: rewrite moonset in Rust (gtk4-rs + gtk4-layer-shell)
Feature-parity with Python v0.2.0. Same CSS, same UI, same actions.
Single 3.1 MB binary with embedded resources (CSS, wallpaper, avatar).

Modules: power.rs, i18n.rs, config.rs, users.rs, panel.rs, main.rs
45 unit tests passing. Python sources retained as reference.
2026-03-27 16:09:51 +01:00
9deaaacc33 chore: remove social.md 2026-03-27 15:25:11 +01:00
270689a5c5 docs: update journal and social for v0.2.0 2026-03-27 15:23:31 +01:00
fa8dceb514 release: v0.2.0
- User avatar and username display above action buttons
- Panel on focused monitor, wallpaper overlay on all others
- Keyboard exclusive on focused monitor, Escape to dismiss
- Lock action calls moonlock directly
- GTK theme colors (@theme_*) for consistent styling
- Round action buttons, translucent card backgrounds
- 22px icon lookup rendered at 64px (matches moonlock icons)
- PKGBUILD for Arch Linux packaging
- 63 tests passing
v0.2.0
2026-03-27 15:22:33 +01:00
934a92384c fix: lock action calls moonlock directly instead of loginctl
loginctl lock-session requires a D-Bus listener that is
difficult to set up reliably. Direct moonlock invocation
is simpler and works immediately.
Also removes CSS fade-in animation (low-fps on layer shell).
2026-03-27 15:12:56 +01:00
004e3d2855 feat: fade-in animation, PKGBUILD for system installation
- CSS opacity transition (350ms ease-in) for panel and wallpaper
- PKGBUILD for makepkg/pacman installation
- .gitignore for makepkg build artifacts
2026-03-27 14:46:06 +01:00
63bd7cfea9 feat: panel on focused monitor, wallpaper on all others
Panel without set_monitor so compositor places it on focused output.
Wallpaper windows on TOP layer on all monitors (below OVERLAY panel).
Transparent confirmation dialog background.
2026-03-27 14:35:40 +01:00
e6de12ea4b feat: add user avatar and username, match moonlock icon style
- Add users.py with avatar detection (pwd, AccountsService, ~/.face)
- Display avatar + username above action buttons
- Look up 22px icon variant (same as moonlock) and render at 64px
- Round action buttons (border-radius 50%)
- 9 new tests for user/avatar detection (63 total)
2026-03-27 14:30:17 +01:00
467c022525 fix: panel on all monitors with keyboard exclusive
Instead of guessing the primary monitor (unreliable on Niri),
show the panel with action buttons on every monitor. All get
keyboard exclusive so the focused monitor captures input.
Also set exclusive_zone -1 to overlay Waybar, and delay
initial focus grab via GLib.idle_add for layer shell readiness.
2026-03-27 14:13:32 +01:00
2e359f358d fix: use GTK theme colors, translucent cards, focus confirm on keyboard
- Replace hardcoded colors with @theme_* variables for consistency
- Card backgrounds use alpha for subtle translucency over wallpaper
- Confirmation dialog grabs focus on "No" button for safe keyboard nav
2026-03-27 14:02:11 +01:00
e770a40beb fix: center button content vertically for square appearance
Reduce icon-label spacing and vertically center the content box
inside action buttons so they appear visually square.
2026-03-27 13:57:16 +01:00
1251fe8ef4 feat: auto-reexec with LD_PRELOAD for gtk4-layer-shell
Same pattern as moonlock — re-exec the process with LD_PRELOAD
set so gtk4-layer-shell is loaded before libwayland-client.
Skipped during tests via pytest/unittest module detection.
2026-03-27 13:54:32 +01:00
4cad984263 feat: initial moonset implementation — Wayland session power menu v0.1.0
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.
v0.1.0
2026-03-27 13:47:03 +01:00