Preview Pictures, PDFs and Videos in vifm

Jake Jing
4 min readJul 31, 2020

It takes a while for me to figure out how you can preview pictures and pdfs in vifm on Kitty terminal. I tried many different utilities, such as w3m and überzug, but the displayed pictures are not satisfying or it is really a pain to deploy the environments on my MacBook.

I recently find that Kitty can support image display in the terminal via icat function (tested on kitty v0.24.2 & vifm 0.12). To make it work, you first need to install ImageMagick. See the Kitty webpage for details, and a tutorial for the configuration of kitty and vifm on your computer. This also works well when you need to switch between different panels.

You can test icat function via the following command:

kitty +kitten icat --place=10x10@0x0 image.png

Note: I recently got the following error ‘/dev/tty’ is not configured or no such device in kitty. You can try to install the latest vifm in git repository and the following settings should solve the problem now.

git clone https://github.com/vifm/vifm.git
cd vifm
./configure
make
make install
mv src/vifm /usr/local/bin/

1. Preview pictures

To preview the pictures, you need to configure the fileview for pictures in your “vifmrc” by replacing the default setting with the codes below.

--

--

Jake Jing
Jake Jing

Written by Jake Jing

Programming, Data science & Deep learning!

Responses (3)