From c96e8fd36b319d8416ffcc6775788999bb1663f6 Mon Sep 17 00:00:00 2001 From: Dominik Agres Date: Wed, 11 Mar 2026 11:56:55 +0100 Subject: [PATCH] added pdf opening in fzf --- local-bin/docpic-rofi | 12 +++++++++++- zsh/.zshrc | 6 +++++- zsh/.zshrc_arch | 3 +++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/local-bin/docpic-rofi b/local-bin/docpic-rofi index a3779f6..7974d1d 100755 --- a/local-bin/docpic-rofi +++ b/local-bin/docpic-rofi @@ -5,4 +5,14 @@ file=$( ) || exit 0 [ -n "$file" ] || exit 0 -exec alacritty -e nvim "$HOME/documents/$file" + +path="$HOME/documents/$file" + +case "$path" in + *.pdf|*.PDF) + exec zathura "$path" + ;; + *) + exec alacritty -e nvim "$path" + ;; +esac diff --git a/zsh/.zshrc b/zsh/.zshrc index cddc8a5..e0b46d3 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -13,7 +13,6 @@ case "$HOST" in esac source /usr/share/fzf/key-bindings.zsh -source /usr/share/fzf/completion.zsh # Preferred editor for local and remote sessions if [[ -n $SSH_CONNECTION ]]; then @@ -58,8 +57,13 @@ alias tk='tmux kill-session -t' # Pdf alias alias pdf='zathura' +# GPG TTY Fix export GPG_TTY=$(tty) # Fix unreadable color pallete for ExFat File systems LS_COLORS="$LS_COLORS:ow=01;36:" export LS_COLORS + +# Add local and global bin files to path +export PATH="/home/agres/.npm-global/bin:$PATH" +export PATH="$HOME/.local/bin:$PATH" diff --git a/zsh/.zshrc_arch b/zsh/.zshrc_arch index c03cad5..7dbadc4 100644 --- a/zsh/.zshrc_arch +++ b/zsh/.zshrc_arch @@ -9,3 +9,6 @@ export GOBIN=$HOME/.local/go/bin export PATH=$PATH:$GOBIN export PATH="$HOME/.local/bin:$PATH" +# -- FzF --- +source /usr/share/fzf/completion.zsh +