Secure screen locker with PAM authentication and visual ring indicator
garlock is the screen locker component of the gardesk ecosystem. Inspired by swaylock, it features a circular ring indicator that provides visual feedback during password entry, blurred screenshot background, and secure PAM-based authentication. Supports daemon mode for integration with idle managers and gar keybindings, with protection against brute force attacks via configurable cooldown periods.
Secure password verification via Linux PAM subsystem
Circular ring with color states for input feedback
Screenshot capture with Gaussian blur and brightness adjustment
Configurable cooldown after failed authentication attempts
Background service with IPC for idle manager integration
RandR detection with ring centered on primary monitor
Proper keyboard layout support with Caps Lock detection
Password zeroization and memory protection
garlock requires a PAM configuration file at /etc/pam.d/garlock. The RPM package installs this automatically. For manual installation:
# /etc/pam.d/garlock
auth include system-auth
account include system-auth
password include system-auth
session include system-auth Lock your screen immediately:
Add a lock keybinding to your gar configuration:
-- ~/.config/gar/init.lua
gar.keybinds = (
-- Lock screen with Super+L
( mods = ( "Mod4" ), key = "l", action = "spawn", args = "garlock" ),
-- Lock screen with Super+Escape (alternative)
( mods = ( "Mod4" ), key = "Escape", action = "spawn", args = "garlock" ),
) Run garlock as a daemon for integration with idle managers (like swayidle):
# ~/.config/systemd/user/garlock.service
[Unit]
Description=garlock screen locker daemon
PartOf=gar-session.target
After=gar.service
[Service]
ExecStart=/usr/bin/garlock daemon
Restart=on-failure
[Install]
WantedBy=gar-session.target