Find a file
crasm 7b050c0184 Store getopt() return in a signed variable
On certain platforms [0] a char may be unsigned [1]. The loop for
getopt would loop forever because:

     (char)-1 => 255 and 255 != -1

A signed char also worked. I don't know what that would mean for
performance or portability. int feels simpler to me.

[0]: I'm using Arch Linux ARM on the Samsung Chromebook 2, which is
     armv7h. Not sure about other ARM platforms. With this fix, imv
     appears to work correctly.

     details: https://archlinuxarm.org/platforms/armv7/samsung/samsung-chromebook-2

[1]: http://stackoverflow.com/questions/2054939/is-char-signed-or-unsigned-by-default#2054941
2016-12-28 01:38:05 -05:00
doc Describe command "d" in manual 2016-11-17 08:42:49 +01:00
files Change IMV to lowercase imv 2015-11-12 13:24:48 +01:00
src Store getopt() return in a signed variable 2016-12-28 01:38:05 -05:00
test Make imv_navigator_add() return an integer value 2016-05-01 14:40:54 +02:00
.gitignore Add testing infrastructure 2015-12-08 16:39:31 +00:00
.travis.yml Enable tests 2016-10-22 12:37:43 +02:00
AUTHORS Add AUTHORS file 2015-12-28 16:17:21 +00:00
CHANGELOG Release v2.1.3 2016-10-22 12:35:20 +01:00
CONTRIBUTING Add a CONTRIBUTING file 2015-11-13 20:28:04 +00:00
LICENSE Relicence imv to GPLv2+ 2015-11-12 17:49:23 +00:00
Makefile Simplify VERSION handling 2016-11-22 15:55:45 +01:00
README.md Add -x switch to exit imv when reaching end of file list. 2016-04-02 12:12:12 +02:00

Build Status imv - X11/Wayland Image Viewer

imv is a command line image viewer intended for use with tiling window managers.

Features

  • Wayland Support
  • Support for over 30 different image file formats including:
    • Photoshop PSD files
    • Animated GIFS
    • Various RAW formats

Usage

Opening images

imv image1.png another_image.jpeg yet_another.TIFF

Opening images via stdin

find . "*.png" | imv

Open an image fullscreen

imv -f image.jpeg

Viewing images in a random order

find . "*.png" | shuf | imv

Viewing images from stdin

curl http://somesi.te/img.png | imv -

Image picker

imv can be used to select images in a pipeline by using the p hotkey to print the current image's path to stdout. The -l flag can also be used to tell imv to list the remaining paths on exit for a "open set of images, close unwanted ones with x, then quit imv to pass the remaining images through" workflow.

Picking a wallpaper

custom-set-wallpaper-script "$(find ./wallpaper -type f -name '*.jpg' | imv | tail -n1)"

Deleting unwanted images

find -type f -name '*.jpg' | imv | xargs rm -v

Choosing pictures to email

find ./holiday_pics -type f -name '*.jpg' | imv | xargs cp -t ~/outbox

Viewing images from the web

curl -Osw '%{filename_effective}\n' 'http://www.example.com/[1-10].jpg' | imv

Slideshow

imv can be used to display slideshows. You can set the number of seconds to show each image for with the -t option at start up, or you can configure it at runtime using the t and T hotkeys to increase and decrease the image display time, respectively.

To cycle through a folder of pictures, showing each one for 10 seconds:

imv -t 10 ~/Pictures/London

The -x switch can be used to exit imv after the last picture instead of cycling through the list.

Installation

imv depends on pthreads, FontConfig, SDL2, SDL_TTF, and FreeImage.

$ make
# make install

Macro PREFIX controls installation prefix. If more control over installation paths is required, macros BINPREFIX, MANPREFIX and DATAPREFIX are available. Eg. to install imv to home directory, run:

$ BINPREFIX=~/bin PREFIX=~/.local make install

In case something goes wrong during installation process you may use verbose mode to inspect commands issued by make:

$ V=1 make

Tests

imv has a work-in-progress test suite. The test suite requires cmocka.

$ make check

Contact

There's an official irc channel for imv discussion and development on Freenode: #imv.

License

imv is published under the GPLv2 license.