11 Commits
Author SHA1 Message Date
Asger Geel Weirsøe a4b6297156 Make the update check optional and harden the legacy paths
The Gitea update check is now the default feature update-check of
ahfail-ui; distro builds drop it, and the HTTP client with it.
ahfail-display refuses to run as root and keeps its lock file in
XDG_RUNTIME_DIR instead of a fixed name in the shared /tmp, and the PAM
module no longer spawns it from a root context such as a greeter.
Removes pam_tests.rs, which tested helpers dropped in v0.9.0 and has not
compiled since.

Claude-Session: https://claude.ai/code/session_012LCTmU2ewo8tnM1dByYAoG
2026-09-30 19:18:21 +02:00
Asger Geel Weirsøe 37e6c36aee Add ahfail, a screen locker of its own
ahfail locks the screen itself instead of hooking another locker: Wayland
through ext-session-lock-v1 (gtk-session-lock), X11 through an input grab.
It authenticates against its own PAM service, /etc/pam.d/ahfail, so a
package never has to edit another package's PAM file.

One command for every platform: ahfail (lock), ahfail test (the effect
without locking) and ahfail doctor (what is missing, with the fix).
Enter is handled directly and the entry uses no input method, since the
Wayland text-input IM swallowed Return. Sprites avoid the password box
in window coordinates, and placement gets 100 tries instead of 10.

Claude-Session: https://claude.ai/code/session_012LCTmU2ewo8tnM1dByYAoG
2026-09-30 19:18:21 +02:00
Asger Geel WeirsøeandClaude Sonnet 4.6 18c5c05be1 release: v0.9.0 pre-release — X11 PAM integration, shadow suppression, macOS cfg guards
- PAM module now correctly fires on failed attempts (must precede auth includes)
- ahfail-display: sprite-sized window replaces full-screen overlay
- ahfail-display: XGrabKeyboard unlock detection replaces process scanning
- ahfail-display: _COMPTON_SHADOW=0 suppresses picom shadow without config changes
- ahfail-display: flock single-instance guard prevents stacking on rapid failures
- X11-specific code guarded behind #[cfg(target_os = "linux")] for macOS builds
- Removed debug logging (dlog/plog) from display and PAM binaries
- README: PAM ordering requirement, supported locker table, roadmap section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 21:35:12 +02:00
Asger Geel WeirsøeandClaude Sonnet 4.6 ad7d55f804 fix: PID-based volume lock with state persistence and multiarch default path
Volume lock file now stores {pid}:{volume}:{muted} instead of "1":
- Allows recovery of saved volume state if the holder is SIGKILLed
- On stale lock detection (holder PID not alive), inherit saved volume state
  and take ownership — prevents permanent volume loss and infinite lockout

PAM module DEFAULT_PATH now baked in at build time via AHFAIL_LIBDIR env var
passed by Meson, fixing the wrong path on multiarch Debian/Ubuntu where libdir
is /usr/lib/x86_64-linux-gnu rather than /usr/lib.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 19:38:33 +02:00
Asger Geel Weirsøe 1fbe87ab2a fix: update check — handle spaced JSON, move cache touch after HTTP success, add timeouts and multi-monitor guard 2026-05-06 19:28:07 +02:00
Asger Geel WeirsøeandClaude Sonnet 4.6 40902cdd88 feat: add rate-limited update check with desktop notification
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 19:03:59 +02:00
Asger Geel Weirsøe 1df9fb1aec fix: remove redundant volume_state=None, improve pactl volume parser for stereo sinks 2026-05-06 19:03:38 +02:00
Asger Geel WeirsøeandClaude Sonnet 4.6 ed2ab3d7d5 feat: add volume save/restore on failure/unload
On the first failed unlock attempt, save the current system volume and
mute state then set volume to maximum unmuted; restore on g_module_unload.
A lock file under XDG_RUNTIME_DIR prevents double-acquisition when
multiple gtklock windows are active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 19:03:05 +02:00
Asger Geel WeirsøeandClaude Sonnet 4.6 14190c7e33 fix: image.show(), private ahfail_get_resource, saturating_sub in display
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 18:59:47 +02:00
Asger Geel WeirsøeandClaude Sonnet 4.6 d53c598776 feat: add ahfail-ui crate with animation, audio, display, config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 18:58:22 +02:00
Asger Geel WeirsøeandClaude Sonnet 4.6 01bc34e54e refactor: convert to Cargo workspace, move gtklock crate
Replaces the single-crate Cargo.toml with a workspace containing
ahfail-gtklock (migrated from root src/) and three stub crates
(ahfail-ui, ahfail-pam, ahfail-display). Updates meson.build to
build with -p ahfail-gtklock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 20:24:53 +02:00