#!/bin/bash screenshot() { case $1 in f*) scrot -m -e 'mv $f ~/scrots' ;; w*) sleep 1 scrot -s -e 'mv $f ~/scrots' ;; *) ;; esac; } screenshot $1