Skip to content

Instantly share code, notes, and snippets.

@jon-grangien
Created November 9, 2016 17:57
Show Gist options
  • Save jon-grangien/25114837fb82b47e59fdcb46dc60630a to your computer and use it in GitHub Desktop.
Save jon-grangien/25114837fb82b47e59fdcb46dc60630a to your computer and use it in GitHub Desktop.
#!/bin/sh
icon="$HOME/Pictures/lockblue-darker.png"
TEMPBG=`mktemp --suffix '.png'`
RESOLUTION=`xdpyinfo | awk '/dimensions/{print $2}'`
(( $# )) && { icon=$1; }
ffmpeg -loglevel quiet -y -s "${RESOLUTION}" -f x11grab -i "${DISPLAY}" -vframes 1 -vf 'gblur=sigma=16' "${TEMPBG}"
i3lock -nef -i "${TEMPBG}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment