Betterlockscreen
🍀 sweet looking lockscreen for linux system
Install / Use
/learn @betterlockscreen/BetterlockscreenREADME
Betterlockscreen
<div align="center"> <a href="https://github.com/betterlockscreen/betterlockscreen/releases"><img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/betterlockscreen/betterlockscreen?include_prereleases&label=latest&style=for-the-badge"></a> <a href="https://github.com/betterlockscreen/betterlockscreen/releases"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/betterlockscreen/betterlockscreen?label=Stable&style=for-the-badge"></a> <a href="https://github.com/betterlockscreen/betterlockscreen/actions/workflows/main.yml?query=branch%3Amain"><img alt="GitHub Workflow Status (main)" src="https://img.shields.io/github/actions/workflow/status/betterlockscreen/betterlockscreen/main.yml?branch=main&label=main&style=for-the-badge"></a> <a href="https://github.com/betterlockscreen/betterlockscreen/actions/workflows/main.yml?query=branch%3Anext"><img alt="GitHub Workflow Status (next)" src="https://img.shields.io/github/actions/workflow/status/betterlockscreen/betterlockscreen/main.yml?branch=next&label=next&style=for-the-badge"></a> <a href="https://github.com/betterlockscreen/betterlockscreen/milestone/2"><img alt="GitHub milestone" src="https://img.shields.io/github/milestones/progress/betterlockscreen/betterlockscreen/2?style=for-the-badge"></a> <a href="https://github.com/betterlockscreen/betterlockscreen/compare/v4.3.0...next"><img alt="GitHub commits since latest release (by date) for a branch" src="https://img.shields.io/github/commits-since/betterlockscreen/betterlockscreen/v4.3.0/next?style=for-the-badge"></a> <a href="https://github.com/betterlockscreen/betterlockscreen/blob/main/LICENSE"><img src="https://img.shields.io/github/license/betterlockscreen/betterlockscreen.svg?style=for-the-badge"></a> </div> <div align="center"> <h2>You want to support us?</h2> <div> <a href="https://github.com/betterlockscreen/betterlockscreen/discussions/366">We are searching a new Maintainer!</a> </div> <br />fast and sweet looking lockscreen for linux systems with effects!
<a href="https://github.com/betterlockscreen/betterlockscreen/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/betterlockscreen/betterlockscreen?style=social"></a> <a href="https://github.com/betterlockscreen/betterlockscreen/fork"><img alt="GitHub forks" src="https://img.shields.io/github/forks/betterlockscreen/betterlockscreen?style=social"></a> <a href="https://www.codetriage.com/betterlockscreen/betterlockscreen"><img src="https://www.codetriage.com/betterlockscreen/betterlockscreen/badges/users.svg"></a>
</div> <br />
<br />
Table of Contents
- About
- How it works
- System Requirements
- Installation
- Configuration
- Usage
- Background
- Keybinding
- Lockscreen on sleep/suspend with systemd
About
Most of i3lock wrapper-scripts out there take an image, add some effect(s) then lock with the modified image as locker-background. Overall experience doesn't feel natural given delay of 2-3 seconds.
Who would like a delay of 2-3 seconds while locking screen?
So Betterlockscreen was my attempt to solve this problem, as we dont need to change lockscreen background frequently this script caches images with effect so overall experience is simple and as fast as native i3lock.
How it works
The script takes a directory or image, adds various effects and caches the images in special directory. Those cached images will be used as locker-background depending on configuration provided by user.
System Requirements
- i3lock-color
>= 2.13.c.3 - ImageMagick
- bc
- xdpyinfo, xrandr, xrdb and xset from X.Org
- (Optional) Dunst
- (Optional) feh for wallpaper-functionality
Note: Make sure your system has all dependencies satisfied
Installation
Package Manager
<a href="https://repology.org/project/betterlockscreen"> <img src="https://repology.org/badge/vertical-allrepos/betterlockscreen.svg" alt="Packaging status" align="right"> </a>Betterlockscreen is available via package manager on some linux-distributions, if you miss your favorite one you can follow along with our installation-script or manual-installation.
If you are using Arch Linux, you can install the AUR package betterlockscreen to get the latest version, or betterlockscreen-git for the most up-to-date (unstable) changes.
If you are using Gentoo Linux, you can install betterlockscreen from Gentoo's GURU overlay using emerge x11-misc/betterlockscreen.
If you are using NixOS, betterlockscreen is available in both the stable and unstable channels and can be installed using nix-env -iA nixos.betterlockscreen.
If you are using Void Linux, you can install betterlockscreen using xbps-install -S betterlockscreen.
Installation Script
We have created an automatic install-script for Betterlockscreen. The script is very simple and takes three parameters:
<install-mode>: (string) 'user' installs to '~/.local/bin/', 'system' installs to '/usr/local/bin'[<version>]: (string) defaults to 'latest' which will determinate the latest tag from git or specified branch/tag[<systemd-service>]: (boolean) defaults to 'false' - Whether to copy and enable system-service.
For system-installation:
wget https://raw.githubusercontent.com/betterlockscreen/betterlockscreen/main/install.sh -O - -q | sudo bash -s system
For user-installation:
wget https://raw.githubusercontent.com/betterlockscreen/betterlockscreen/main/install.sh -O - -q | bash -s user
Manual Installation
Ỳou can download the latest release here, please ensure to fullfill the system-requirements!
You will need to copy "betterlockscreen" to you desired binary-directory, if you want to use the systemd-service you will need to copy the service-file from "system/" to the desired location on your system.
Example (Ubuntu):
wget https://github.com/betterlockscreen/betterlockscreen/archive/refs/heads/main.zip
unzip main.zip
cd betterlockscreen-main/
chmod u+x betterlockscreen
cp betterlockscreen /usr/local/bin/
cp system/betterlockscreen@.service /usr/lib/systemd/system/
systemctl enable betterlockscreen@$USER
Configuration
You can customize Betterlockscreen for your needs, copy the config file from the examples-directory to the user-configuration directory ~/.config/betterlockscreen/ and edit it accordingly.
mkdir -p ~/.config/betterlockscreen/
cp /usr/share/doc/betterlockscreen/examples/betterlockscreenrc ~/.config/betterlockscreen/
If no configuration-file is found, then the default configurations (which is equal to the example but hardcoded) will be used.
Custom script's on pre/post-lock
If present in user-configuration directory (see above) the "custom-(pre|post).sh" gets sourced at the appropriate time. This can be used to pause notification (not needed for dunst!), switch keyboard-layout on pre/post-lock etc.
Usage
Run betterlockscreen and point it to either a directory (betterlockscreen -u "path/to/dir") or an image (betterlockscreen -u "/path/to/img.jpg") and that's all. betterlockscreen will change update its cache with image you provided.
Usage: betterlockscreen [-u <PATH>] [-l <EFFECT>] [-w <EFFECT>]
-u --update <PATH>
Update lock screen image
-l --lock <EFFECT>
Lock screen with cached image
-w --wall <EFFECT>
Set wallpaper with cached image
Additional arguments:
--display <N>
Set display to draw loginbox
--span
Scale image to span multiple displays
--off <N>
Turn display off after N seconds
--fx <EFFECT,EFFECT,EFFECT>
List of effects to apply
-- <ARGS>
Pass following arguments to i3lock
Effects arguments:
--dim <N>
Dim image N percent (0-100)
--blur <N>
Blur image N amount (0.0-1.0)
--pixel <N,N>
Pixelate image with N shrink and N grow (unsupported)
--color <HEX>
Solid color background with HEX
Examples
-
Update image cache with random image
betterlockscreen -u ~/Wallpapers -
Update image cache with only dim and pixel effects
betterlockscreen -u ~/Wallpapers/image.png --fx dim,pixel -
Update image cache with random image, multiple monitors, login on 1, spanning
betterlockscreen -u ~/Wallpapers/Dual/ --display 1 --span -
Update image cache with solid background only (ignore errors)
betterlockscreen -u . --fx color --color 5833ff -
Update image cache with different background images
betterlockscreen -u ~/Wallpapers/image1.png -u ~/Wallpapers/image2.png -
Lock screen with blur effect
betterlockscreen --lock blur -
Lock screen with multiple monitors, spanning `betterloc
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
