189 lines
3.3 KiB
Markdown
189 lines
3.3 KiB
Markdown
---
|
|
publish: true
|
|
permalink: /10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/hyprlock.md
|
|
title: hyprlock
|
|
created: 2026-02-05T09:31:46.736-07:00
|
|
modified: 2026-02-05T09:35:55.743-07:00
|
|
tags:
|
|
- hyprland
|
|
- lockscreen
|
|
- security
|
|
cssclasses: ""
|
|
---
|
|
|
|
hyprlock is the lock screen for Hyprland with support for fingerprint authentication.
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
sudo pacman -S hyprlock
|
|
```
|
|
|
|
## My Configuration
|
|
|
|
Config: `~/.config/hypr/hyprlock.conf`
|
|
|
|
```bash
|
|
$font = Monospace
|
|
|
|
general {
|
|
hide_cursor = false
|
|
}
|
|
|
|
# Fingerprint authentication
|
|
auth {
|
|
fingerprint {
|
|
enabled = true
|
|
ready_message = Scan fingerprint to unlock
|
|
present_message = Scanning...
|
|
retry_delay = 250 # in milliseconds
|
|
}
|
|
}
|
|
|
|
animations {
|
|
enabled = true
|
|
bezier = linear, 1, 1, 0, 0
|
|
animation = fadeIn, 1, 5, linear
|
|
animation = fadeOut, 1, 5, linear
|
|
animation = inputFieldDots, 1, 2, linear
|
|
}
|
|
|
|
background {
|
|
monitor =
|
|
path = screenshot
|
|
blur_passes = 3
|
|
}
|
|
|
|
input-field {
|
|
monitor =
|
|
size = 20%, 5%
|
|
outline_thickness = 3
|
|
inner_color = rgba(0, 0, 0, 0.0) # no fill
|
|
|
|
outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg
|
|
check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg
|
|
fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg
|
|
|
|
font_color = rgb(143, 143, 143)
|
|
fade_on_empty = false
|
|
rounding = 15
|
|
|
|
font_family = $font
|
|
placeholder_text = Input password...
|
|
fail_text = $PAMFAIL
|
|
|
|
dots_spacing = 0.3
|
|
|
|
position = 0, -20
|
|
halign = center
|
|
valign = center
|
|
}
|
|
|
|
# TIME
|
|
label {
|
|
monitor =
|
|
text = $TIME
|
|
font_size = 90
|
|
font_family = $font
|
|
|
|
position = -30, 0
|
|
halign = right
|
|
valign = top
|
|
}
|
|
|
|
# DATE
|
|
label {
|
|
monitor =
|
|
text = cmd[update:60000] date +"%A, %d %B %Y"
|
|
font_size = 25
|
|
font_family = $font
|
|
|
|
position = -30, -150
|
|
halign = right
|
|
valign = top
|
|
}
|
|
|
|
# KEYBOARD LAYOUT
|
|
label {
|
|
monitor =
|
|
text = $LAYOUT[en,ru]
|
|
font_size = 24
|
|
onclick = hyprctl switchxkblayout all next
|
|
|
|
position = 250, -20
|
|
halign = center
|
|
valign = center
|
|
}
|
|
```
|
|
|
|
## Key Features
|
|
|
|
### Fingerprint Support
|
|
|
|
Requires [[10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/fprintd]] to be configured. The `auth` block enables fingerprint unlock:
|
|
```bash
|
|
auth {
|
|
fingerprint {
|
|
enabled = true
|
|
ready_message = Scan fingerprint to unlock
|
|
present_message = Scanning...
|
|
}
|
|
}
|
|
```
|
|
|
|
### Screenshot Background
|
|
|
|
Uses a screenshot of the current screen with blur:
|
|
```bash
|
|
background {
|
|
path = screenshot
|
|
blur_passes = 3
|
|
}
|
|
```
|
|
|
|
### Gradient Border
|
|
|
|
Input field has a gradient border matching Hyprland theme:
|
|
```bash
|
|
outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg
|
|
```
|
|
|
|
## Integration with hypridle
|
|
|
|
hypridle triggers hyprlock on idle. See [[10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/Hyprland Setup#Idle Management (hypridle)]].
|
|
|
|
Key config in `~/.config/hypr/hypridle.conf`:
|
|
```bash
|
|
general {
|
|
lock_cmd = pidof hyprlock || hyprlock # Prevent multiple instances
|
|
before_sleep_cmd = loginctl lock-session
|
|
}
|
|
|
|
listener {
|
|
timeout = 300 # 5 min
|
|
on-timeout = loginctl lock-session
|
|
}
|
|
```
|
|
|
|
## Manual Lock
|
|
|
|
```bash
|
|
hyprlock
|
|
```
|
|
|
|
Or via keybind:
|
|
```bash
|
|
bind = $mainMod, L, exec, hyprlock
|
|
```
|
|
|
|
## Shortcuts
|
|
|
|
While locked:
|
|
- `ESC` — Clear password
|
|
- `Ctrl+U` — Clear password
|
|
- `Ctrl+Backspace` — Clear password
|
|
|
|
## Resources
|
|
|
|
- Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|