Skip to content

Instantly share code, notes, and snippets.

@ArthurSonzogni
Created March 11, 2020 22:19
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 ArthurSonzogni/a5d3a646d8dbeaa490525f9e0a9caa84 to your computer and use it in GitHub Desktop.
Save ArthurSonzogni/a5d3a646d8dbeaa490525f9e0a9caa84 to your computer and use it in GitHub Desktop.
#!/bin/bash
# bindsym $mod+l exec ~/lock.sh
lock_image=/tmp/screen.png
RES=$(xrandr | grep 'current' | sed -E 's/.*current\s([0-9]+)\sx\s([0-9]+).*/\1x\2/')
ffmpeg \
-f x11grab \
-video_size $RES \
-y \
-i $DISPLAY \
-filter_complex "gblur=sigma=40:steps=1:planes=r" \
-vframes 1 $lock_image
-loglevel quiet
i3lock -i $lock_image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment