[download]

local/bin/lock

   1 #!/bin/bash
   2 
   3 f=~/.cache/${0##*/}
   4 
   5 convert -size 40x40 xc:none \
   6 -size 2x2 xc:#fff6 -composite $f.png
   7 
   8 xrootdump >    $f.bmp
   9 hsetroot -fill $f.bmp -flipv -tile $f.png -write $f.png
  10 
  11 amixer -q set Master mute
  12 i3lock -ni $f.png || dm-tool lock
  13 
  14 hsetroot -fill $f.bmp -flipv
  15 amixer -q set Master unmute