1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 17:53:23 -07:00
rc/sh/scropt
2021-07-29 00:37:35 -07:00

13 lines
280 B
Bash
Executable File

#!/usr/bin/env bash
# YES_ZSH
scropt() {
local now=
which ~/sh/now 2>/dev/null >/dev/null && now=$(~/sh/now) || now=$(date +%F_%T)
local fn="$HOME/play/$now.png"
scrot "$fn" -e "optipng -quiet \$f" "$@"
echo "$fn"
}
[ "${SOURCING:-0}" -gt 0 ] || scropt "$@"