X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fcapture-window.sh;h=21270cfac8f60ca33d31e34cc4dc997eb9115041;hb=d3c598399f93a1ca4ffc9f4aedd7907f4157ca43;hp=4a859c22dc6746101ebbbcc4d374bdcfce6682b7;hpb=44aaba558b2244c52c99d5a4bc50cae05c4ed514;p=clearscm.git diff --git a/bin/capture-window.sh b/bin/capture-window.sh index 4a859c2..21270cf 100755 --- a/bin/capture-window.sh +++ b/bin/capture-window.sh @@ -1,4 +1,6 @@ #!/bin/bash +# +# Apparently using png screws up sometimes so let's try using good old jpg timeout=10 screenshot_directory=/tmp @@ -8,11 +10,13 @@ function yesno { zenity --question --text "$question" --width=300 --timeout=$timeout 2> /dev/null } -mate-screenshot -wc +sleep 1 + +gnome-screenshot --window --clipboard aplay ~/Conf/CameraClick.wav -file="$screenshot_directory/$(date +%F@%T).png" +file="$screenshot_directory/$(date +%F@%T).jpg" if yesno "Save screenshot as $file?"; then - xclip -selection clipboard -t image/png -o > $file + xclip -selection clipboard -t image/jpeg -o > $file fi