Updated screen capture scripts
[clearscm.git] / bin / capture-area.sh
index 8540f6d..5197f95 100755 (executable)
@@ -1,2 +1,17 @@
 #!/bin/bash
-gnome-screenshot -caf /System/tmp/Screenshots/$(date +%F@%T).png
+timeout=10
+screenshot_directory=/tmp
+
+function yesno {
+  question=$1
+  
+  zenity --question --text "$question" --width=300 --timeout=$timeout 2> /dev/null
+}
+
+mate-screenshot -ac
+
+file="$screenshot_directory/Screenshots/$(date +%F@%T).png
+
+if yesno "Save screenshot as $file?"; then
+  xclip -selection clipboard -t image/png -o > $file
+fi