Last active
October 11, 2018 13:11
-
-
Save carlos22/a4b12b6dce85a87359f6d4e0a064e730 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#OUT="$HOME/clip_$(date +%Y-%m-%d_%H-%M-%S).png" | |
OUT=$(mktemp -t "clip-XXXXXX.png") | |
xclip -selection clipboard -t image/png -o > $OUT | |
if [ $? -eq 0 ]; then | |
echo "clipboard saved to: $OUT" | |
nautilus $OUT | |
else | |
rm $OUT | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment