pwmt issueshttps://git.pwmt.org/groups/pwmt/-/issues2023-12-08T18:42:53+01:00https://git.pwmt.org/pwmt/zathura/-/issues/355[FR] Expose index of the current document through dbus_interface.c2023-12-08T18:42:53+01:00Rodrigo Morales[FR] Expose index of the current document through dbus_interface.cExpose table of contents through dbus
By calling the functions defined in [dbus-interface.c](https://git.pwmt.org/pwmt/zathura/-/blob/develop/zathura/dbus-interface.c), I have been able to write Elisp functions (please see below) in ord...Expose table of contents through dbus
By calling the functions defined in [dbus-interface.c](https://git.pwmt.org/pwmt/zathura/-/blob/develop/zathura/dbus-interface.c), I have been able to write Elisp functions (please see below) in order to be able to reuse Zathura instances when opening Org Mode links of the form `[[file:<<filename>>#<<page number>>` (i.e. the same Zathura instance will be used if it is already opening the desired document.)
```elisp
(defun my/dbus-zathura-use-instance-or-open-new (file link)
"Launch zathura to open FILE or Reuse a running instance.
LINK is provided by Org Mode when this function has been
specified in `org-file-apps'. This function is intended to be
used in `org-file-apps' and shouldn't be called on its own."
(let* ((process-alist (proced-process-attributes))
(pids (mapcar 'car (proced-filter process-alist '((comm . "zathura")))))
(pid
(catch 'found
(cl-loop for pid in pids
when (equal
(dbus-get-property
:session
(concat "org.pwmt.zathura.PID-" (number-to-string pid))
"/org/pwmt/zathura"
"org.pwmt.zathura"
"filename")
file)
do (throw 'found pid))))
(page-number
(or
(progn
;; FIXME: According to the docstring of org-file-apps, we
;; can access capture groups using (match-string n
;; link). However, when I tried it, the capture groups
;; didn't have the entire content. For this reason, I'm
;; running string-match with the same regex that I used
;; in org-file-apps, but (match-string n link) should
;; work as specified in the Org Mode documentation.
(string-match "\\.\\(pdf\\|djvu\\)::\\([0-9]+\\)\\'" link)
(match-string 2 link))
"1")))
(if pid
;; Jump to that page in the existing instance
(dbus-call-method
:session
(concat "org.pwmt.zathura.PID-" (number-to-string pid))
"/org/pwmt/zathura"
"org.pwmt.zathura"
"GotoPage"
(1- (string-to-number page-number)))
;; Open a new instance
(make-process
:name "zathura"
:buffer nil
:command `("zathura" "--page" ,page-number ,file)))))
```
```elisp
(setq org-file-apps
'((auto-mode . emacs)
(directory . emacs)
("\\.png\\'" . "mpv %s")
("\\.\\(pdf\\|djvu\\)" . my/dbus-zathura-use-instance-or-open-new)
("\\.\\(pdf\\|djvu\\)::\\([0-9]+\\)\\'" . my/dbus-zathura-use-instance-or-open-new)))
```
Now, I would like to create a function for Emacs which prompts for an item in the table of contents of the document and jumps to that specific page. Currently, [dbus-interface.c](https://git.pwmt.org/pwmt/zathura/-/blob/develop/zathura/dbus-interface.c) expose the page number and the filename and it provides an interface for jumping to an specific page (interface which I used in my Elisp function shown above). However, the table of contents from the current document is not exposed. Therefore, I propose that the index of the document is exposed in some way.
This feature will not only benefit Emacs users but also users of any completion framework (e.g. rofi, dmenu, fzf, vim, etc), since such specialized completion frameworks have more features available (e.g. regex search, movement with operators, fuzzy finding) which, I believe, might require significant effort to incorporate in the zathura index viewer.https://git.pwmt.org/pwmt/zathura/-/issues/339[feature request] support use javascript/css show/hide info in epub2023-09-17T18:32:15+02:00h left[feature request] support use javascript/css show/hide info in epubsome epub add a javascript button toggle info,
```javascript
<div id="content">
<p>This is the content</p>
</div>
<button onclick="toggleContent()">Toggle Content</button>
<script>
function toggleContent() {
var content = documen...some epub add a javascript button toggle info,
```javascript
<div id="content">
<p>This is the content</p>
</div>
<button onclick="toggleContent()">Toggle Content</button>
<script>
function toggleContent() {
var content = document.getElementById("content");
if (content.style.display === "none") {
content.style.display = "block";
} else {
content.style.display = "none";
}
}
</script>
```
or use css toggle content
I see it works in calibre but not in zathura, hope to support this featurehttps://git.pwmt.org/pwmt/zathura/-/issues/218[Feature Request] Remember offset2023-09-14T00:06:14+02:00Peter[Feature Request] Remember offsetIt would be helpful to remember the offset of each PDF, similar to how it's currently storing bookmarks. Currently, you have to set the offset every time you open the PDF.It would be helpful to remember the offset of each PDF, similar to how it's currently storing bookmarks. Currently, you have to set the offset every time you open the PDF.https://git.pwmt.org/pwmt/zathura/-/issues/4[Feature Request] Tabs2023-06-01T15:29:48+02:00Tom[Feature Request] TabsAdd the ability to have multiple PDFs open in a single window with tabs, similar to how modern web browsers like firefox allow multiple web pages.
[xpdf](http://www.xpdfreader.com/index.html) currently implements this very well:
![201...Add the ability to have multiple PDFs open in a single window with tabs, similar to how modern web browsers like firefox allow multiple web pages.
[xpdf](http://www.xpdfreader.com/index.html) currently implements this very well:
![20180224_114323](/uploads/253cec291cc71a64a4d44475c310f883/20180224_114323.png)
The sidebar on the left shows 4 PDFs open simultaneously and the user can quickly page through them with a keyboard shortcut. This is a very useful feature and supports workflows where you might have `zathura` in one window along side your dev environment and you want to have multiple papers to reference while you work.https://git.pwmt.org/pwmt/zathura/-/issues/352Can't run piped shell commads into `:exec`2023-05-17T11:11:38+02:00archie eichraCan't run piped shell commads into `:exec`I am trying to use exec command but when I use pip in the command it don't work. Is this a bug or should I escape `|` character or something like that?I am trying to use exec command but when I use pip in the command it don't work. Is this a bug or should I escape `|` character or something like that?https://git.pwmt.org/pwmt/zathura/-/issues/26Add "text selection"2023-03-07T15:20:29+01:00Francesco AriisAdd "text selection"As now, to copy some text, you need to draw a rectangle with your mouse over the text.
I would prefer "normal" text selection, where by "normal" I mean the way it works in your browser: I especially miss the double-click-to-highlight-si...As now, to copy some text, you need to draw a rectangle with your mouse over the text.
I would prefer "normal" text selection, where by "normal" I mean the way it works in your browser: I especially miss the double-click-to-highlight-single-word feature.https://git.pwmt.org/pwmt/zathura/-/issues/56rename file and update history2022-08-20T14:28:45+02:00Dream Scatterrename file and update historyHi, I would like to be able to conveniently rename files with zathura. My work around is using a script, which I call `rename_file`:
```bash
#!/bin/bash
name=$1
RENAME=`zenity --file-selection --save --filename="$name"`
mv "$name" "$REN...Hi, I would like to be able to conveniently rename files with zathura. My work around is using a script, which I call `rename_file`:
```bash
#!/bin/bash
name=$1
RENAME=`zenity --file-selection --save --filename="$name"`
mv "$name" "$RENAME"
sed -i.bak s%$name%$RENAME%g ~/.local/share/zathura/history
sh -c "zathura '${RENAME}'"
```
The script also updates the `history` file to keep the view settings after renaming the file.
Then I use this in the `zathurarc` configuration
```
map <C-r> feedkeys ":exec rename_file '$FILE' &<Return>"
```
You can see I am using `zenity` as a rename file dialog box, I'm not necessarily looking for a GUI solution, it just happens to be convenient here. Specifically, I want to be able to rename the file while viewing the document, the filenames I want to choose require seeing the documents while typing.
However, there is a minor issue with this method. The script opens a new zathura window with the renamed file, but the previous zathura window cannot be automatically closed, as far as I was able to figure out.
Of course, I can just manually close the previous zathura window; however, it would be good if zathura had a built-in feature for renaming files and also updating the history. It would also be good if I could use an input command in zathura to enter the new filename, and automatically have the history file updated also, as well as reload the newly named document.
Strangely, I haven't found any linux document viewers which have a rename file feature, like SumatraPDF viewer.
Please let me know if you could suggest any improvements to my method or if you could please add this feature.https://git.pwmt.org/pwmt/zathura/-/issues/189Replacement Text (AccSupp ActualText entry) Support2022-08-20T14:15:59+02:00Geek123Replacement Text (AccSupp ActualText entry) SupportWe noticed that your PDF viewer doesn't have AccSupp ActualText support. This means that copy-pasting technical text such as shellscripts and programming code, does not work in your PDF viewer and this greatly restrains the use of your w...We noticed that your PDF viewer doesn't have AccSupp ActualText support. This means that copy-pasting technical text such as shellscripts and programming code, does not work in your PDF viewer and this greatly restrains the use of your whole program.
According to the tests made using PDFs produced by pdflatex using the package accsupp, the replacement text support seems to be unreliable at the moment for copy and paste. Those tests are available on the referenced accsupp github page in the end of this text.
We kindly request better support of the replacement text support, because the copy and paste directly from the PDF document is not reliable.
Please also refer to these two pages for further discussion:
[https://tex.stackexchange.com/questions/563803/how-make-a-latex-document-that-generates-a-pdf-from-which-copy-paste-works-corre](https://tex.stackexchange.com/questions/563803/how-make-a-latex-document-that-generates-a-pdf-from-which-copy-paste-works-corre)
[https://github.com/ho-tex/accsupp/issues/2](https://github.com/ho-tex/accsupp/issues/2)https://git.pwmt.org/pwmt/zathura/-/issues/265[feature] support embedded adobe flash and U3D?2022-08-20T14:04:04+02:00Freed Wu[feature] support embedded adobe flash and U3D?Texlive has two package media9 and animate which allow user to embedded some interactive animations in pdf. However, I found only KDE's okular support to display these animations. I hope my favourite pdf browser can do it, too.
Some exa...Texlive has two package media9 and animate which allow user to embedded some interactive animations in pdf. However, I found only KDE's okular support to display these animations. I hope my favourite pdf browser can do it, too.
Some example pdfs are `/usr/share/texmf-dist/doc/latex/animate/animate.pdf` and `/usr/share/texmf-dist/doc/latex/media9/media9.pdf`, they are the document about these packages and containing the animations. If texlive is installed, these pdfs should exist.
Thanks!https://git.pwmt.org/pwmt/zathura/-/issues/260Feature Request: Progress percentage in statusbar2022-01-11T18:39:59+01:00prgFeature Request: Progress percentage in statusbarIt would be great to have the option to display a percentage of the current page / total pages in a percent, next to the [num/num] on the leftIt would be great to have the option to display a percentage of the current page / total pages in a percent, next to the [num/num] on the lefthttps://git.pwmt.org/pwmt/zathura/-/issues/249Change recolor from command line2021-10-15T20:36:04+02:00SimoneChange recolor from command lineI would like to have a way to invert the color theme from command line. I know that I can send signals through dbus interface, but I still can't figure out which method to use to change theme.
Up to now, I can do it from an open documen...I would like to have a way to invert the color theme from command line. I know that I can send signals through dbus interface, but I still can't figure out which method to use to change theme.
Up to now, I can do it from an open documents using `Ctrl+r`, but that means that I should do it for every single instance.
The use case is pretty simple: I have to switch often from outside/inside locations and I have already a script to toggle light/dark theme for many applications. I want to add zathura to the list.https://git.pwmt.org/pwmt/zathura/-/issues/132[Feature Request] support running a sequence of zathura commandsa (e.g. via s...2021-07-15T22:21:26+02:00Nima[Feature Request] support running a sequence of zathura commandsa (e.g. via socat)First of all, I like to thank for such a nice piece of software. I love it and recently tried to use more of `zathurarc` to tailored it to my desire.
As one example of use case of such scenario: I have a custom colorscheme which uses co...First of all, I like to thank for such a nice piece of software. I love it and recently tried to use more of `zathurarc` to tailored it to my desire.
As one example of use case of such scenario: I have a custom colorscheme which uses commands such as `set recolor-lightcolor`, `set recolor-darkcolor`, `set default-bg`, etc. I can copy paste them to `zathurarc` and done. However, I like to have them on demand by issuing a single command whcih run all of these sequentially, then.
Is there a way to do this?https://git.pwmt.org/pwmt/zathura/-/issues/221[feature-request] Add dictionary support2021-07-14T18:14:45+02:00LeNya[feature-request] Add dictionary supportHello.
Sometimes when you read book you can find unknown words or phrases. It would be nice if zathura had an integration with dictionaries.Hello.
Sometimes when you read book you can find unknown words or phrases. It would be nice if zathura had an integration with dictionaries.https://git.pwmt.org/pwmt/zathura/-/issues/235[Feature request] When opening multiple files, open them in sorted order2021-07-14T18:11:22+02:00Hendrik Lankers[Feature request] When opening multiple files, open them in sorted orderWhen opening multiple files using a wildcard, e.g. `zathura *.pdf`, it would be cool if the files were opened in a sorted manner. For example, the files could be automatically sorted alphanumerically, or by identifying a common pattern a...When opening multiple files using a wildcard, e.g. `zathura *.pdf`, it would be cool if the files were opened in a sorted manner. For example, the files could be automatically sorted alphanumerically, or by identifying a common pattern among all qualified file names.
Use case: When opening a bunch of lecture notes at once, their order can often be determined by file name, making it easier to navigate through the windows. https://git.pwmt.org/pwmt/zathura/-/issues/150[Feature Request] macOS integration with gtk-mac-integration2021-01-05T16:02:16+01:00dr_selump14[Feature Request] macOS integration with gtk-mac-integrationHi guys, Thanks a lot for making this awesome pdfreader. I love it so much.
I'm using zathura on macOS everyday and notice that the window manager won't recognize the zathura's window.
I've done some research and found that including `g...Hi guys, Thanks a lot for making this awesome pdfreader. I love it so much.
I'm using zathura on macOS everyday and notice that the window manager won't recognize the zathura's window.
I've done some research and found that including `gtk-mac-integration` would probably solve the issue.
Unfortunately, I have very little experience with gtk's thing. Do anyone have some advice how I start integrating `gtk-mac-integration` ?
regardshttps://git.pwmt.org/pwmt/zathura/-/issues/138Basic APIs2020-08-31T11:28:36+02:00JinBasic APIsThank you for your amazing work! I hope another feature request won't put too much effort on you.. anyway, hope this will be helpful.
I think it will be helpful if some basic APIs can be released, for the users to write userscripts easi...Thank you for your amazing work! I hope another feature request won't put too much effort on you.. anyway, hope this will be helpful.
I think it will be helpful if some basic APIs can be released, for the users to write userscripts easier for themselves. Eg
1. the document that is being read
2. run time
3. the location of the cursor is in zathura
4. export bookmarks/quickmarks explicitly
5. the last selected section
..etc