1. 2
  1.  

  2. 0

    But… why? Can somebody please explain to me why this is better than just running MuPDF in another window, maybe with some custom keyboard shortcuts? I don’t get it.

    1. 1

      A lot of us really like the terminal and the infrastructure around it such as Tmux.

      1. 1

        So, you can have a pdf viewer inside tmux inside a terminal inside your WM, OK, fine. But why? What does that give you? Is it just about key bindings? Or is it just “the terminal is cool, let’s cram everything we can into it?”

        1. 1
          1. You get the ability to hide and show the particular window in an intuitive fashion. Having a new window is often a distraction when you are working on something that requires multiple open terminals.
          2. Having something in a terminal, when using a tiling window manager such as awesome or xmonad lets you keep your preferred layout.
          3. Often I log into remote machines, and I do not have to worry about exporting X, or downloading the file locally. Sometimes, the file is too large, or gets rewritten too often, and I can simply check the latest report.
          4. On the whole much better control over desktop management.
          1. 1

            Thanks! I think your points 1, 2, and 4 are more or less the same: they’re about window management, i.e. key bindings and layout. I’d try to optimize these in my window manager, myself, but I suppose if I was already doing window management inside a terminal (with tmux or emacs or kitty or whatever) I might see it differently.

            Point 3 is different, and interesting. Does that actually work, though? Can I view a remote PDF over SSH in a local kitty+termpdf.py? I’d solve that at the filesystem level, with something like sshfs, that lets me use all my local tools.

            What I typically do with PDFs, beside the page navigation basics, is selecting and copying chunks of text, using a mouse. I don’t imagine that having my pdf viewer wrapped in a terminal would make that anything but complicated.

            1. 1

              Does that actually work, though? Can I view a remote PDF over SSH in a local kitty+termpdf.py?

              It worked for me with sixel. Copy and paste probably wouldn’t work; I never had to use that though. I extract the text from PDFs directly when necessary.

      2. 1

        Being able to display graphical content in a terminal window opens up all sorts of interesting possibilities (eg, being able to display graphical content within a terminal Emacs session). Unfortunately the graphical extensions added by iTerm2, Kitty, etc. don’t (yet) seem to be compatible with one another.

        1. 2

          There is the SIXEL standard that is supported even by the venerable Xterm.

          This PDF rendering (using the green pdf viewer) was done using sixel.

          1. 1

            Ah, thanks - I had forgotten about that. I see termpdf, termpdf.py’s shell-based predecessor, supports SIXEL.

            1. 1

              Wow, I had no idea this existed, and I’ve been unix’ing since the early 90s. So cool!