X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=e2f7f9ccea2b86620aa9ffe62c8070ff5065f480;hb=8bae2dfd3bcedce28e8e1d86d878cc3eaa83e21f;hp=ad641b9b3fbab962e721846d8d240b125e59af7d;hpb=4b1b6e0a391d3f7a95d515ba39d18c8e9cf80ef7;p=config%2Fdotfiles.git 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