18 Commits

Author SHA1 Message Date
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