sent2pdf now ends with alt+shift+s

This commit is contained in:
inigoortega 2019-12-29 22:02:06 +01:00
parent c16adf1f23
commit 3bf990e365
2 changed files with 9 additions and 2 deletions

View File

@ -69,3 +69,6 @@ alt + p
XF86Launch1
dash $SCRIPTS/toggle-select-videos-to-watch.sh
alt + shift + s
dash $SCRIPTS/stop-sent2pdf.sh

View File

@ -1,6 +1,5 @@
#!/bin/sh
[ -z "$1" ] && exit 1
[ -z "$2" ] && out="$HOME/out.pdf" || out="$2"
folder="/tmp/sent2pdf"
@ -10,7 +9,10 @@ i="0"
killall unclutter 2> /dev/null
while [ $i -ne "$1" ]
wait4stop="/tmp/stop-sent2pdf"
touch $wait4stop
while [ -f $wait4stop ]
do
i="$(( $i + 1 ))"
import "$folder/$i.png" -window current &&
@ -18,6 +20,8 @@ do
sleep 0.3
done
rm "$folder/$i.png"
files="$(ls -v $folder/*.png | tr '\n' ' ')"
convert $files "$out"