1
0
Fork 0
Fork of hyprlock with customizations for my personal setup. Fork changes are vibecoded.
  • C++ 97.2%
  • CMake 1.5%
  • Nix 1.3%
Find a file
ratty cdf333973c
Some checks failed
nix.yml / image: shake_on_fail (push) Failing after 0s
image: shake_on_fail
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>
2026-10-25 18:24:33 +01:00
.github CI: use org-wide actions 2026-04-17 15:18:55 +03:00
assets core: move dbus connection from fprint to it's own thing (#1029) 2026-05-30 10:22:35 +00:00
nix nix: separate overlay with deps 2026-03-02 18:30:57 +02:00
pam Adding a pam configuration file (#115) 2024-03-02 01:49:44 +02:00
protocols background: add screenshot 2024-02-21 21:39:14 +00:00
src image: shake_on_fail 2026-10-25 18:24:33 +01:00
.clang-format core: initial commit 2024-02-18 23:08:03 +00:00
.clang-tidy clang-tidy: fix some errors (#751) 2025-04-21 20:17:15 +02:00
.gitignore core: fix background screenshot on nvidia (#656) 2025-01-24 14:25:37 +01:00
CMakeLists.txt cmakelists: fix libpam finding for base ubuntu (#1027) 2026-05-29 13:47:32 +01:00
flake.lock flake.lock: update 2026-03-02 18:31:14 +02:00
flake.nix nix: add a devShell 2026-10-25 16:41:36 +01:00
LICENSE Initial commit 2024-02-18 16:10:12 +00:00
README.md image: shake_on_fail 2026-10-25 18:24:33 +01:00
VERSION version: bump to 0.9.6 2026-07-18 17:55:27 +02:00

hyprlock

Hyprland's simple, yet multi-threaded and GPU-accelerated screen locking utility.

Note

This is a fork of hyprwm/hyprlock. The ratty branch 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_message and present_message; the rest of what $FPRINTPROMPT and $FPRINTFAIL show is hardcoded. These auth:fingerprint options 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 $FPRINTPROMPT scanning again after a finger didn't match
retry_scan_message $FPRINTPROMPT the reader asks for another scan
swipe_too_short_message $FPRINTPROMPT swipe readers: swipe too short
not_centered_message $FPRINTPROMPT finger not centered
remove_and_retry_message $FPRINTPROMPT lift the finger and try again
no_match_message $FPRINTFAIL a finger didn't match
max_tries_message $FPRINTFAIL fingerprint disabled after too many failures
unknown_error_message $FPRINTFAIL fingerprint disabled by a reader error
restart_failed_message $FPRINTFAIL fingerprint disabled: scanning couldn't restart
disconnected_message $FPRINTFAIL fingerprint disabled: reader disconnected
disabled_message $FPRINTPROMPT once fingerprint is disabled for any of the above reasons; empty (the default) keeps the last prompt, as upstream does

Fingerprint state for images. $FPRINTSTATE is 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) or disabled. An image widget's path can 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 image widget with shake_on_fail = fingerprint does a quick side-to-side shake whenever a fingerprint scan fails (password for a wrong password, any for 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

See the wiki

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