Skip to content
Snippets Groups Projects
feh.pre 40.2 KiB
Newer Older
.Dd $DATE$
.Nm feh
.Nd image viewer and cataloguer
.
.Nm
.Op Ar options
.Op Ar files No | Ar directories No | Ar URLs ...
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
This manual documents
.Nm
$VERSION$
Compile-time switches: libcurl support $MAN_CURL$, Xinerama support
$MAN_XINERAMA$, builtin EXIF support $MAN_EXIF$$MAN_DEBUG$
.Sh DESCRIPTION
is a mode-based image viewer.  It is especially aimed at command line users who
need a fast image viewer without huge GUI dependencies, though it can also be
started by
file managers to view an image.
By default
.Pq unless arguments or a filelist are specified
.Nm
displays all files in the current directory.
supports filelists, various image sorting modes, image captions, HTTP and more.
Configurable keyboard shortcuts are used to control it; the mouse is also
supported, but only required for very few actions.
.Pp
.
.Nm
can also be used as wallpaper setter.
.
EXIF tags are supported either using exiv2 / exifgrep via
.Pq see the Sx USAGE EXAMPLES No section ,
or by compiling
.Nm
with exif=1.
is based on various modes, which are selected at startup by command line
Slideshow mode is the default.  It opens one window and displays the first
image in it, the keyboard and mouse can be used to change slides
.Pq images .
In slideshow mode, images can be deleted either from the filelist or from the
disk, the new filelist can then be saved to the disk and reopened at a later
time.
An image can also be read from stdin via
.Qq feh - .
Montage mode forms a montage from the filelist.  The resulting image can be
viewed or saved, and its size can be limited by height, width or both.
Index mode forms an index print from the filelist.  Image thumbnails are shown
along with the filename, filesize and pixel size, printed using a truetype
font of your choice.  The resulting image can be viewed or saved, and its size
can be limited by height, width or both.
Thumbnail mode is like index mode, but the mini-images are clickable and open
the selected image in a new window.
Multiwindow mode shows images in multiple windows, instead of as a slideshow
in one window.  Don't use with a large filelist ;)
List mode doesn't display images.  Outputs an
.Cm ls - No style
listing of the files in the filelist, including image info such as size,
pixels, type, etc.  Customlist mode will display whatever image info you want,
in the format you choose.
can also list either all the loadable files in a filelist or all the
unloadable files.  Useful for preening a directory.
.
.Sh SUPPORTED FORMATS
.
.Nm
can open any format supported by Imlib2, most notably jpeg and png.
.
If the convert binary
.Pq supplied by ImageMagick
is available, it also has limited support for many other filetypes, such as
svg, xcf and otf. Use
.Cm --magick-timeout Ar num
with a non-negative value to enable it.
.
For animated images, only the first frame is shown.
.
.Bl -tag -width indent
.It Cm -A , --action Oo Ar flag Oc Ns Oo [ Ar title ] Oc Ns Ar action
Specify a shell command as an action to perform on the image.  In slideshow or
multiwindow mode, the action will be run when the action_0 key is pressed, in
list mode, it will be run for each file.  In loadable/unloadable mode, it will
be run for each loadable/unloadable file, respectively.  In thumbnail mode,
clicking on an image will cause the action to run instead of opening the image.
If
.Ar flag
is
.Qq \&; ,
.Nm
will reload the current image instead of switching to the next one
.Pq slideshow mode
or closing the window
.Pq multiwindow mode
after
is specified
.Pq note the literal Qo \&[ Qc and Qo ] Qc ,
.Cm --draw-actions
will display
.Ar title
instead of
.Ar action
in the action list. Note that
.Ar title
must not start with a space. If it does, the action is handled as if it did
not have a title. This special case exists for backwards compatibility reasons
and makes sure that actions like
.Qq \&[ -L %F \&] && foo
still work.
.
The action will be executed by /bin/sh.  Use format specifiers to refer to
image info, see
.Sx FORMAT SPECIFIERS
for details.  Example usage:
.Qq feh -A Qo mv ~/images/%N Qc * .
.It Cm --action1 No .. Cm --action9
Extra actions which can be set and triggered using the appropriate number key.
.It Cm -Z , --auto-zoom
Zoom pictures to screen size in fullscreen / fixed geometry mode.
.It Cm -x , --borderless
Create borderless windows.
.It Cm -P , --cache-thumbnails
Enable thumbnail caching in
Only works with thumbnails <= 256x256 pixels.
.It Cm -K , --caption-path Ar path
Path to directory containing image captions.  This turns on caption viewing,
and if captions are found in
.Ar path ,
which is relative to the directory of each image, they are overlayed on the
displayed image.  E.g. with caption path
.Qq captions/ ,
and viewing image
.Qq images/foo.jpg ,
the caption will be looked for in
.Qq images/captions/foo.jpg.txt .
.It Cm -L , --customlist Ar format
Don't display images, print image info according to
instead.  See
.Sx FORMAT SPECIFIERS .
.It Cm --cycle-once
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
Exit
.Nm
after one loop through the slideshow.
.It Cm -G , --draw-actions
Draw the defined actions and what they do at the top-left of the image.
.It Cm --draw-exif
.
.Pq only if compiled with exif=1
display some EXIF information in the bottom left corner, similar to using
.Cm --info
with exiv2 / exifgrep .
.
.It Cm -d , --draw-filename
Draw the filename at the top-left of the image.
.It Cm --draw-tinted
.
Show overlay texts
.Pq as created by Cm --draw-filename No et al
on a semi-transparent background to improve their readability
.
.It Cm -f , --filelist Ar file
This option is similar to the playlists used by music software.  If
.Ar file
exists, it will be read for a list of files to load, in the order they appear.
The format is a list of image filenames, absolute or relative to the current
.Ar file
doesn't exist, it will be created from the internal filelist at the end of a
viewing session.  This is best used to store the results of complex sorts
.Pq Cm -Spixels No for example
for later viewing.
.
.Pp
.
Any changes to the internal filelist
.Pq such as deleting a file or it being pruned for being unloadable
will be saved to
.Ar file
when
.Nm
exits.  You can add files to filelists by specifying them on the command line
when also specifying the list.
.Pp
.
If
.Ar file
is
.Qq - ,
.Nm
will read the filelist from its standard input.
.
.It Cm -e , --font Ar font
Set global font.  Should be a truetype font, resident in the current directory
or the font directory, and should be defined in the form fontname/points, like
.Qq myfont/12 .
.It Cm -C , --fontpath Ar path
Specify
.Ar path
as extra directory in which to search for fonts; can be used multiple times to
add multiple paths.
.It Cm --force-aliasing
Disable antialiasing for zooming, background setting etc.
.
.It Cm -I , --fullindex
Same as index mode, but with additional information below the thumbnails.
Works just like
.Qq feh --index --index-info \&"\&%n\en\&%S\en\&%wx\&%h\&" .
Enables
.Sx MONTAGE MODE OPTIONS .
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
.Pp
.
Note: This option needs to load all images to calculate the dimensions of the
.Nm
window, so when using it with many files it will take a while before a
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
.Nm
window is visible.  Use
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
to get a progress bar.
.
Make the window fullscreen.
Note that in this mode, large images will always be scaled down to fit the
screen,
.Cm --zoom Ar zoom
only affects smaller images and never scales larger than necessary to fit the
screen size. The only exception is a
.Ar zoom
of 100, in which case images will always be shown at 100% zoom, no matter
their dimensions.
.It Cm -g , --geometry Oo Ar width No x Ar height Oc Op + Ar x No + Ar y
Limit (and don't change) the window size.  Takes an X-style geometry
.Ar string
like 640x480 with optional +x+y window offset.
Note that larger images will be zoomed out to fit, but you can see them at 1:1
by clicking the zoom button.
Also note that this option does not enforce the geometry, changing it by a tiling
WM or manually is still possible. After each resize, the resulting window size
is used as the new size limit.
.It Cm -Y , --hide-pointer
Hide the pointer
.Pq useful for slideshows .
.It Cm -B , --image-bg Ar style
Use style as background for transparent image parts and the like.
Accepted values: checks, white, black.
.
The default for windowed mode is checks, while fullscreen defaults to black.
.It Cm -i , --index
Enable Index mode.  Index mode is similar to montage mode, and accepts the
same options.  It creates an index print of thumbnails, printing the image
name beneath each thumbnail.  Index mode enables certain other options, see
.Sx INDEX MODE OPTIONS
and
.Sx MONTAGE MODE OPTIONS .
.It Cm --index-info Ar format
.
Show image information based on
.Ar format
below thumbnails in index / thumbnail mode.  See
.Sx FORMAT SPECIFIERS .
May contain newlines.
.
Use
.Qq --index-info So Sc
to display thumbnails without any info text
.
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
.Pp
.
Note: If you specify image-related formats
.Pq such as \&%w or \&%s ,
.Nm
needs to load all images to calculate the dimensions of its own window.
So when using them with many files, it will take a while before a
.Nm
window becomes visible.  Use
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
to get a progress bar.
.
.It Cm --info Oo Ar flag Oc Ns Ar commandline
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
Execute
.Ar commandline
and display its output in the bottom left corner of the image.  Can be used to
Birte Kristina Friesel's avatar
Birte Kristina Friesel committed
display e.g. image dimensions or EXIF information.  Supports
.Sx FORMAT SPECIFIERS .
.
If
.Ar flag
is set to
.Qo ; Qc ,
the output will not be displayed by default, but has to be enabled by the
toggle_info key.
.
.It Cm -k , --keep-http
When viewing files using HTTP,
.Nm
normally deletes the local copies after viewing, or, if caching, on exit.
This option prevents this so that you get to keep the local copies.
They will be in
.Pa /tmp
with
.Qq Nm
in the name.
William Woodruff's avatar
William Woodruff committed
.It Cm --insecure
.
When viewing files with HTTPS, this option disables strict hostname and peer
checking. This allows images on sites with self-signed certificates to be
opened, but is no more secure than plain HTTP.
.
.It Cm --keep-zoom-vp
.
When switching images, keep zoom and viewport settings
.Pq zoom level and X, Y offsets
.
.It Cm -l , --list
Don't display images.  Analyze them and display an
.Xr ls 1 - No style
listing.  Useful in scripts to hunt out images of a certain
size/resolution/type etc.
.It Cm -U , --loadable
Don't display images.  Just print out their names if imlib2 can successfully
load them.
Returns false if at least one image failed to load.
.It Cm --magick-timeout Ar timeout
.
Stop trying to convert unloadable files after
.Ar timeout
seconds. A negative value disables covert / magick support altogether, a value
of zero causes
.Nm
to try indefinitely. By default, magick support is disabled.
.It Cm --max-dimension Ar width No x Ar height
.
Only show images with width <=
.Ar width
and height <=
.Ar height .
If you only care about one parameter, set the other to 0
.Pq or a negative value .
.It Cm -M , --menu-font Ar font
Use
.Ar font
.Pq truetype, with size, like Qq yudit/12
as menu font.
.It Cm --min-dimension Ar width No x Ar height
.
Only show images with width >=
.Ar width
and height >=
.Ar height .
If you only care about one parameter, set the other to 0.
.
.It Cm -m , --montage
Enable montage mode.  Montage mode creates a new image consisting of a grid of
thumbnails of the images in the filelist.  When montage mode is selected,
certain other options become available.  See
.Sx MONTAGE MODE OPTIONS .
.It Cm -w , --multiwindow
Disable slideshow mode.  With this setting, instead of opening multiple files
in slideshow mode, multiple windows will be opened; one per file.
.It Cm --no-jump-on-resort
Loading
Loading full blame...