All Projects β†’ atanunq β†’ Viu

atanunq / Viu

Licence: mit
Simple terminal image viewer written in Rust.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Viu

Chafa
πŸ“ΊπŸ—Ώ Terminal graphics for the 21st century.
Stars: ✭ 774 (-15.04%)
Mutual labels:  cli, terminal, image-viewer
Clifx
Declarative framework for building command line interfaces
Stars: ✭ 900 (-1.21%)
Mutual labels:  cli, terminal
Lsankidb
β˜† `ls` for your local Anki database.
Stars: ✭ 21 (-97.69%)
Mutual labels:  cli, terminal
Devdash
🍱 Highly Configurable Terminal Dashboard for Developers and Creators
Stars: ✭ 939 (+3.07%)
Mutual labels:  cli, terminal
Nord Guake
An arctic, north-bluish clean and elegant Guake color theme.
Stars: ✭ 20 (-97.8%)
Mutual labels:  cli, terminal
Ergonomica
πŸ–₯️ a cross-platform modern shell.
Stars: ✭ 815 (-10.54%)
Mutual labels:  cli, terminal
Git Praise
A nicer git blame.
Stars: ✭ 24 (-97.37%)
Mutual labels:  cli, terminal
Cheat.sh
the only cheat sheet you need
Stars: ✭ 27,798 (+2951.37%)
Mutual labels:  cli, terminal
Diskonaut
Terminal disk space navigator πŸ”­
Stars: ✭ 856 (-6.04%)
Mutual labels:  cli, terminal
Tui Consolelauncher
Linux CLI Launcher for Android
Stars: ✭ 861 (-5.49%)
Mutual labels:  cli, terminal
Tabulate
Table Maker for Modern C++
Stars: ✭ 862 (-5.38%)
Mutual labels:  cli, terminal
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (-14.16%)
Mutual labels:  cli, terminal
Create Component App
Tool to generate different types of React components from the terminal. πŸ’»
Stars: ✭ 879 (-3.51%)
Mutual labels:  cli, terminal
Initior
A command line application that let's you initialize your new projects the right way, replaces npm and yarn's init πŸŽ†
Stars: ✭ 17 (-98.13%)
Mutual labels:  cli, terminal
Bat
A cat(1) clone with wings.
Stars: ✭ 30,833 (+3284.52%)
Mutual labels:  cli, terminal
Fluddy
🀝 A dependency-free command line utility for managing, updating, creating and launching Flask Apps.
Stars: ✭ 23 (-97.48%)
Mutual labels:  cli, terminal
Python Progressbar
Progressbar 2 - A progress bar for Python 2 and Python 3 - "pip install progressbar2"
Stars: ✭ 682 (-25.14%)
Mutual labels:  cli, terminal
So
A terminal interface for Stack Overflow
Stars: ✭ 694 (-23.82%)
Mutual labels:  cli, terminal
Ws50 Sync
ws50-sync is a python based program which pulls air quality data from your Withings account and stores it directly in a Domoticz DB.
Stars: ✭ 8 (-99.12%)
Mutual labels:  cli, terminal
Curlie
The power of curl, the ease of use of httpie.
Stars: ✭ 877 (-3.73%)
Mutual labels:  cli, terminal

Description

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

Installation

From source (recommended)

Installation from source requires a local Rust environment.

git clone https://github.com/atanunq/viu.git

# Build & Install
cd viu/
cargo install --path .

# Use
viu img/giphy.gif

Or without cloning:

cargo install viu

Binary

A precompiled binary can be downloaded from the release page. GPG fingerprint is B195BADA40BEF20E4907A5AC628280A0217A7B0F.

Packages

Arch Linux

Available in community/viu.

NetBSD

Available in graphics/viu.

Usage

Examples

On a Kitty terminal:

Kitty

On a Mac with iTerm:

iTerm

Using half blocks (Kitty protocol and tmux do not get along):

Demo

Demo

Demo

Ctrl-C was pressed to stop the GIFs.

When viu receives only one file and it is GIF, it will be displayed over and over until Ctrl-C is pressed. However, when couple of files are up for display the GIF will be displayed only once.

iTerm note

iTerm can handle GIFs by itself with better performance, but configuration through --once and --frame-rate will have no effect there.

Aspect Ratio

If no flags are supplied to viu it will try to get the size of the terminal where it was invoked. If it succeeds it will fit the image and preserve the aspect ratio. The aspect ratio will be changed only if both options -w and -h are used together.

Command line options

USAGE:
    viu [FLAGS] [OPTIONS] [FILE]...
    When FILE is -, read standard input.

FLAGS:
    -m, --mirror         Display a mirror of the original image
    -n, --name           Output the name of the file before displaying
    -1, --once           Only loop once through the animation
    -r, --recursive      Recurse down directories if passed one
    -s, --static         Show only first frame of gif
    -t, --transparent    Display transparent image with transparent background

OPTIONS:
    -f, --frame-rate <frames-per-second>    Play gif at the given frame rate
    -h, --height <height>    Resize the image to a provided height
    -w, --width <width>      Resize the image to a provided width

ARGS:
    <FILE>...    The image to be displayed
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].