Merge branch 'master' of git+ssh://github.com/adefaria/clearscm
[clearscm.git] / bin / capture-area.sh
1 #!/bin/bash
2 timeout=10
3 screenshot_directory=/tmp
4
5 function yesno {
6   question=$1
7   
8   zenity --question --text "$question" --width=300 --timeout=$timeout 2> /dev/null
9 }
10
11 mate-screenshot -ac
12 aplay ~/Conf/CameraClick.wav
13
14 file="$screenshot_directory/$(date +%F@%T).png"
15
16 if yesno "Save screenshot as $file?"; then
17   xclip -selection clipboard -t image/png -o > $file
18 fi