Advertisement
Guest User

Untitled

a guest
Oct 27th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.16 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # vim: set ts=2 sts=2 sw=2:
  3.  
  4. image="$HOME"/local/lockscreen.png
  5. overlay="$HOME"/local/lockoverlay.png
  6.  
  7. # take a screenshot and apply some filters
  8. # add `format=gray` to -vf arg for bw
  9. ffmpeg\
  10.   -loglevel quiet   \
  11.   -y                \
  12.   -s 2560x1440      \
  13.   -f x11grab        \
  14.   -i "$DISPLAY"     \
  15.   -vframes 1        \
  16.   -vf "boxblur=luma_radius=4" \
  17.   "$image"
  18.  
  19. # composite screenshot and lock logo
  20. convert\
  21.   "$image"          \
  22.   "$overlay"        \
  23.   -gravity center   \
  24.   -composite        \
  25.   "$image"
  26.  
  27. lockargs=(\
  28.   --textcolor=ffffff00          \
  29.   --insidecolor=faddc500        \ # inside of circle while typing/idle
  30.   --ringcolor=fafafa00          \ # outer ring while typing/idle
  31.   --linecolor=2d283e00          \ # ring delimiter lines
  32.   --keyhlcolor=fabb5caa         \ # keypress ring color
  33.   --ringvercolor=fadd5caa       \ # outer ring while
  34.   --insidevercolor=fadd5c00     \ # inner ring while password is being verified
  35.   --ringwrongcolor=f13459aa     \ # incorrect password ring color
  36.   --insidewrongcolor=f1345900   \ # inside incorrect color
  37. )
  38.  
  39. /usr/bin/i3lock "${lockargs[@]}" -i "$image"
  40.  
  41. rm $image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement