Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # vim: set ts=2 sts=2 sw=2:
- image="$HOME"/local/lockscreen.png
- overlay="$HOME"/local/lockoverlay.png
- # take a screenshot and apply some filters
- # add `format=gray` to -vf arg for bw
- ffmpeg\
- -loglevel quiet \
- -y \
- -s 2560x1440 \
- -f x11grab \
- -i "$DISPLAY" \
- -vframes 1 \
- -vf "boxblur=luma_radius=4" \
- "$image"
- # composite screenshot and lock logo
- convert\
- "$image" \
- "$overlay" \
- -gravity center \
- -composite \
- "$image"
- lockargs=(\
- --textcolor=ffffff00 \
- --insidecolor=faddc500 \ # inside of circle while typing/idle
- --ringcolor=fafafa00 \ # outer ring while typing/idle
- --linecolor=2d283e00 \ # ring delimiter lines
- --keyhlcolor=fabb5caa \ # keypress ring color
- --ringvercolor=fadd5caa \ # outer ring while
- --insidevercolor=fadd5c00 \ # inner ring while password is being verified
- --ringwrongcolor=f13459aa \ # incorrect password ring color
- --insidewrongcolor=f1345900 \ # inside incorrect color
- )
- /usr/bin/i3lock "${lockargs[@]}" -i "$image"
- rm $image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement