#!/bin/bash

BASEPATH="$HOME/Images/screenshots"
cName="$BASEPATH/$(date +%F_%H-%M-%S).png"

case "$1" in
	'root')
		import -window root "$cName"
		;;
	'active')
		import -window $(xdotool getwindowfocus -f) -frame "$cName"
		;;
	*)
		>&2 echo -e "Error: bad action type. Usage:\n$0 [root|active]"
		exit 1
esac
