2013-06-28 05:22:14 -07:00
|
|
|
#!/usr/bin/env bash
|
2024-03-26 15:08:14 -07:00
|
|
|
# YES_ZSH YES_BASH YES_DASH YES_ASH
|
2015-12-12 06:39:45 -08:00
|
|
|
|
2021-07-30 17:57:08 -07:00
|
|
|
scropt() { ### @-
|
|
|
|
### run `scrot` through `optipng` and save the result to `~/play/$(now).png`.
|
2021-10-05 10:58:03 -07:00
|
|
|
local now= fn=
|
|
|
|
now="$(now)" || return
|
|
|
|
fn="$HOME/play/$now.png"
|
|
|
|
scrot "$fn" -e 'optipng -quiet $f' "$@" && echo "$fn"
|
2015-12-12 06:39:45 -08:00
|
|
|
}
|
2021-07-29 00:37:35 -07:00
|
|
|
|
2021-08-02 14:08:00 -07:00
|
|
|
[ -n "${preload+-}" ] || . ~/sh/preload || exit 2
|
2021-08-02 13:48:46 -07:00
|
|
|
eval ${preload:-preload} now
|
|
|
|
[ -n "${preload+-}" ] || scropt "$@"
|