GithubHelp home page GithubHelp logo

koonix / lfutils Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 51 KB

scripts and utilities for the lf file manager.

License: GNU General Public License v3.0

Shell 96.16% Makefile 3.84%
lf terminal filemanager

lfutils's Introduction

lfutils

Useful scripts for the lf file manager.

Please take a look at the dependencies section before using lfutils.

Installation

There is an AUR package for Archlinux users:

paru -S lfutils-git

Otherwise:

git clone https://github.com/soystemd/lfutils.git
cd lfutils
sudo make install

Or just copy the scripts to a directory that's in yout PATH.

Utilities

lfrun

lfrun is a wrapper script for running lf, which initializes ueberzug for image previews.

lfpreviewer, lfcleaner

File previewer and cleaner scripts, for previewing files/media.

Add these lines to your lfrc:

set previewer lfpreviewer
set cleaner lfcleaner
set preview

Also see the LF_BAT_OPTS section for configuring text file preview settings.

lfmount

Mount and open archives. Archives are mounted read-only because archivemount's read-write mounting sucks.

If the pass environment variable is set, lfmount asks for a password.

Put this in your lfrc:

map [key] &lfmount $f

lfselect

Reads file names from stdin and selects them in lf. If only one file is given, it only puts the cursor over the file.

Examples:

sxiv -ao | lfselect
printf '%s\n' *.jpg | lfselect

Environment Variables

LF_BAT_OPTS

lfpreviewer uses bat for text file previews, called with the options -pf --number, which enables colorization and line numbers.

However, you can specify your own bat options by setting the LF_BAT_OPTS environment variable.

Example for ~/.bash_profile or ~/.zprofile:

export BAT_THEME='gruvbox-dark'
export LF_BAT_OPTS='-f'

Dependencies

The only hard dependency of lfutils is lf. All the dependencies listed here are technically optional, and installing each of them will add a certain feature to lfutils.

However, I recommend installing all of them, as they're pretty small, and you'll probably need most of them, if not all.

Archlinux users can install all of these dependencies (except for binutils and transmission-cli) by installing the AUR package lfutils-meta:

paru -S lfutils-meta
  • archivemount: Mounting and opening archives via lfmount
  • ueberzug: Image previews
  • chafa: Previewing images outside of a graphical environment
  • ffmpegthumbnailer: Previewing video thumbnails
  • bat: Previewing plain text and code
  • atool: Previewing archive contents (install atool-git(aur) for zstd support)
  • mediainfo: Previewing info about music/media files
  • odt2txt: Previewing OpenDocument files
  • poppler: Previewing PDF files
  • gnome-epub-thumbnailer: Previewing epub ebook covers
  • docx2txt: Previewing docx files
  • catdoc: Previewing Microsoft document files
  • imagemagick: Previewing svg files
  • libcdio: Previewing ISO files
  • binutils: Previewing object files
  • transmission-cli: Previewing .torrent files

lfutils's People

Contributors

omegarogue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

omegarogue

lfutils's Issues

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.