Add bin/ssclip (screenshot -> clipboard)

This commit is contained in:
Henrik Lissner 2017-12-07 00:23:39 -05:00
parent 20c1970ef4
commit a303eaa9b7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

11
bin/ssclip Executable file
View file

@ -0,0 +1,11 @@
#!/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
notify-send "Screenshot aborted"
fi
rm -f "$tmp"