#! /bin/bash action=$1 if [ "$action" = "" ] ; then echo "You need to specify the action to use (copy/save)" exit fi file="$HOME/Pictures/Screenshots/Screenshot-$(date +%s%3N).png" selection=$(hacksaw -f "-i %i -g %g") if [ "$action" = "save" ] ; then shotgun $selection - else shotgun $selection - | xclip -t "image/png" -selection clipboard fi