From af7e33dbc711fb870a96fd4afa8de8979391b835 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Mon, 6 Mar 2023 20:14:53 -0800 Subject: [PATCH] Added screenshot.sh --- screenshot.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 screenshot.sh 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