1 #!/bin/bash
   2 
   3 args=()
   4 opts=$(getopt \
   5     -l blur,pixel,paint,radial,wave,gray,rotate,vignette,image: \
   6     -o bptrwGRVI: -- "$@"
   7 )
   8 eval set -- "$opts"
   9 
  10 while true; do
  11     case $1 in
  12         -b|--blur) args+=(-blur 0x10);;
  13         -p|--pixel) args+=(-scale 10% -scale 1000%);;
  14         -t|--paint) args+=(-paint 2);;
  15         -r|--radial) args+=(-radial-blur 7);;
  16         -w|--wave) args+=(-wave 15x50);;
  17 
  18         -G|--gray) args+=(-colorspace gray);;
  19         -R|--rotate) args+=(-rotate 180);;
  20         -V|--vignette) args+=(-background black -vignette 200x100);;
  21         -I|--image) args+=($2 -gravity center -composite);;
  22 
  23         --) break;;
  24     esac
  25     shift
  26 done
  27 
  28 [[ ! $args ]] &&
  29 grep -o '\-\w|--\w\+' $0 |
  30 sed 's/|/, /' | sort && exit
  31 
  32 import -window root $(mktemp).png
  33 convert $_ "${args[@]}" $_
  34 i3lock -i $_
[raw]