Created
April 18, 2023 22:11
-
-
Save lbehm/ff168f05038340a9d2b768ea4aa994c8 to your computer and use it in GitHub Desktop.
Lock screen utility for sway desktop environment. The lock screen uses a blurred screenshot.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
IMAGE=$(mktemp -t swaylock-$USERNAME-XXXXX.png) | |
trap "rm -f ${IMAGE}" EXIT | |
# grim creates a screenshot of eDP-1. You may have to adjust your output specifier. | |
# convert (ImageMagick / GraphicsMagick) applies glur filter. Be creative! | |
grim -o eDP-1 - | \ | |
convert - \ | |
-blur 0x20 \ | |
-fill black -colorize 30% \ | |
$IMAGE | |
# swaylock enables lock screen with customized background. The hex color values control the unlock UI. | |
swaylock -e -c 111111 --inside-color 11111100 --line-color 080808AA -i :$IMAGE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment