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