- C++ 97.2%
- CMake 1.5%
- Nix 1.3%
|
Some checks failed
nix.yml / image: shake_on_fail (push) Failing after 0s
An image widget can now shake briefly when authentication fails: `shake_on_fail = fingerprint` (or password, or any). Paired with $FPRINTSTATE images, a wrong finger visibly bounces the fingerprint icon. CAuth gains a read-only getter for which method the latest failure came from; authentication itself is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .github | ||
| assets | ||
| nix | ||
| pam | ||
| protocols | ||
| src | ||
| .clang-format | ||
| .clang-tidy | ||
| .gitignore | ||
| CMakeLists.txt | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| VERSION | ||
hyprlock
Hyprland's simple, yet multi-threaded and GPU-accelerated screen locking utility.
Note
This is a fork of hyprwm/hyprlock. The
rattybranch carries the changes below on top of the latest upstream release tag; everything else is upstream.Configurable fingerprint messages. Upstream only lets you set
ready_messageandpresent_message; the rest of what$FPRINTPROMPTand$FPRINTFAILshow is hardcoded. Theseauth:fingerprintoptions cover it, each defaulting to upstream's wording (so an unchanged config behaves the same). Labels take Pango markup, so any of them can be an icon instead of text.
Option Shown in When retry_message$FPRINTPROMPTscanning again after a finger didn't match retry_scan_message$FPRINTPROMPTthe reader asks for another scan swipe_too_short_message$FPRINTPROMPTswipe readers: swipe too short not_centered_message$FPRINTPROMPTfinger not centered remove_and_retry_message$FPRINTPROMPTlift the finger and try again no_match_message$FPRINTFAILa finger didn't match max_tries_message$FPRINTFAILfingerprint disabled after too many failures unknown_error_message$FPRINTFAILfingerprint disabled by a reader error restart_failed_message$FPRINTFAILfingerprint disabled: scanning couldn't restart disconnected_message$FPRINTFAILfingerprint disabled: reader disconnected disabled_message$FPRINTPROMPTonce fingerprint is disabled for any of the above reasons; empty (the default) keeps the last prompt, as upstream does Fingerprint state for images.
$FPRINTSTATEis a fixed keyword for the fingerprint reader's state:none(not running),ready,present(a finger is on the reader),retry(scanning again after a mismatch),hint(the reader asked for another scan) ordisabled. Animagewidget'spathcan now use variables, and follows them as they change, so it can show one image per state:image { path = ~/.config/hypr/fingerprint-$FPRINTSTATE.png size = 48 rounding = 0 border_size = 0 }A state without an image file keeps showing the previous one. Images stay PNG/JPEG/WebP: hyprlock still can't render SVG image widgets.
Shaking images. An
imagewidget withshake_on_fail = fingerprintdoes a quick side-to-side shake whenever a fingerprint scan fails (passwordfor a wrong password,anyfor both). Empty, the default, never shakes.
Features
- Uses the ext-session-lock protocol
- Support for fractional-scale
- Fully GPU accelerated
- Multi-threaded resource acquisition
- Blurred screenshot as the background
- Native fingerprint support (using libfprint's dbus interface)
- Some of Hyprland's eyecandy: gradient borders, blur, animations, shadows, etc.
- and more...
How it looks
Docs / Configuration
Arch install
pacman -S hyprlock # binary x86 tagged release
# or
yay -S hyprlock-git # compiles from latest source
Building
Deps
You need the following dependencies
- cairo
- hyprgraphics
- hyprlang
- hyprutils
- hyprwayland-scanner
- mesa (required is libgbm, libdrm and the opengl runtime)
- pam
- pango
- sdbus-cpp (>= 2.0.0)
- wayland-client
- wayland-protocols
- xkbcommon
Sometimes distro packages are missing required development files.
Such distros usually offer development versions of library package - commonly suffixed with -devel or -dev.
Building
Building:
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
cmake --build ./build --config Release --target hyprlock -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
Installation:
sudo cmake --install build
