Last active
April 10, 2023 20:08
-
-
Save MikaelFangel/917d82b6ea938b0da60e4b08c4a40ae1 to your computer and use it in GitHub Desktop.
Blurred lockscreen using swaybg
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
#------------------------------------# | |
# Get the blurred lock screen effect # | |
# using swaybg, grim and ffmpeg on # | |
# wayland. # | |
#------------------------------------# | |
#!/bin/env bash | |
path=/tmp/tmpbg.png | |
pathout=/tmp/tmpbgblur.png | |
# Take screenshot | |
grim "$path" | |
# Use gaussion blur | |
ffmpeg -i "$path" -filter:v "gblur=sigma=40" -frames:v 1 "$pathout" > /dev/null 2>&1 | |
# Lock the screen | |
swaylock -c '1b2021' -i "$pathout" | |
# Remove temp bgs | |
rm -f "$path" "$pathout" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment