pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
1.87k stars 128 forks source link

[Feature Request/issue] flag to avoid writing a history entry (would reduce SSD writes) #410

Closed sebastinas closed 2 months ago

sebastinas commented 11 months ago

On GitLab by @aWachtel on Aug 1, 2023, 04:10


Dear developers. I am a linux user and I love using zathura and vim. I write because I want to request a new flag for starting zathura, it could look like zathura -noHistoryEntry document.pdf

The reason I propose this flag is the following. I use latex and zathura as a live preview engine. Every time I do a live preview a temporary .pdf file is generated and viewed with zathura. This temporary pdf-file, however, will not be available after a reboot. (I clean my temp-files). I have discovered, that i have approximately 8000 history entries in /home/user/.local/share/zathura/history.

Therefore, I read the man-files and I have found a way to completely switch off history (by including the line set database null into ~/.config/zathura/zathurarc. However, I would love to keep record of files that I permanently have. Additionally,with set database null a CRITICAL error is produced every time I use a bookmark in a pdf.

The flag I ask for, would save many SSD writes (for me and many users that use latex-live-previews) and allow to keep my history clean only containing files that permanently exist on my computer.

Thank you for reading and taking the time to consider this proposal. Andreas Wachtel

sebastinas commented 11 months ago

On GitLab by @aWachtel on Aug 1, 2023, 20:27


Dear developers, I found a nice solution to my problem above. I removed the line set database null from ./.config/zathura/zathurarc and instead I set a the data-directory to be located in the temporary files as follows: zathura --data-dir=$TMPDIR document.pdf. Since my temporary files will be cleaned when I reboot everything works as expected and NO code-change from your side is necessary.