naheel-azawy / stpv Goto Github PK
View Code? Open in Web Editor NEWSimple Terminal PreViewer
License: GNU General Public License v3.0
Simple Terminal PreViewer
License: GNU General Public License v3.0
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.
same as title
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?
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.
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.
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?
terminal - kitty
Hello Naheel. Awesome job on this one - I just wanted to let you know I added it the Arch User Repository so that arch users may install it using the command paru -S stpv-git
. Keep up the good work!
https://aur.archlinux.org/packages/stpv-git/
This piece of code kills a preview if it takes too long to run, right?
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.
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?
How does one use this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.