From 7e0e1db700579788b859a48960289f9350e1047f Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Mon, 28 Apr 2025 17:15:05 -0400 Subject: [PATCH] AutoYADM commit: 2025-04-28 17:15:05 --- .config/fish/functions/pdf.fish | 3 +++ .config/helix/scripts/hx-typ-zathura.fish | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .config/fish/functions/pdf.fish diff --git a/.config/fish/functions/pdf.fish b/.config/fish/functions/pdf.fish new file mode 100644 index 00000000..19937c0a --- /dev/null +++ b/.config/fish/functions/pdf.fish @@ -0,0 +1,3 @@ +function pdf --wraps=zathura + command zathura $argv &>/dev/null & disown +end diff --git a/.config/helix/scripts/hx-typ-zathura.fish b/.config/helix/scripts/hx-typ-zathura.fish index 7d6fabe9..5a71441f 100755 --- a/.config/helix/scripts/hx-typ-zathura.fish +++ b/.config/helix/scripts/hx-typ-zathura.fish @@ -120,12 +120,9 @@ if not string match -q '*.typ' $src return $ret end # change abs path to pdf extension -set -l targ (string replace '.typ' '.pdf' $src) -echo $targ +set -l targ (string replace --regex '\.typ$' '.pdf' $src) # get pdf target's base name set -l base (path basename --no-extension $src).pdf -echo $base -return 0 # if a suitable pdf exists in the same dir, open it if test -f "$targ"