spawn small fixes
This commit is contained in:
@@ -18,7 +18,7 @@ if [ $PERCENT -le "23" ]; then
|
|||||||
notify-send --urgency=critical "Low battery $PERCENT%"
|
notify-send --urgency=critical "Low battery $PERCENT%"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $PERCENT -le "7" ]; then
|
if [ $PERCENT -le "3" ]; then
|
||||||
echo "powering down..."
|
echo "powering down..."
|
||||||
systemctl suspend
|
systemctl suspend
|
||||||
fi
|
fi
|
||||||
|
|||||||
18
pdfshrink
18
pdfshrink
@@ -1,16 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ "$1" == "-h" ] ; then
|
if [ "$1" == "-h" ] ; then
|
||||||
echo "
|
echo "
|
||||||
shrinkpdf - resize pdf to smaller size. Warning: if no second file name is provided, the default behavior is to overwrite the original pdf
|
pdfshrink - resize pdf to smaller size. Warning: if no second file name is provided, the default behavior is to overwrite the original pdf
|
||||||
usage:
|
|
||||||
shrinkpdf.sh large.pdf
|
Usage: pdfshrink infile.pdf
|
||||||
shrinkpdf.sh large.pdf small.pdf
|
pdfshrink infile outfile.pdf
|
||||||
dependencies:
|
|
||||||
ps2pdf from Ghostscript
|
Dependencies:
|
||||||
mktemp from GNU Coreutils
|
ps2pdf from Ghostscript
|
||||||
|
mktemp from GNU Coreutils
|
||||||
Usage: shrinkpdf.sh infile.pdf
|
|
||||||
shrinkpdf.sh infile outfile.pdf
|
|
||||||
"
|
"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
3
pdfsplit
3
pdfsplit
@@ -16,8 +16,6 @@ if [ "$1" == "-h" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# the following is from a stackoverflow answer
|
# the following is from a stackoverflow answer
|
||||||
# function pdfsplit()
|
|
||||||
# {
|
|
||||||
# this function uses 3 arguments:
|
# this function uses 3 arguments:
|
||||||
# $1 is the first page of the range to extract
|
# $1 is the first page of the range to extract
|
||||||
# $2 is the last page of the range to extract
|
# $2 is the last page of the range to extract
|
||||||
@@ -27,5 +25,4 @@ fi
|
|||||||
-dLastPage=${2} \
|
-dLastPage=${2} \
|
||||||
-sOutputFile=${3%.pdf}_p${1}-p${2}.pdf \
|
-sOutputFile=${3%.pdf}_p${1}-p${2}.pdf \
|
||||||
${3}
|
${3}
|
||||||
# }
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user