From: Simon Ruderich Date: Sun, 22 Jun 2014 14:11:13 +0000 (+0200) Subject: zsh/rc: add katarakt as preferred PDF viewer X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=02882b53e62534b20e058a5dfd32947b83b2cdd7;p=config%2Fdotfiles.git zsh/rc: add katarakt as preferred PDF viewer --- diff --git a/zsh/rc b/zsh/rc index 0cb114d..ee31875 100644 --- a/zsh/rc +++ b/zsh/rc @@ -865,11 +865,15 @@ fi command tig --max-count=200 --branches --remotes --tags "$@" } -# 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 +# Choose the "best" PDF viewer available. Also setup completion for `pdf`. +if (( $+commands[katarakt] )); then + pdf() { + command katarakt "$@" 2>/dev/null & + disown %command + } + # No completion for katarakt yet. + compdef pdf=xpdf +elif (( $+commands[xpdf] )); then pdf() { command xpdf "$@" 2>/dev/null & disown %command