 Last week I did a little video talking about PDF readers and I mentioned that I used the program Zathura Which a lot of people asked about I guess a lot of people don't know about it is a minimalist and VIM based PDF reader So I figured I'd do a video on it just because a lot of people asked I mean you could just read the manual, but if people just read the manual there wouldn't be any reason for me to showcase things So we might as well do it So Zathura before I even show you the program just know that it is a such a minimalist program that is as By default, it's actually just a shell that can't really read anything. So in order for the Zathura Program to actually be able to read files. You have to install some little sub modules with it now I'm on Arch so on Arch, you know the different programs or the different packages I should say that it comes in is you're gonna want to install Zathura I presume you want to be able to read PDFs So you should install Zathura PDF poplar or Zathura PDF MU PDF Those will enables the Zathura to actually read PDFs And you can also have other modules so you can if you want to be able to read deja vu files Which I do I have Zathura's deja vu or Zathura PS for post script files and you can actually Check your repositories There are going to be other modules as well one annoying thing about a lot of PDF readers is that they only read PDFs But Zathura can read a whole bunch of things because it's built as being kind of module modular So you have Zathura CB for reading comic books There's an EPUB reader. I think up here somewhere. I probably can't see it, but yeah, it's definitely up there So yeah So there are different modules you can give it and just know that when you install it You should make sure you have some of these installed so it can actually read files. That's the point But it is a highly minimalist very responsive a very useful PDF reader Let's get into how this thing actually works. So I'm going to open up PDF Here we have one here. It is Phonological movement in classical Greek now it works pretty much as you would expect I'm going to turn on my key bindings first So if you want to move up and down in a document J and K just like in Vim you can zoom in with plus You can zoom out with minus You can press equal to get back to 100% zoom Notice also when you're zoomed in or whatever You can press H or L to move left and right pretty much as you would expect in Vim Now one of the common things you might want to do with a PDF is print things out now to issue commands to Zathura It comes with a bunch of commands You can read them all in the manual, but when you might want to use quite a great deal is print So I'm going to type colon and that brings up a little command line You probably can't see it because it's so small, but I can type in print Press enter and it will give you your print menu so you can decide how to print this document or whatever So in the basic bindings move up and down Zoom in and out with minus and plus and stuff like that now additionally, I should actually I should show you this because This PDF doesn't have it some PDFs will of course have links in them So this has a link here. This has a link there To follow a link in Zathura. You just type in F So F will bring up it will number all your links. So this one's to this one's for this one's three Whatever and I can say let's say I want to go to science direct comm I can just type in three and enter again. This is supposed to be a totally keyboard-based PDF reader General document reader you can use your mouse, but there are shortcuts for doing all the stuff You know that you would do you with your mouse. So here we can see this this nice little link came up So again, you can follow links and stuff like that now. I'm going to show you my configuration for Zathura my config file now, which by default By default the config file is going to be in config Zathura Zathura RC now you can see I've added a couple things in here I got rid of the padding the horizontal padding and the vertical padding to documents because by default I think they come with a little padding on the side or whatever This page padding here. That is how many pixels Separate different pages. So this little separation here if you want it to be bigger You can have it do that by putting you know putting in a larger amount I also remap a bunch of keys just to make them a little more to my liking I guess I mentioned that zoom in is plus and minus I prefer that to be capital K and capital J Vim keys. So they're nice and accessible. So I've moved those here I can still press plus and minus Recolor by default you have a nice little night mode in Zathura and you can get to that with control R So control R toggles that I've remapped it to I as well because I just prefer that if you've used MU PDF That's the binding for that. So that's very convenient when you're reading at night I've mapped print to P. Just so I don't even have to type in the command I just press P. Although as you can see I don't really have any printers on this computer and additionally, so I've remapped you and D to move up half of a page or down half of a page by default They're control you can and control D just like in Vim, but I don't like typing control I don't feel it's necessary. Although one thing about that by default There's a let me show you by default. There is a page mode mode where you can get dual pages I've remapped this to capital D by default. It's D But I've remapped it since I'm using D for something else, but I find it just as easy So for some screens, this might help again by default the binding is D I've remapped it on my configs to capital D And there are other things like you know rotate. I haven't mapped to capital R I think it's lowercase R by default But you can rotate documents if you need to if you download a PDF of a map or something like that That's something that I often find I need to use So it's very convenient you have a bunch of other stuff and you can check of course the manual page for the other things or The manual of Zathura RC and this will give you a you know How to set different variables how to map different things now one thing well it lists out all the commands you can you know Map or whatever of course as you would expect a man page to do Now one thing I don't really use but is available in Zathura is different modes for Well, it can be modal in the same way that Vim is modal. So you can have things like I don't think it's a RC file. It's just in the default Yeah, so by default there are some a bunch of bindings of course and you can activate a full-screen mode by typing F11 and then that that has slightly different bindings or you can have presentation mode with F5 And that has slightly different bindings as well now. I don't use these You might find them useful. You can you you can put in custom bindings for all of these. It's very nice I just don't happen to use them if I want a full-screen something I'll full-screen it with my i3 binding and I don't mind using the same You know the same I guess keyboard shortcuts for it Other things other nice little vimisms. I guess let's say I want to bookmark a page. Let's say You know, there's this nice little the paragraph here that I really like So let's say I want to bookmark this in the same way that you can bookmark a certain line in Vim You can use M to mark and then I'm gonna mark this with Oh Oh because I don't know it says one kind of evidence Let's say I want to mark this paragraph. So if I'm in another Portion of the document. Let's say I press GG to go to the top Of course Vim bindings GG to go to the top capital G to go to the bottom If I'm in at another portion of the document, I can type in Quotation mark and then oh and that will return to the place that I marked Just like in Vim you can mark lines with M and go back to them with quotation mark So that's very helpful if you want to move around a document very quickly I don't think I said it before but you can barely see it down here because you know My settings have it so small you do have your page number in the bottom right Notice that this particular document it has three out of five because there are three out of five PDF pages Or two out of five now that we've gone up and there's also the real number of the PDF page If you have that kind of metadata, which is right here I would notice also I'm I'm sort of highlighting things if you actually go over text and select it You'll say that it it'll say that it actually selected that text to your primary Selection so that means if I go somewhere, you know I can paste it in with the middle mouse button or something like that Which isn't very useful in the terminal But you know this can be very useful to copy things and stuff like that Now I think I've pretty much gone over most of it There's one additional thing that I find very I find very helpful about Zathura and that is Zathura can Read content from the standard input now what I mean by that now if you've watched my Let's see if you watch my recent videos on graph Here's a little graph file I have now if I want to compile this let me get rid of these shortcuts if I want to compile this One thing you can do let's say This is just you know the syntax to compile a graph document take this document I'm going to output it to a PDF, but if all that's going to output the standard output one nice thing about Zathura is I can actually just pipe that directly into it and You have it read you have hyphen for reading standard input So if I run this Zathura is going to pop up It's not reading a file that actually exists instead. It's reading that standard input. You can actually see down here It's reading temp as a thorough standard input So that's very nice If you just want to have a if you don't want to have a PDF as a file But you just want to pre-view some PDF information now You might say when do I actually use that that doesn't seem very useful I will say that I found a very nice Implementation of this a second ago or a second ago a couple days ago And that is if you use my dot files, you know that one nice little thing I have is if you press Super and then f1 it brings up this little help document that has a list of a list of all the key bindings And you know a bunch of stuff that you can click on or I guess learn about or whatever So you can check one thing that I had in my github repository is I wanted to have this document and constantly update it when I made changes to You know some key binding so this document was always updated now originally what I was doing is continually pushing a PDF file To my git repository, which is a big waste of space because that's a file that gif or gif Git can't properly analyze. It's not going to be able to diff. You know the differences between PDFs really So instead of doing that I actually have now I have just a readme file which exists only in as a graph text document, which is this thing right here and What I have now is I have the binding of f1 instead of create or instead of viewing a PDF that exists it actually just immediately compiles this graph document and Sends it to Zathura as standard input now what that means is all I have to do is now change this document and whenever A user presses that document on their file or their their own, you know Implementation of my doubt files it brings up a PDF, but this PDF isn't actually in the git repository It's actually just you know Zathura is reading it as standard input So this is much more convenient for using with git because you don't have to worry about it You know this is one of the reasons people use graph for you know doing manuals and stuff like that because pretty much Everyone has the ability to compile a graph document if you're using my you know larbs configuration you have it So this is a much more easy way of having a document that you can come sort of compile real-time on people's computers So that's one really nice implementation It's a good implementation of both graph and Zathura's read standard input ability And now I don't have to worry about having a PDF in my repository and constantly Belly aching about how much size I'm going to be using whenever I push some minor change And I have to redo the and you know effectively it rereads the entire PDF which causes very bloated repositories All right, let me tack on one little thing that I forgot about but this is something that might make or break that the Program for some of you guys one very nice feature about Zathura despite the fact that is very that it is very minimalist It does have the ability to auto update files So if I compile this document and bring up a Zathura window for it, here's my nice little graph document Let's say I throw in another paragraph here. So here is another paragraph And if I compile that you'll notice that this new text appeared in the Zathura document I do not have to despite the fact that I did Remap the reload key to R if I press that it will reload the file But Zathura Regardless of that is still monitoring the file that is open to check to see if there are changes So it will auto update now this I think is something that MU PDF does not do by default I know that like Sumatra PDF on Windows will do this, but this is just another little thing and this can make or break well, it's really gonna make a Particular implementation or coding not coding style, but you know, I guess document creation style you may have So I just wanted to throw that in I realized I forgot it in the original video, but anyway, so that's about it I hope you guys enjoyed it. I find Zathura is a good example of a program that is very it's very small But it's very manipulatable as you can see I had a pretty good implementation of it with the graph that makes Makes doing something more complicated very simple very elegant, so you don't have to worry about it so I enjoy this program and Despite the fact that you can do a bunch of cool stuff with it including a lot of stuff that I can't mention, but it's in the man It it still is extremely easy to use and extremely easy to get out and just even if you don't change anything about it It's still a very useful program. So anyway, I encourage you to try it if you're on I'm pretty sure it runs. I mean it definitely runs on Linux and BSD or whatever But I don't know if it runs on Windows or any of that, but either way I don't know why you're using Windows or whatever, but anyway, so I'll see you guys next time Hope you learned something and have a good one