X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fcapture-area.sh;fp=bin%2Fcapture-area.sh;h=5197f95c3467b26ddd0f8c0404dd765c3a10018b;hb=6fff5b9c2f216ff68334de853b67427b884935a2;hp=8540f6d2581bc5a40662accfd2a4f32dafad8898;hpb=b544229ca182398945586ddc9e9835988401149b;p=clearscm.git diff --git a/bin/capture-area.sh b/bin/capture-area.sh index 8540f6d..5197f95 100755 --- a/bin/capture-area.sh +++ b/bin/capture-area.sh @@ -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