Hacker News new | ask | show | jobs
by jumpwah 3937 days ago
urxvt also supports viewing images (or at least I know that because that's the emulator I use, maybe other emulators also support it)

Like I know ranger has an option for it, but iirc there's also a way to just run a command ala `cat`ing a text file. If you'd like, I can look into it more if you can't already find out how to do it by searching.

Also, people are mentioning feh, I'd like to plug in sxiv (not my program though).

2 comments

xterm supports tektronix vector graphics... And sixel (and regis). You can cat the graphics, and it will display (may have to build xterm from source -- Fedora enables tek, but not sixel, for example). GNU plot supports sixel.
Wow, how? I use urxvt and dindn't know that.
Sorry for the late reply. I found it, I got the method from this blog post [1] initally. Also see [2].

However, I'm sad to say that when I tried this again rn, it didn't work anymore. (I know for a fact it used to work great because I used to use it.)

The funny thing is, ranger's image preview still works for me (same terminal and everything), so I guess one could start going through the ranger source code to see how they wrap w3mimagedisplay if they really wanted to.

I don't really have the motivation for that though because, although I'm a heavy terminal user (and it would be nice), recently switching to emacs means a lot of my file management can be done with dired (an emacs package). And dired can do image previews quite nicely already [3] (I'm assuming provided you're using GUI emacs^). ^^

^Emacs can fire up terminals inside it anyway, so using GUI emacs is not a problem for me, even though I'm heavily terminal orientated.

^^Although I think I prefer sxiv's thumbnail mode for browsing directories full of images (as opposed to a few here and there).

[1]: http://blog.z3bra.org/2014/01/images-in-terminal.html

[2]: https://github.com/hut/ranger/wiki/Image-Previews

[3]: https://github.com/ralesi/ranger#screencast

The ranger file manager, which I use can do image previews in urxvt and claims to also work with iTerm, st and xterm.