AutoYADM commit: 2025-04-22 14:15:12
This commit is contained in:
parent
f36cf2e410
commit
0a37f956b8
1 changed files with 6 additions and 3 deletions
|
@ -1,9 +1,12 @@
|
|||
#!/usr/bin/env fish
|
||||
set parent_pid (ps -o ppid= -p $fish_pid | string trim)
|
||||
echo $parent_pid
|
||||
|
||||
argparse q/quiet -- $argv
|
||||
|
||||
function z --wraps zathura
|
||||
function zopen --wraps zathura
|
||||
zathura "$argv[1]" &>/dev/null &
|
||||
set zathura_pid $last_pid
|
||||
end
|
||||
|
||||
function find_pdf
|
||||
|
@ -11,7 +14,7 @@ function find_pdf
|
|||
set -l base $argv[2]
|
||||
set -l candidate (fd --no-ignore-vcs -F -1 "$base" "$root")
|
||||
if test "$candidate" != ''
|
||||
z "$candidate"
|
||||
zopen "$candidate"
|
||||
else
|
||||
return 1
|
||||
end
|
||||
|
@ -42,7 +45,7 @@ set -l targ (string replace '.typ' '.pdf' $src)
|
|||
set -l base (path basename --no-extension $src).pdf
|
||||
if test -f "$targ" -a '' != ''
|
||||
# zathura "$targ" &>/dev/null &
|
||||
z "$targ"
|
||||
zopen "$targ"
|
||||
else
|
||||
# no such file in current dir, time to search!
|
||||
# if we're in a git repo, search from root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue