X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=aa195f28b167da25b030ec5e20aef1cc1dfec0ad;hb=9b4edaeb7c8a573fcf2c865fe1dd7c16337e0c76;hp=ad641b9b3fbab962e721846d8d240b125e59af7d;hpb=25a08d633cffde3db73220f8de8cdc1ff6188ff1;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index ad641b9..aa195f2 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 @@ -771,9 +773,12 @@ exec 2>>(while read -r -k -u 0 line; do print -n $'\0'; done &) -# Run reminder and redisplay it every four hours (if it's available). +# Run the following programs every 4 hours. PERIOD=14400 periodic() { + # Display fortunes. + (( $+commands[fortune] )) && fortune -ac + # Display reminders. (( $+commands[rem] )) && [ -f ~/.reminders ] && rem -h }