previuwu
An all-in-one preview window for the furries.
Uses egui to render the preview window.
STATUS: Proof of Concept (
Demo
Preview texts
previuwu.mp4
Preview images
previuwu.mp4
Install
Better don't install it as of now, unless you want to contribute.
cargo install --git https://github.com/sayanarijit/previuwu
Usage
Preview a single file:
previuwu /path/to/file
Allow streaming input from stdin:
previuwu /path/to/file --pipe -
Also allow streaming input from a named pipe:
# mkfifo path/to/input.fifo
previuwu /path/to/file --pipe - --pipe path/to/input.fifo
Use Case
Run a slide show of the contents in your $PWD:
ls -1 | while read -r file; do echo "$file"; sleep 1; done | previuwu -p -
Example usage with xplr and nnn:
# Create a fifo file
mkfifo /tmp/previuwu.fifo
# Run previuwu in background (will close automatically when done)
previuwu --pipe /tmp/previuwu.fifo &
# Run xplr with fifo enabled
xplr --on-load 'StartFifo: /tmp/previuwu.fifo'
# Run nnn with fifo enabled
NNN_FIFO=/tmp/previuwu.fifo nnn
Supports
I plan to support as many input types as possible.
- Stdin
- Named Pipes (fifo)
- Socket
- ...ideas?
Very basic (ugly) support for the following file types has been implemented:
- Directory
- Text
- Images
- ...contribute?
Contribute
First of all, thank you.
Please go through src/preview
and try to implement loading and/or rendering as many file types as you can.
Loading is the easy part. Rendering might require some experience with egui.
Some files can be really slow to load/render in development mode (cargo run
). Try running in release mode (cargo run --release
).