NNN is a very fast, minimal terminal-based file manager. You can easily navigate, manipulate files in the command line, and much more. If you're a terminal user, you should check this out. It'll supercharge your productivity to another level.
You need to set a NNN_FIFO path and a key for the plugin with NNN_PLUG. I'm using "p" key to see the preview.
For zsh/bash users, copy this line into .bashrc or .zshrc
For fish users, put this into config.fish file
set --export NNN_FIFO "/tmp/nnn.fifo"
set -x NNN_PLUG "p:preview-tui"
Open kitty config file ( ~/.config/kitty/kitty.conf ), find and change these variables:
That's it. Now, open nnn in a terminal and hover over an image file. Press 'p and see the preview of the image. You can change the split position by changing enabled_layout variable in kitty.conf