From: Don Armstrong Date: Tue, 9 May 2017 20:02:06 +0000 (-0700) Subject: use okular in preference to evince if it is installed X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=32c39a62998ca144b652955a9a5491f68846a835 use okular in preference to evince if it is installed --- diff --git a/evince_annot b/evince_annot index 65cd452..8c66a18 100755 --- a/evince_annot +++ b/evince_annot @@ -22,12 +22,16 @@ fi; (cd "$TMPDIR/b" chmod u+w "file.pdf" - ## evince really should just use the same document-directory - gsettings set org.gnome.Evince document-directory "'file://$TMPDIR/b'"; - evince "file.pdf" + if which okular > /dev/null 2>&1; then + okular "file.pdf" + else + ## evince really should just use the same document-directory + gsettings set org.gnome.Evince document-directory "'file://$TMPDIR/b'"; + evince "file.pdf" + fi; ); -if !cmp "$TMPDIR/b/file.pdf" "$TMPDIR/c/file.pdf"; then +if ! cmp "$TMPDIR/b/file.pdf" "$TMPDIR/c/file.pdf"; then (cd "$TMPDIR"; diff -Nura a b ) | qprint --encode --binary > "$ANNOT_FILE" fi;