From: Simon Ruderich Date: Thu, 20 Dec 2012 16:35:42 +0000 (+0100) Subject: zsh/rc: Prefer xpdf over zathura. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=8bae2dfd3bcedce28e8e1d86d878cc3eaa83e21f;p=config%2Fdotfiles.git zsh/rc: Prefer xpdf over zathura. --- diff --git a/zsh/rc b/zsh/rc index ad641b9..e2f7f9c 100644 --- a/zsh/rc +++ b/zsh/rc @@ -672,20 +672,22 @@ fi command tree -C "$@" | less } -# Choose the "best" PDF viewer available: zathura, then xpdf. Also setup -# completion for `pdf`. -if (( $+commands[zathura] )); then +# Choose the "best" PDF viewer available: xpdf, then zathura (in the past +# zathura was preferred, but recent versions are completely broken: still no +# working search and no page-wise scrolling anymore). Also setup completion +# for `pdf`. +if (( $+commands[xpdf] )); then pdf() { - command zathura "$@" 2>/dev/null & + command xpdf "$@" 2>/dev/null & disown %command } - # No completion for zathura yet. compdef _xpdf pdf -elif (( $+commands[xpdf] )); then +elif (( $+commands[zathura] )); then pdf() { - command xpdf "$@" 2>/dev/null & + command zathura "$@" 2>/dev/null & disown %command } + # No completion for zathura yet. compdef _xpdf pdf fi