Changed jira to handle branch names that are just numbers
[clearscm.git] / bin / capture-area.sh
1 #!/bin/bash
2 #
3 # Apparently using png screws up sometimes so let's try using good old jpg
4 timeout=10
5 screenshot_directory=/tmp
6
7 function yesno {
8   question=$1
9   
10   zenity --question --text "$question" --width=300 --timeout=$timeout 2> /dev/null
11 }
12
13 mate-screenshot --area --clipboard
14 aplay ~/Conf/CameraClick.wav
15
16 file="$screenshot_directory/$(date +%F@%T).jpg"
17
18 if yesno "Save screenshot as $file?"; then
19   xclip -selection clipboard -t image/jpeg -o > $file
20 fi