spawn small fixes

This commit is contained in:
ackman678
2023-09-28 22:52:04 -04:00
parent d328524cd9
commit d5a281d3b3
4 changed files with 10 additions and 15 deletions

View File

@@ -18,7 +18,7 @@ if [ $PERCENT -le "23" ]; then
notify-send --urgency=critical "Low battery $PERCENT%"
fi
if [ $PERCENT -le "7" ]; then
if [ $PERCENT -le "3" ]; then
echo "powering down..."
systemctl suspend
fi

View File

@@ -1,16 +1,14 @@
#!/bin/bash
if [ "$1" == "-h" ] ; then
echo "
shrinkpdf - 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
shrinkpdf.sh large.pdf small.pdf
dependencies:
ps2pdf from Ghostscript
mktemp from GNU Coreutils
Usage: shrinkpdf.sh infile.pdf
shrinkpdf.sh infile outfile.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: pdfshrink infile.pdf
pdfshrink infile outfile.pdf
Dependencies:
ps2pdf from Ghostscript
mktemp from GNU Coreutils
"
exit 0
fi

View File

@@ -16,8 +16,6 @@ if [ "$1" == "-h" ] ; then
fi
# the following is from a stackoverflow answer
# function pdfsplit()
# {
# this function uses 3 arguments:
# $1 is the first page of the range to extract
# $2 is the last page of the range to extract
@@ -27,5 +25,4 @@ fi
-dLastPage=${2} \
-sOutputFile=${3%.pdf}_p${1}-p${2}.pdf \
${3}
# }

View File

@@ -5,5 +5,5 @@ if [ -n "$TMUX" ] ; then
tmux split-window -h $EDITOR $1
else
# alacritty -e "nvim \"$*\""
alacritty -e bash -ic "$EDITOR $1" &
(alacritty -e bash -ic "$EDITOR $1") &
fi