dotfiles/.bin/documents-next
2022-12-09 17:18:59 +01:00

27 lines
472 B
Plaintext
Executable File

#/bin/sh -xe
. ${HOME}/.bin/_config
cd ${PIMDIR}/documents
_doc=$(ls -1 _incoming | head -1)
if [ -z "$_doc" ]
then
echo "Nothing left... wohooo!"
exit 0
fi
pkill -f /usr/local/bin/pdfarranger
pdfarranger "_incoming/${_doc}" > /dev/null 2>&1 &
echo "Here is: ${_doc}"
echo "Shall we move it to _done?"
read key
case $key in
[yY]) mv "_incoming/${_doc}" done/; ;;
[yY][nN]) mv "_incoming/${_doc}" done/; $0; ;;
*) echo "What a shame..."; ;;
esac