Skip to content

Instantly share code, notes, and snippets.

@MikaelFangel
Last active April 10, 2023 20:08
Show Gist options
  • Save MikaelFangel/917d82b6ea938b0da60e4b08c4a40ae1 to your computer and use it in GitHub Desktop.
Save MikaelFangel/917d82b6ea938b0da60e4b08c4a40ae1 to your computer and use it in GitHub Desktop.
Blurred lockscreen using swaybg
#------------------------------------#
# 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