Git Product home page Git Product logo

stpv's People

Contributors

boscovn avatar lepz0r avatar naheel-azawy avatar nikitaivanovv avatar seirdy avatar spfabgerman avatar stoychod avatar xphyro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stpv's Issues

Chafa attempts sixel in unsupported cases

Chafa appears to attempt to use some sort of auto detection for determining to use sixels. I'm unsure if this is now default behavior or not. But when setting PV_TYPE=text in a sixel compatible terminal it appears to attempt to use sixel. However, this then fails in things like fzf.

For PV_TYPE=text in stpvimg, explicitly set the chafa format to symbols to avoid this behavior.

How can I use chafa as default previewer rather than kitty?

Hello I'm currently using lf as my file manager under wayland. lf leads me to this project for image preview. I've installed kitty but I mainly use foot as my default terminal emulator. I also installed chafa and it works in foot. I've added config to lfrc

set previewer stpv
set cleaner stpvimgclr
&stpvimg --listen $id
cmd on-quit $stpvimg --end $id

But this only works in kitty. How can I preview image in foot?

Ueberzug and fifo are not killed when lf is exited

Thank you for making this helpful script! I use it with lf and I have one problem: when I exit lf, ueberzug is not killed and files in /tmp are still there. I tested a little bit and it looks like lf doesn't kill processes started with & when it is exited.

Image preview not working

Hey, I tried to set this program up to preview images with lf, but I only get the output of exiftools instead of the actual image.

So instead of a preview, I'd see:

ExifTool Version Number         : 12.16
File Name                       : waves.jpg
Directory                       : pic/backgrounds
File Size                       : 170 KiB
File Modification Date/Time     : 2021:01:22 21:01:46+01:00
File Access Date/Time           : 2021:03:07 22:49:19+01:00
File Inode Change Date/Time     : 2021:01:22 21:06:14+01:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : inches
X Resolution                    : 96
Y Resolution                    : 96
Image Width                     : 1920
Image Height                    : 1080
Encoding Process                : Progressive DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 1920x1080
Megapixels                      : 2.1

Not sure what to do here.

Question: custom extensions

The README indicates that it's possible to define custom handlers but it doesn't mention the proper way to add them. Is it just editing the source code?

Long running previews are not aborted

This piece of code kills a preview if it takes too long to run, right?

stpv/stpv

Lines 163 to 177 in 18ab12c

# Because this script is expected to run inside a file
# manager. Now imagine scrolling over lots of files
# quickly. This will create tons of processes that are
# not so light... Keep in mind `convert` runs a lot in
# here... So, this will save your life and keep your
# machine safe!
real_main "$@" &
real_pid=$!
count=0
while [ $count -lt 500 ] && kill -0 $real_pid 2>/dev/null; do
count=$((count + 1))
sleep .01
done
ps -o pid= --ppid $real_pid | xargs kill >/dev/null 2>/dev/null
wait $real_pid

Today I noticed that if I select a ~1MB JSON file, the previewer in lf just stucks at Loading... for 5-10 seconds (it runs jq to generate JSON with syntax highlighting). I tried to investigate why the code above doesn't work in that case but failed.

Sixels support on foot

Hi, first, thanks for your contribution, I was using your script with kitty but my computer is not the best and the slowness when opening kitty is noticeable, so I've been using foot terminal instead. I've tested ranger-sixels with foot terminal and it was very interesting, but due to the speed of the ranger itself when running on my machine I've been trying to migrate to lf.

I don't know how complex this is and I apologize if I'm talking nonsense or asking too much, but, if possible, I would like to have a lighter experience (using foot terminal view with cache directory) but with a little more quality (provided by sixels through chafa).

Could you implement such function please?

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.