Kind of a clone of vifmimg but for sixel
This script is used along vifm to generate image previews for various file types in vifm.
The script is currently able to handle the following formats:
- Video
- eBook
- Images
- Audio files
- Fonts
All previews are cached (except for regular images) and stored in your ~/.cache/vifm/ folder.
-
git clone https://github.com/eylles/vifm-sixel-preview -
cd vifm-sixel-preview -
make install -
Edit your ~/.config/vifm/vifmrc file and add fileviewer properties like so:
fileviewer *.pdf
\ vifmimg pdf %pw %ph %c %pd
\ %pc
\ vifmimg clear
fileviewer *.epub
\ vifmimg epub %pw %ph %c %pd
\ %pc
\ vifmimg clear
fileviewer <video/*>
\ vifmimg video %pw %ph %c %pd
\ %pc
\ vifmimg clear
fileviewer <image/svg\+xml>
\ vifmimg svg %pw %ph %c %pd
\ %pc
\ vifmimg clear
fileviewer <image/*>
\ vifmimg draw %pw %ph %c %pd
\ %pc
\ vifmimg clear
fileviewer <audio/*>
\ vifmimg audio %pw %ph %c %pd
\ %pc
\ vifmimg clear
fileviewer <font/*>
\ vifmimg font %pw %ph %c %pd
\ %pc
\ vifmimg clear
now you can run vifmrun and get this working
- bash
- perl (for xdg cache compliance)
- ffmpegthumbnailer
- ImageMagick
- pdftoppm (Available in the AUR as poppler package.)
- epub-thumbnailer
- fontpreview
In spite of the scripts being named vifmrun and vifmimg now it is not a 1 to 1 direct drop in
replacement to vifmimg, as you can see from the configuration and the macros given to be expanded as
arguments to the command being not exactly the same as for vifmimg, another key difference is the
usage of %pd which is to tell vifm that direct output is going to the terminal, so that sixels can
be displayed, this macro breaks with vifm.