Skip to content

Instantly share code, notes, and snippets.

@intern0t
Created April 16, 2018 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intern0t/16db9fe0214f8bc83e803f3ae09fa931 to your computer and use it in GitHub Desktop.
Save intern0t/16db9fe0214f8bc83e803f3ae09fa931 to your computer and use it in GitHub Desktop.
i3lock with blur!
#!/usr/bin/env bash
# Capture screenshot of active workspace.
screenshot="/tmp/i3lockscreenshot.png"
lockicon="/home/scarecr0w/.config/i3/avatar.png"
(( $# )) && { icon=$1; }
scrot "$screenshot"
convert "$screenshot" -scale 10% -scale 1000% "$screenshot"
convert "$screenshot" "$lockicon" -gravity center -composite -matte "$screenshot"
i3lock -u -i "$screenshot"
rm "$screenshot"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment