Skip to content
Discussion options

You must be logged in to vote

Your one-liner works, but three things can be simpler.

1. zathura can detach itself. zathura --fork FILE starts a copy of itself in a new session (setsid) and returns right away, so you don't need bash -c "… & disown". The copy runs as zathura FILE (without --fork), so a pgrep -f "zathura FILE" still finds it. man page, source

2. Put the "is it already running?" check in status:. That is what status is for: if the command succeeds, Task skips the task and prints Task "view" is up to date.

3. Make the viewer its own task that depends on the PDF. In your current layout, task: zathura is one of the pdf commands. When the PDF is up to date, Task skips the whole pdf task, so if you closed zath…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@kierun
Comment options

@Yuno15-bb
Comment options

@kierun
Comment options

Answer selected by kierun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants