summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmasterkey-sign.sh11
-rwxr-xr-xnormalize-pdf2
-rwxr-xr-xocr-scan2
-rwxr-xr-xscan-multi4
-rwxr-xr-xspotify2
5 files changed, 9 insertions, 12 deletions
diff --git a/masterkey-sign.sh b/masterkey-sign.sh
index 5adddbd..b67357d 100755
--- a/masterkey-sign.sh
+++ b/masterkey-sign.sh
@@ -2,11 +2,8 @@
set -e
-dir=$1
-key=$2
+key=$1
-export GNUPGHOME="$dir"
-
-gpg --homedir "$dir" --keyserver pgp.mit.edu --quiet --recv-keys "$key"
-printf 'y\ny\n' | gpg --homedir "$dir" --default-key 0xA88E23E377514E00 --command-fd 0 --batch --quiet --sign-key "$key"
-gpg --homedir "$dir" --keyserver pgp.mit.edu --send-keys "$key"
+gpg --keyserver pgp.mit.edu --quiet --recv-keys "$key"
+printf 'y\ny\n' | gpg --default-key 0xA88E23E377514E00 --command-fd 0 --batch --quiet --sign-key "$key"
+gpg --keyserver pgp.mit.edu --send-keys "$key"
diff --git a/normalize-pdf b/normalize-pdf
index 0c873ef..189cb31 100755
--- a/normalize-pdf
+++ b/normalize-pdf
@@ -1,3 +1,3 @@
#!/bin/bash
-convert -density 300 "$1" -normalize -compress jpeg -quality 75 "${1%.pdf}_normalized.pdf"
+convert -density 300 "$1" -normalize -compress jpeg -quality 70 "${1%.pdf}_normalized.pdf"
diff --git a/ocr-scan b/ocr-scan
index 5e7423f..cc8001d 100755
--- a/ocr-scan
+++ b/ocr-scan
@@ -4,7 +4,7 @@ jpeg_quality=70
jpeg_size=1500x1500
time=$(date +%Y-%m-%d_%H%M%S)
-scanimage --resolution 300 -b -x 215 -y 297
+scanimage --resolution 300 -b -x 210 -y 297
i=1
while [[ -e "out$i.pnm" ]]; do
img="out$i.pnm"
diff --git a/scan-multi b/scan-multi
index fc6ca33..2a218ce 100755
--- a/scan-multi
+++ b/scan-multi
@@ -4,12 +4,12 @@ jpeg_quality=70
jpeg_size=1500x1500
time=$(date +%Y-%m-%d_%H%M%S)
-scanimage --resolution 200 -b -x 215 -y 297
+scanimage --resolution 200 -b -x 210 -y 297
i=1
while [[ -e "out$i.pnm" ]]; do
img="out$i.pnm"
newname="$(printf "%s_%03d" "$time" "$i")"
- convert "$img" -normalize -resize $jpeg_size -quality $jpeg_quality "$newname.jpg" && rm "$img"
+ convert "$img" -resize $jpeg_size -quality $jpeg_quality "$newname.jpg" && rm "$img"
((i++))
done
diff --git a/spotify b/spotify
index 6969b03..055a350 100755
--- a/spotify
+++ b/spotify
@@ -1,4 +1,4 @@
#!/bin/bash
-
+mkdir /tmp/spotify-$UID/
wmctrl -xR spotify.Spotify || /usr/bin/spotify