Commit Graph

19 Commits

Author SHA1 Message Date
jory 016038aca0 feat: full password editing with cursor navigation
- Add arrow key support (Left/Right/Home/End) for cursor movement
- Add Delete key to remove character at cursor position
- Render cursor between password dots with visual indicator
- Modularize render.rs into separate modules (indicator, media_bar, status_bar, feedback)
- Add cubic ease-in-out for fade-in animation
- Optimize media_rects to use &'static str instead of String allocations
2026-04-11 15:43:11 +02:00
jory 07d1921bd3 Merge pull request #1 from taladar/fixes_niri
Fix rustlock interaction with niri compositor
2026-04-11 13:13:28 +02:00
jory 49438ecd62 Refactor: curve password text and small change
Code Quality / quality-checks (push) Has been cancelled
Curve password text around the circle instead of straight dots
Cleared text is displayed on top of the circle instead of in the middle
2026-04-10 13:34:18 +02:00
jory fbd7aee9d2 feat: add cli option and ctrl+u clears password
Code Quality / quality-checks (push) Has been cancelled
Security Scan / security-audit (push) Has been cancelled
- Add `--hide-password` CLI flag
- Show temporary "CLEARED" feedback on password clear
2026-04-10 12:59:39 +02:00
Matthias Hörmann f8c4381a11 fix: handle dynamic output changes while session is locked
When monitors are powered off (e.g. via niri power-off-monitors or
physical power switches), niri destroys and re-advertises the Wayland
outputs as they come back. Previously all three OutputHandler callbacks
were no-ops, causing two bugs:

- new_output: no lock surface was created for outputs that appeared
  after the initial lock, so the slowest monitor to wake up would show
  the compositor's red fallback instead of the lock screen.
- output_destroyed: stale LockedSurface, SessionLockSurface, output,
  and captured_background entries accumulated for gone outputs.

Fix new_output to create a lock surface (and register it with the lock
manager) whenever a new output appears while the session is locked.

Fix output_destroyed to remove the corresponding entries from
lock_surfaces, lock_manager.surfaces, outputs, and
captured_backgrounds, keeping all parallel vecs in sync. Add
LockManager::remove_surface_by_output to support this, returning the
removal index so lock_surfaces can be updated with the same index.

The all-monitors-off scenario (all outputs destroyed simultaneously)
is handled naturally: the vecs are emptied and repopulated as each
monitor fires new_output on wake.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 12:57:20 +01:00
jory 20cc6e210e Fix all warnings previously generated by clippy 2026-03-17 20:24:12 +01:00
jory 446426ea47 Fix formatting 2026-03-17 19:26:42 +01:00
jory 0309522e25 Add caps lock indicator and keyboard layout support
CI / build-ubuntu (, default) (push) Has been cancelled
CI / build-ubuntu (--features networking, networking) (push) Has been cancelled
CI / build-ubuntu (--no-default-features, no-default-features) (push) Has been cancelled
CI / build-debian (push) Has been cancelled
CI / build-fedora (push) Has been cancelled
CI / build-arch (push) Has been cancelled
CI / build-opensuse (push) Has been cancelled
- Add caps lock ring color change when caps lock is enabled (matching swaylock-effects)
- Add configurable caps lock colors: ring, text, key highlight, backspace highlight
- Add show_caps_lock_text config option (enabled by default)
- Add keyboard layout display with show_keyboard_layout option (disabled by default)
- Change keyboard_layout from u32 to String for proper display
- Add rust-cache to CI and dbus-1-dev dependency
2026-03-16 17:32:54 +01:00
jory 5e47f8a69c Added capslock functionality
Added keyboard layout func
2026-03-16 15:10:23 +01:00
jory f489a6e46e feat: Add a lot more features
CI / build-ubuntu (, default) (push) Has been cancelled
CI / build-ubuntu (--features networking, networking) (push) Has been cancelled
CI / build-ubuntu (--no-default-features, no-default-features) (push) Has been cancelled
CI / build-debian (push) Has been cancelled
CI / build-fedora (push) Has been cancelled
CI / build-arch (push) Has been cancelled
CI / build-opensuse (push) Has been cancelled
- Add new system.rs module for system monitoring via D-Bus:
  - Battery status (UPower)
  - Media player controls and metadata (MPRIS)
  - WiFi/Bluetooth status (NetworkManager)
  - Keyboard layout tracking
- Add media key support (XF86 Play/Pause/Next/Prev)
- Add function keys F1-F3 for Suspend/Reboot/PowerOff
- Replace deprecated timer.rs with async system management
- Add GitHub Actions CI/CD workflows (CI + Release)
- Update dependencies and add optional networking feature
2026-03-16 14:12:43 +01:00
jory 88f7833d8d First working version with all options except grace 2026-03-07 21:48:24 +01:00
jory 7cdcf19415 Add diagnostic logging to troubleshoot screenshot display issue 2026-03-06 22:08:38 +01:00
jory 5fe331122e Add comprehensive debug logging for screenshot rendering
- Timer callback: log each tick and commit status
- LockedSurface::update(): log background presence, fade alpha, feedback states
- Renderer::render(): log background drawing and fade alpha
- Ready event: log background set confirmation

These logs will help diagnose why screenshots are not displaying.
2026-03-06 21:41:15 +01:00
jory 8aa84209a8 Implement working screenshot capture with wlr-screencopy
- Fixed brace mismatch and duplicate code in screenshot.rs
- Increased SHM pool size to 256MB for high-res displays
- Corrected wlr-screencopy protocol usage: send copy request in Buffer event
- Fixed background handling: set_background now updates LockedSurface.background
- Removed dummy background creation; screenshots set when ready
- Added format conversion for Xbgr8888 and Xrgb8888 to ARGB32
- Proper Y-inversion handling based on flags

The lock screen now displays captured screenshots as background.
Screenshots are taken immediately after lock, before UI is shown.
Matches swaylock-effects behavior: lock appears first, then screenshot
applies when ready (no blocking).

Fixes: black/red screen issues, screenshot not displaying.
2026-03-06 21:21:47 +01:00
jory bd6f1df391 Apply suggestions by rust 2026-03-05 15:02:45 +01:00
jory e440a86d97 Made sure we can actually render UI elements 2026-03-05 14:50:59 +01:00
jory 76b48f7c70 First propper working version with actual pam 2026-03-05 14:19:08 +01:00
jory 9daa2fdd8f Removed control+c behaviour and updated keyboard handler and pam auth 2026-03-05 11:55:29 +01:00
jory a33488adc6 Initial commit of an attempt of making my own wayland locker like swaylock 2026-03-05 10:45:41 +01:00