AutoYADM commit: 2025-04-28 17:15:05
This commit is contained in:
parent
806267f147
commit
7e0e1db700
2 changed files with 4 additions and 4 deletions
3
.config/fish/functions/pdf.fish
Normal file
3
.config/fish/functions/pdf.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function pdf --wraps=zathura
|
||||||
|
command zathura $argv &>/dev/null & disown
|
||||||
|
end
|
|
@ -120,12 +120,9 @@ if not string match -q '*.typ' $src
|
||||||
return $ret
|
return $ret
|
||||||
end
|
end
|
||||||
# change abs path to pdf extension
|
# change abs path to pdf extension
|
||||||
set -l targ (string replace '.typ' '.pdf' $src)
|
set -l targ (string replace --regex '\.typ$' '.pdf' $src)
|
||||||
echo $targ
|
|
||||||
# get pdf target's base name
|
# get pdf target's base name
|
||||||
set -l base (path basename --no-extension $src).pdf
|
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 a suitable pdf exists in the same dir, open it
|
||||||
if test -f "$targ"
|
if test -f "$targ"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue