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