This set of scripts is used along lf to generate image previews and much like vifmimg it is able to handle image, video and ebook previews.
- The image preview will not disappear when changing the current working directory. This is due to the preview script only being run when hovering over files and not directories.
This script assumes that the preview pane is using one third of the window which should be the default behaviour for lf, but f you've changed this you will need to add the following line in your ~/.config/lf/lfrc file:
set ratios 1:2:3
Besides lf and Überzug you will need to install the following packages:
- ffmpegthumbnailer
- ImageMagick
- poppler
- epub-thumbnailer
- bc
In the project directory you can run the following command:
make install
To install this to your system, or you can do it manually by following the guide below:
- Extract the following files: image, preview to ~/.config/lf/.
- Extract lfrun to a directory that is in your $PATH variable (such as /usr/bin).
- Edit your ~/.config/lf/lfrc file and add the following line:
set previewer ~/.config/lf/preview
- In order to launch lf with image preview support from now on, you will need to use the supplied lfrun script.
I recommend that you make an alias in your shell that points to lfrun.
- lf
- Seebye's Überzug
- Brodie's initial preview script which I used as a template for handling the miscellaneous filetypes that this script also handles.