Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 1.88 KB

readme.md

File metadata and controls

74 lines (54 loc) · 1.88 KB

Image Previews in vifm for sixel capable terminals

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.

Installation

  1. git clone https://github.com/eylles/vifm-sixel-preview

  2. cd vifm-sixel-preview

  3. make install

  4. Edit your ~/.config/vifm/vifmrc file and add fileviewer properties like so:

    fileviewer *.pdf
        \ vifm-sixel pdf %pw %ph %c %pd
        \ %pc
        \ vifm-sixel clear

    fileviewer *.epub
        \ vifm-sixel epub %pw %ph %c %pd
        \ %pc
        \ vifm-sixel clear

    fileviewer <video/*>
        \ vifm-sixel video %pw %ph %c %pd
        \ %pc
        \ vifm-sixel clear

    fileviewer <image/*>
        \ vifm-sixel draw %pw %ph %c %pd
        \ %pc
        \ vifm-sixel clear

    fileviewer <audio/*>
        \ vifm-sixel audio %pw %ph %c %pd
        \ %pc
        \ vifm-sixel clear

    fileviewer <font/*>
        \ vifm-sixel font %pw %ph %c %pd
        \ %pc
        \ vifm-sixel clear

Prerequisites

TODO

  • try to autodetect col and row pixel size (apparently can only be done for xterm and mlterm)
  • use montage to center the image over the correct preview panel bg color (will have to take code from lsix)

Credits

vifmimg

show-sixel