A simple image viewer for video terminals capable of sixel graphics.
Quickly preview, delete, and move files. Particularly useful on remote
machines over ssh
.
It's a shell script. Just download vv to a directory in your PATH (e.g., ~/bin or /usr/local/bin) and make it executable (chmod +x vv).
w
) mode; portrait pictures scroll vertically.1
). Cuts large picture into pieces, if necessary.B
), autorotate to use as much of the screen as possible.d
) images,
or use [-f] to default to full-size (slower, highquality) view.v
) to view full-size (slower, highquality) for current image only,
or use (f
) to toggle between fast and full-size viewing mode.+
), decreased (-
), or reset (0
).d
) images are moved to Trashcan (Freedesktop standard).u
) last trashed file.r
), move (m
) and save-a-copy (s
) remember the
previously used directory.W
). (Currently uses yandex).S
).r
) uses readline for easier editing.C
). Works with JPEG, PNG, TIFF, GIF, and more.v
) such as animated GIFs. (Requires 'sixvid' and ffmpeg).z
to toggle).This is designed mainly for quickly previewing, deleting, and renaming images over an ssh connection. For that reason, fast, small, low-quality images are emphasized and deletion is a single keystroke. (Note, undeletion is also a single key).
libglib2.0-bin's gio
will be used for moving files to the Trashcan, if
it is installed, but it is not required. See the trash() and untrash()
shell functions.
Bash 4.4 had a bug where catching SIGWINCH in the middle of a normal 'read' would cause the stty to go insane. For that reason, in the main loop we use 'read -e' which uses readline and does not suffer from the bug. (Bash 5 is fine.)
ImageMagick 6.9.12 has a few issues:
may not support webm video.
has a bug where a filename that has a colon in it will not work when frame zero is selected. As a workaround, this script uses "file://$filename[0]".
has a bug where RGB data is not read properly from sixel image files
v
(view just this image fullscreen) and f
(fullscreen
toggle) keys. Maybe should either be modal or not. Would it help to
redefine Enter
to always switch to fast mode and 'f' to always switch
to fullscreen mode? j
next, k
prev, h
back to parent directory, l
?) M
for mime? O
for open?)sixcat
program.^V
^J
to create a newline. Should they pop open an editor?The author, hackerb9, has long added little notes and blurbs to images in the JPEG "Comments" field. However, that humble field has been extended by EXIF, IPTC, and XMP to a dizzying degree: Description, Caption, Headline, Title, .... If you are a professional photographer and have feedback on how this program can better show and manipulate metadata, please send a bug report at https://github.com/hackerb9/vv/issues/
The IPTC industry standards define Title, Description/Caption, and Headline as:
A shorthand reference for the image or “photograph” - primarily for identification. The title of an image should be a short, human-readable name - text and/or numeric reference - and may take several forms. For photographers, this might be the filename of their original scan or digital camera file. The Title term should not be confused with the Headline term, which is a short synopsis of the photograph's content.
Title Examples: "IMG_9873", or "Sunrise Over Temple"
The Description field, often referred to as “Caption,” should report the who, what and why of what the photograph depicts. If there is a person or people in the image, this caption might include their names, and/or their roles in any action taking place. If the image depicts a location, then it should describe the location.
Description Example: "The Shore Temple of the Seven Pagodas was built under Narsimha II of the Pallava dynasty between 7th and 8th century AD and is dedicated to Lord Shiva. It resembles the structure of the Dharmaraja rath, but its tower rises much higher (approx. five stories or ~ 60 ft. high) and its stupa spire is small and slender."
A headline is a brief, publishable synopsis or summary of the contents of the photograph. Like a news story's lead, the Headline should grab attention and summarize the image's content. Headlines must be succinct. Leave any supporting narrative for the Description field. Do not, however, confuse the Headline term with Title.
Headline Example: "Shore Temple, Malibalipuram, India"
So, it sounds like, in theory, "Title" is supposed to be the title of the document, like a filename and would be where we jot down typical comments. HOWEVER: Microsoft Windows uses "Title" as the Caption and Flickr uses "Title" as the Headline. So, YMMV.
For now, vv does not alter IPTC and only allows setting the "Comment"
field using the C
key`. However, the editproperty function should
work once we figure out what the right field to edit is.