2026-03-07 22:59:10 +01:00
2026-03-07 22:06:22 +01:00
2026-03-07 22:06:22 +01:00
2026-03-07 22:06:22 +01:00
2026-03-07 22:28:49 +01:00
2026-03-07 22:06:22 +01:00
2026-03-07 22:28:49 +01:00
2026-03-07 22:59:10 +01:00

🔒 RustLock

License Version Updated

A high-performance Wayland screen locker written in Rust, inspired by swaylock-effects.


Features

  • Performance: Written in safe Rust with minimal dependencies
  • 🎨 Visual Effects:
    • Gaussian blur (configurable radius and passes)
    • Vignette effect (configurable base and factor)
    • Smooth fade-in animation
  • 🔐 Password Indicator:
    • Circular ring with configurable radius and thickness
    • Dynamic key highlight segments that rotate with each keystroke
    • Customizable colors (ring, inside, separator, highlight)
  • 🕐 Information Display:
    • Centered clock (HH:MM format)
    • Full date
    • System uptime
  • 📸 Screenshot Support:
    • Captures desktop background before locking
    • Applies visual effects to background
  • 🔑 Authentication:
    • PAM-based authentication
    • Configurable grace period (any key press within N seconds unlocks without password)
  • 📝 Logging: Verbose debug logs written to ~/.rustlock.log

🚀 Usage

Basic Example

rustlock --screenshots --effect-blur 7x5 --effect-vignette 0.5:0.5

Full Configuration

rustlock \
    --screenshots \
    --clock \
    --indicator \
    --indicator-radius 100 \
    --indicator-thickness 7 \
    --effect-blur 7x5 \
    --effect-vignette 0.5:0.5 \
    --ring-color 785412 \
    --key-hl-color 4EAC41 \
    --line-color 00000000 \
    --inside-color 00000088 \
    --separator-color 00000000 \
    --grace 2 \
    --fade-in 0.2

⚙️ Configuration

Options can be provided via command line or a configuration file at ~/.config/rustlock/config.toml. CLI arguments take precedence.

Options

Option Description
--screenshots Capture desktop background before locking
--clock Display centered clock and date
--indicator Show password entry ring (default: true)
--indicator-radius <N> Ring radius in pixels (default: 100)
--indicator-thickness <N> Ring thickness in pixels (default: 7)
--effect-blur <R>x<P> Gaussian blur: radius x passes (e.g., 7x5)
--effect-vignette <B>:<F> Vignette: base:factor (e.g., 0.5:0.5)
--ring-color <RRGGBB[AA]> Outer ring color (hex, optional alpha)
--key-hl-color <RRGGBB[AA]> Key highlight segment color
--line-color <RRGGBB[AA]> Separator line color
--inside-color <RRGGBB[AA]> Inner circle color
--separator-color <RRGGBB[AA]> Ring separator color
--grace <SECONDS> Grace period in seconds (default: 2)
--fade-in <SECONDS> Fade-in animation duration (default: 0.2)
--pam-service <NAME> PAM service name (default: "rustlock")
--config <PATH> Path to config file
--debug Enable debug logging
--log-file Write logs to ~/.rustlock.log
--temp-screenshot Enable peek feature (press 'p' to temporarily show background)

📦 Installation

cargo build --release

The binary will be available at target/release/rustlock.


Completed

  • PAM-based authentication
  • Grace period (any key unlocks within N seconds)
  • Screenshot capture with blur/vignette effects
  • Configuration file support (~/.config/rustlock/config.toml)
  • Debug logging to ~/.rustlock.log
  • Clock and date display
  • Password indicator ring with rotating highlights

🚧 TODO

  • Don't hardcode screen resolution (detect dynamically)
  • Add multi-monitor support (handle multiple outputs)
  • Automatically install PAM configuration file
  • Configuration file schema validation
  • Additional visual effects (pixelate, swirl, etc.)
  • Theme/profile support with presets
  • Wayland protocol stability updates

📄 License

AGPL v3+

S
Description
No description provided
Readme GPL-3.0 9 MiB
Languages
Rust 99.4%
Nix 0.6%