Even's DIY ‘n stuff blog

Well since this blog is about stuff that I find interesting I might as well share some linux related things here too.

While I was testing Alacritty terminal today I noticed some odd behavior with ranger, which is a terminal file manger.

While I prefer to use GUI file managers like Thunar, imo the image preview in ranger is something you can’t get in GUI managers. Well while I was playing with ranger in both urxvt and alacritty I noticed that the image preview breaks if I manipulate window sizes in awesomewm, or move focus out of the said window, etc.
I’ve had these small problems with image preview before but never got around fixing them, I always thought this is caused by the terminal emulator.

Well today while searching solution for the problem I noticed some user had changed the default w3mimage renderer to Überzug. After installing it I only needed to add these lines to rangers rc.conf file:

set preview_images true
set preview_images_method ueberzug

first line was already in my rc.conf, just needed to add the second one.

Now the image preview is working well both in ranger and alacritty.

tl:dr try to use Überzug if you have problems rendering images in terminal.

Link to Überzug repository:

1 Like