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%" 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

View File

@@ -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

View File

@@ -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}
# }

View File

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