X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fcapture-window.sh;h=4a859c22dc6746101ebbbcc4d374bdcfce6682b7;hb=29e7a76b102f27fe3017887c8936665ba9932d98;hp=46ad93744c331c585237eff2e46711b9414090b7;hpb=240ca5b4d23823ef2ac8b65c34cb7bc39a81bd5c;p=clearscm.git diff --git a/bin/capture-window.sh b/bin/capture-window.sh index 46ad937..4a859c2 100755 --- a/bin/capture-window.sh +++ b/bin/capture-window.sh @@ -1,2 +1,18 @@ #!/bin/bash -gnome-screenshot -cwf /System/tmp/Screenshot-$(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 -wc +aplay ~/Conf/CameraClick.wav + +file="$screenshot_directory/$(date +%F@%T).png" + +if yesno "Save screenshot as $file?"; then + xclip -selection clipboard -t image/png -o > $file +fi