Giter Club home page Giter Club logo

findger's Introduction

findger

A Ranger plugin/script collection that adds cross support for macos Finder and mpv player. Uses Finder to preview virtually anything, the rest depends on quicklook plugins you use. Or mpv player for instant playback of video files and image previews.

screen-gif

Features

  1. Follow selection in Finder. Useful with Gallery view mode (Command+4 in Finder).
  2. Reveals selected file from active Finder window to Ranger.
  3. Reveals selected files from Ranger to Finder.
  4. Toggle synced red tag on selection in Finder and Ranger.
  5. Toggle instant playback or image preview through mpv.
  6. Synced playback of selected video files (up to 4) through mpv.

Installation

  1. Add the contents of commands.py to your ~/.config/ranger/commands.py file.
  2. Copy fplug.py and termplug.py to ~/.config/ranger/plugins
  3. Copy executables to somewhere in the $PATH(If you don't know: /usr/local/bin/).
  4. Install dependencies: brew install tag mpv iterm2 (If you are using another terminal application, then change iterm in the scripts to desired manually.)
  5. Copy setting for mpv from mpv.conf to ~/.config/mpv/mpv.conf
  6. Add key maps to your ~/.config/ranger/rc.conf
  7. Grant permissions in System Settings > Privacy & Security > Accessibility to iTerm and osascript

Keymap Examples

map <Space> findger                       # Toggle followed file preview through Finder
map <alt>/  finder_show                   # Show selected files in Finder
map <alt>?  finder_get                    # Go to path of the front Finder window
map '       red_tag                       # Mark file red in ranger and Finder
map <a-i>   finder_info %f                # Open Finder's file info on selection
map p       findger_mpv                   # Toggle instant video playback / Image previews with mpv
map ms      shell mpv-play-synced %p      # Play in sync up to 4 selected video files

Todo: Add better cross support for Finder's color tags.

Screenshot 2022-07-18 at 13 55 41

Inspired by termplug

findger's People

Contributors

bellavene avatar

Stargazers

Łukasz Fidosz avatar Thomas Soteros avatar Matt Parmett avatar

Watchers

 avatar

findger's Issues

ranger keeps looking for finder window after follow exit

Hi,
Great addition to ranger. using the powerful image rendering of macOS is pleasing.
when I toggle follow everything works fine but after exit I get an error in the middle of ranger
: Can't set Finder window 1 to POSIX file "file\path". (-10006).

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.