powered by Yesod Newsfeed
Tough times don't last, tough people do.
Pascal Wittmann

"auto-reload on file change"-wrapper for the llpp pdfviewer

I really like the pdf viewer llpp, it is fast (build on mupdf) and provides very handy features like a presentation mode, a column mode, a bird’s eye mode and much more. The only thing I missed while creating pdfs is the ability to automatically reload pdfs on changes.

I’ve now hacked a script that used inotifywait to monitor the opened pdf for changes and sends the HUP signal to the llpp process. Until now I experienced no problems, but especially the part to kill inotifywait when llpp terminates (and to kill llpp when the script terminates) is hacky.

You can find the script on github.

Update: There was a bug mentioned on stackoverflow. It should be fixed in the current version on github. For details see the question on stackoverflow.

Update: Júda Ronén contributed a patch to support absolute paths. Thank you!

Comments

Kommentare für diesen Eintrag als RSS Feed
am 17.12.2012 schrieb Mark Witmer Antworten

Awesome script! I was hoping someone had added this feature to a mupdf-based viewer. I think it uses some bash-specific features, though, so I had to change the #! to /usr/bin/bash in order for it to work in Linux Mint 13.

am 29.12.2012 schrieb Pascal Antworten

I’m glad you like it! On my system (archlinux) /bin/sh is actually a symbolic link to /bin/bash. I don’t know the situation on Linux Mint, but I would suspect the script to run with every mature shell

am 6.01.2013 schrieb Júda Antworten

Thanks a lot! This should be a built-in feature, but your script works just fine ☹

am 10.02.2014 schrieb tjaart Antworten

llpp is a really nice pdf viewer but auto reload is a critical feature for creating pdfs from latex. Thanks for the script!

Leave a Reply

netcup Ökostrom