Home > bash > feh: a fast and light image viewer

feh: a fast and light image viewer

feh is an X11 image viewer aimed mostly at console users. Unlike most other viewers, it does not have a fancy GUI, but simply displays images. It is controlled via commandline arguments and configurable key/mouse actions.” (source)

feh has lots of features, thus it has lots of command line options too. Here I sum up the most important options. For more info refer to the manual.

feh [options] [files | directories | URLs ...]

command line options
-F             fullscreen
-x             borderless window
-Z             auto zoom to fit window size
--draw-exif    display some EXIF info
-d             display filename
-Y             hide mouse pointer
-l             don't show images, just list their dimensions
-z             randomize
-D float       delay for slideshow
-t             show thumbnails
    scrolling: mouse or 
               Ctrl+Up/Down (soft scroll) or 
               Alt+Up/Down (bigger jumps)
-k             keep files in /tmp (useful when browsing URLs)
               (Note: it didn't seem to work for me).

commands in view mode
d           toggle filename
e           toggle exif
h           toggle pause (in slideshow mode)
m           show menu
q, ESC      quit
s           save image
v           toggle fullscreen
z           random jump
Ctrl+Del    delete file from file system
keypad +    zoom in
keypad -    zoom out
Ctrl+Up/Down/Left/Right    scroll
*           zoom 100%
/           zoom to fit window size
o           toggle mouse pointer
Home / End  jump to first / last image
PgDn        go 5% forward in file list
PgUp        go 5% backward in file list

$ feh
    browse images in the current directory
$ feh -Fd
    fullscreen, file info
$ feh -Fdz
    fullscreen, file info, random order
$ feh -Fdz -D 5
    fullscreen, file info, random order, slideshow with 5 sec. delay
$ feh -t
    show thumbnails
$ feh img.jpg
    Show this image only. Browsing other files is not possible.
$ feh . --start-at ./img.jpg
    Show img.jpg but allow browsing the other images too.
    You must write "./img.jpg" instead of "img.jpg"!
$ feh . --start-at ./img.jpg -Fd
    as before + fullscreen and file info
$ feh . --start-at ./img.jpg -FdZ
    as before + images are auto-zoomed to the window size

At the Arch Wiki you can find more info about feh. There is also a file browser image launcher script.

I also made a simple script:

#!/usr/bin/env bash

# feh_view.sh

if [[ ! -f $1 ]]; then
    echo "$0: first argument is not a file" >&2
    exit 1

feh . --start-at "./$1" -Fd

Usage: “feh_view.sh cool.jpg“. It will open the specified image in fullscreen. File info is displayed and you can browse other images too.

Categories: bash Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: