LinuxCommandLibrary

blurlock

Lock screen with a blurred background

TLDR

Lock the screen to a blurred screenshot of the current screen

$ blurlock
copy

Lock the screen and disable the unlock indicator (removes feedback on keypress)
$ blurlock [[-u|--no-unlock-indicator]]
copy

Lock the screen and don't hide the mouse pointer
$ blurlock [[-p|--pointer]] [default]
copy

Lock the screen and show the number of failed login attempts
$ blurlock [[-f|--show-failed-attempts]]
copy

SYNOPSIS

blurlock [OPTIONS]

Note: The exact syntax and available options are highly dependent on the specific user-created blurlock script being used.

PARAMETERS

-h or --help
    Displays help information for the script.

-s or --screenshot-only
    Takes a screenshot and blurs it, but does not invoke i3lock.

-r <radius> or --radius <radius>
    Specifies the blur radius for the image processing, controlling the intensity of the blur.

-p <pixelate_factor> or --pixelate <pixelate_factor>
    Applies a pixelation effect instead of or in addition to blur.

-c <color> or --color <color>
    Sets a specific color for the lock screen overlay or indicator (e.g., #000000FF).

-u or --no-unlock-indicator
    Disables the unlock indicator or text overlay on the lock screen.

DESCRIPTION

blurlock is not a standalone, pre-installed Linux command. Instead, it refers to a common shell script or method used by Linux users, especially those using tiling window managers like i3 or Sway, to create a visually appealing lock screen. The core idea is to take a screenshot of the current desktop, apply a blur effect to it using image manipulation tools (like ImageMagick's convert), and then use this blurred image as the background for the i3lock utility. This provides a "blur-behind" effect, obscuring the sensitive screen content while maintaining a thematic visual element. The specific implementation of a "blurlock" script can vary widely depending on the user's preferences and the tools available, often incorporating options for different blur levels, pixelation, or custom lock screen indicators.

CAVEATS

blurlock is not a standard Linux command; it refers to a common scripting pattern or custom utility.
Requires external dependencies such as scrot (or grim for Wayland), ImageMagick (for convert), and i3lock (or swaylock for Wayland).
The functionality and options are entirely dependent on how the specific blurlock script is implemented by the user.
Performance may vary based on screen resolution and system resources, as it involves real-time image processing.
Not suitable for environments where scrot or i3lock are not available or where Wayland is in use (requiring grim and swaylock alternatives).

IMPLEMENTATION OVERVIEW

Most blurlock scripts follow a similar pipeline:
1. Capture the screen: Use scrot -o /tmp/screenshot.png (or grim for Wayland).
2. Process the image: Apply blur using convert /tmp/screenshot.png -blur 0x8 /tmp/blurred.png (the 0x8 indicates a sigma of 8 pixels for the Gaussian blur, adjustable). Other effects like pixelation (-scale 10% -scale 1000%) can also be applied.
3. Lock the screen: Call i3lock -i /tmp/blurred.png (or swaylock for Wayland) with the processed image as the background.
4. Clean up: Remove the temporary image files.

CUSTOMIZATION

Users often extend blurlock scripts to include more sophisticated features, such as displaying system information, custom fonts, power indicators, or integrating with notification daemons. The flexibility of shell scripting allows for nearly limitless customization.

HISTORY

The concept of blurring the screen before locking emerged as users sought more aesthetically pleasing and functional lock screens beyond simple black backgrounds. With the rise in popularity of tiling window managers like i3wm, which offer extensive customization, shell scripting became a natural way to achieve this. Early implementations combined scrot for screenshots and ImageMagick's convert for image manipulation, piping the output to i3lock. This approach gained traction in communities like r/unixporn and various dotfile repositories, becoming a de facto standard for custom i3lock setups. While no single "blurlock" command was officially released, the term became a widely understood shorthand for this specific lock screen customization technique.

SEE ALSO

i3lock(1), scrot(1), convert(1), xrandr(1), grim(1), swaylock(1)

Copied to clipboard