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)
|
2017-12-09 13:55:11 -08:00
|
|
|
if maim -us >"$tmp"; then
|
2017-12-17 22:12:13 -08:00
|
|
|
xclip -selection clipboard -t image/png "$tmp" && \
|
|
|
|
ding && \
|
|
|
|
notify-send "Screenshot saved"
|
2017-12-06 21:23:39 -08:00
|
|
|
else
|
2017-12-17 22:12:13 -08:00
|
|
|
notify-send -u low "Screenshot aborted"
|
|
|
|
ding error
|
2017-12-06 21:23:39 -08:00
|
|
|
fi
|
2017-12-17 22:12:13 -08:00
|
|
|
rm -f "$tmp"
|