From 02882b53e62534b20e058a5dfd32947b83b2cdd7 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 22 Jun 2014 16:11:13 +0200 Subject: [PATCH] zsh/rc: add katarakt as preferred PDF viewer --- zsh/rc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 -- 2.45.2