helm/bin/ssclip

13 lines
305 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
# A script that takes a screenshot and stores it in the clipboard
tmp=$(mktemp)
2017-12-09 13:55:11 -08:00
if maim -us >"$tmp"; then
xclip -selection clipboard -t image/png "$tmp" && \
ding && \
notify-send "Screenshot saved"
else
notify-send -u low "Screenshot aborted"
ding error
fi
rm -f "$tmp"