Refactor bin/scrcap
This commit is contained in:
parent
a17194cc2f
commit
21d1570706
|
@ -4,6 +4,8 @@
|
||||||
# capture) and stores it in the clipboard.
|
# capture) and stores it in the clipboard.
|
||||||
|
|
||||||
tmp=$(mktemp)
|
tmp=$(mktemp)
|
||||||
|
cleanup() { rm -f "$tmp"; }
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
# Delay for long enough that we can refocus the targeted window
|
# Delay for long enough that we can refocus the targeted window
|
||||||
if maim --delay=${1:-0.6} -us >"$tmp"; then
|
if maim --delay=${1:-0.6} -us >"$tmp"; then
|
||||||
|
@ -12,5 +14,3 @@ if maim --delay=${1:-0.6} -us >"$tmp"; then
|
||||||
else
|
else
|
||||||
notify-send -u low "Aborted screenshot"
|
notify-send -u low "Aborted screenshot"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "$tmp"
|
|
||||||
|
|
Loading…
Reference in a new issue