Code Monkey home page Code Monkey logo

vifmimg's Introduction

Image previews using Überzug for vifm (vi file manager)

image

This script is used along vifm to generate image previews for various file types in vifm.

If you want image preview support for lf check out cirala/lfimg.

The script is currently able to handle the following formats:

  • Video
  • Pdf
  • Djvu
  • eBook
  • Images
  • Audio files
  • Fonts

All previews are cached (except for regular images) and stored in your ~/.cache/vifm/ folder.

Installation

  1. Copy the vifmimg and vifmrun scripts to a folder that is included in your $PATH variable for easy access to the files.

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

    fileviewer *.pdf
        \ vifmimg pdf %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer *.djvu
        \ vifmimg djvu %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer *.epub
        \ vifmimg epub %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer <video/*>
        \ vifmimg video %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer <image/*>
        \ vifmimg draw %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer <audio/*>
        \ vifmimg audio %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

    fileviewer <font/*>
        \ vifmimg font %px %py %pw %ph %c
        \ %pc
        \ vifmimg clear

  1. In order to launch vifm with image preview support from now on, you will need to use the supplied vifmrun script.

I recommend that you make an alias in your shell that points to vifm.

Prerequisites

Credits

  • Seebye for creating Überzug and the initial script that this script is heavily based upon.
  • Ranger's approach to file previewing as an inspiration source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.