The lock screen

BlueRune draws its own lock screen: the wallpaper blurred under a dark veil, the clock and date, and a row of islands at the bottom (who is logged in and the keyboard layout, the password field, the battery and the notification count), with the media player's controls above them. It locks the session through Wayland's ext-session-lock-v1, so Hyprland shows nothing but the lock surfaces and sends every key and press to them alone.

hyprlock remains available: choose it under Settings → Lock and privacy → Lock screen, and hypridle starts it as before. hyprlock also stands in whenever the shell isn't running.

What locks the screen

Trigger Grace Notes
bluerunectl lock yes hypridle's lock_cmd (bluerunectl lock || pidof hyprlock || hyprlock …)
loginctl lock-session yes the lock key bind and hypridle's idle listener; BlueRune follows logind's Lock signal for its own session
The machine about to sleep no only with Lock before suspending on: BlueRune holds logind's sleep delay inhibitor and lets the machine sleep once Hyprland says the session is locked
The session screen's and the quick settings panel's lock buttons no
The shell starting after it died while locked no see Recovery

Asking again while the screen is locked, or being locked, does nothing. logind's Unlock signal is ignored on purpose: any program of the same user could send it.

With hyprlock chosen, BlueRune follows no logind signal and never locks itself; bluerunectl lock then runs loginctl lock-session, which hypridle answers with hyprlock.

While locked, the shell's own surfaces that take the keyboard (launcher, overview, session screen, prompts, cards, quick settings) don't open, and the one open when the lock came closes.

Unlocking

Only these unlock: the password, accepted by PAM; a finger enrolled with fprintd, when Unlock with a fingerprint is on; or a key or pointer movement within the grace (Seconds before the password is needed) after a lock that allows it. After three wrong passwords in a row each further one costs a wait, from 5 s doubling to 60 s; the system's own pam_faillock may lock the account for longer, and its words appear under the field. A password that is right but has expired still unlocks, as with hyprlock and swaylock; what PAM said about it then comes as a notification once the session is unlocked.

Escape, Ctrl+U and Ctrl+Backspace clear the field. The password is held in memory that is wiped when it is dropped, and it is never logged; the surfaces are told only how many characters are typed.

Settings

All on the Lock and privacy page:

Setting Id BlueRune's lock screen
Lock screen lock.locker bluerune or hyprlock
Lock the screen after lock.idle hypridle's idle listener
Lock before suspending lock.before_suspend locks before sleep, holding logind's delay inhibitor
Seconds before the password is needed lock.grace the grace for bluerunectl lock and loginctl lock-session
Unlock with a fingerprint lock.fingerprint listens on fprintd's default reader when a finger is enrolled
Background lock.look.background wallpaper and screenshot: each monitor's wallpaper, the slideshow's picture while one runs, or, without a wallpaper, the backdrop the desktop and the login screen draw; picture; colour
Picture, Background colour lock.look.picture, lock.look.colour the colour also shows until a picture is decoded, or when it can't be
Blur lock.look.blur 0 to 8; each step is a blur of 6 points
Show the time, Clock size, Show the date lock.look.clock, lock.look.clock_style, lock.look.date in the time and date formats of the Date and time page
Show media controls lock.look.media the active MPRIS player, with play/pause, next and previous as it allows
Show the notification count lock.look.notifications the unread count the bar shows; never what they say
Show the battery lock.look.battery percent, charging, low
Accent color lock.look.accent empty (the default) follows the accent of Appearance › Colors; a color of its own is used as the lock screen's accent (unlock button, caret, play button, avatar) and hyprlock's field outline, made as light or dark as the theme's accent so they stay readable. hyprlock's clock and date use the Date and time formats too
Hide the pointer lock.look.hide_cursor no pointer over the lock surfaces; moving it still counts as someone there

When hyprlock.conf or hypridle.conf is your own

BlueRune generates ~/.config/hypr/hyprlock.conf (hyprlock's look) and hypridle.conf (when the screen locks, dims, turns off and sleeps) from these settings, but leaves a file there alone when its first line isn't BlueRune's marker: it is yours.

  • With BlueRune's lock screen chosen, its look, the grace and locking before suspending still apply, since BlueRune's lock screen reads them itself; only hyprlock, standing in while the shell isn't running, keeps to your hyprlock.conf. The page says so in a card above the settings.
  • With hyprlock chosen, the look settings say your file overrides them. Settings only hypridle.conf carries out (Lock the screen after, the Power page's idle times, which lock screen idle starts) say so while that file is yours, whichever lock screen is chosen.

Let BlueRune write hyprlock.conf (or hypridle.conf) on that card, or bluerunectl lock take-over [hyprlock | hypridle], moves yours aside to hyprlock.conf.pre-bluerune (then .pre-bluerune.1, .2, … so an earlier one is never overwritten) and writes BlueRune's; hypridle is restarted to read it. Put my file back, or bluerunectl lock put-back [hyprlock | hypridle], puts the newest one back, as long as BlueRune's file there is still as BlueRune wrote it.

PAM

The password is checked through the PAM service bluerune. The package installs dist/pam/bluerune as /etc/pam.d/bluerune; it includes login, as hyprlock's does. From a checkout:

sudo install -Dm644 dist/pam/bluerune /etc/pam.d/bluerune

Without that file PAM uses /etc/pam.d/other, which refuses every password, and the screen says the password can't be checked.

Trying it out without your password

Debug builds have a fake-auth feature that stands in an authenticator accepting one fixed password, read from BLUERUNE_FAKE_PASSWORD. A release build with the feature doesn't compile.

cargo build -p bluerune --features fake-auth
BLUERUNE_FAKE_PASSWORD=letmein target/debug/bluerune --socket /tmp/try.sock
target/debug/bluerunectl --socket /tmp/try.sock lock

Try it in a nested Hyprland, not your own session: give the daemon the nested instance's HYPRLAND_INSTANCE_SIGNATURE and WAYLAND_DISPLAY, private DBUS_SESSION_BUS_ADDRESS and DBUS_SYSTEM_BUS_ADDRESS (so logind's signals for your real session don't reach it) and its own XDG_RUNTIME_DIR (so its lock file is its own). Type into the nested compositor with WAYLAND_DISPLAY=… wtype.

When the shell dies while locked

Killing the shell (a crash, kill -9) leaves the session locked: Hyprland keeps the lock and shows its "lock dead" screen. BlueRune notes the lock in $XDG_RUNTIME_DIR/bluerune/locked before it asks for it and removes the file after the unlock; a shell that starts and finds the file locks again at once. systemd restarts the shell by itself (Restart=on-failure).

Hyprland lets a new lock client take over a dead one's lock only with misc:allow_session_lock_restore set. On Hyprland 0.57 set it from a text console (Ctrl+Alt+F3, log in), then restart the shell:

hyprctl --instance 0 eval 'hl.config({ misc = { allow_session_lock_restore = true } })'
systemctl --user restart bluerune

(hyprctl keyword misc:allow_session_lock_restore 1 is refused by 0.57: "unknown request".) To have it always on, put misc = { allow_session_lock_restore = true } in your Hyprland config. The shell then locks again and asks for the password; back at Hyprland with Ctrl+Alt+F1 (or the console Hyprland runs on), unlock as usual. If the shell started before the option was set, Hyprland refuses its lock and the shell says so in its log (journalctl --user -u bluerune) and keeps the lock file, so the restart above locks again.

Hyprland's own way out, hyprctl --instance 0 eval 'hl.clear_crashed_lockscreen()', unlocks the session without any password.