diff --git a/screenshot.sh b/screenshot.sh new file mode 100755 index 0000000..2176e13 --- /dev/null +++ b/screenshot.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env zsh + +local maim_args=("-f" "png") +local outfile="screenshot--$(date +'%F_%k-%M-%S').png" + +case "${1}" in; + '-root') + maim ${maim_args} "${outfile}" + ;; + '-select' | *) + maim ${maim_args} -s "${outfile}" + ;; +esac