3.3 KiB
3.3 KiB
obj | repo | rev |
---|---|---|
application | https://github.com/atanunq/viu | 2024-03-15 |
viu
A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer
. It uses either iTerm or Kitty graphics protocol, if supported. If not, lower half blocks (▄
or \u2584
) are displayed instead.
Based on the value of $TERM
, viuer
decides which protocol to use. For half blocks, $COLORTERM
is inspected. If it contains either truecolor
or 24bit
, truecolor (16 million colors) will be used. If not, it will fallback to using only ansi256. A nice explanation can be found in this gist.
Features
- Native iTerm and Kitty support
- Animated GIF support
- Accept media through stdin
- Custom dimensions
- Transparency
- Experimental Sixel support (behind the
sixel
feature flag)
Options
Usage: viu [OPTIONS] [file]...
Option | Description |
---|---|
-w, --width <width> |
Resize the image to a provided width |
-h, --height <height> |
Resize the image to a provided height |
-x <x> |
X offset [default: 0] |
-y <y> |
Y offset [default: 0] |
-a, --absolute-offset |
Make the x and y offset be relative to the top left terminal corner. If not set, they are relative to the cursor's position. |
-r, --recursive |
Recurse down directories if passed one |
-b, --blocks |
Force block output |
-n, --name |
Output the name of the file before displaying |
-t, --transparent |
Display transparent images with transparent background |
-f, --frame-rate <frames-per-second> |
Play the gif at a given frame rate |
-1, --once |
Loop only once through the gif |
-s, --static |
Show only the first frame of the gif |