Newer
Older
.Nm feh
.Nd image viewer and cataloguer
.
.Ar files or directories or URLs ...
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.Pp
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
Compile-time switches: libcurl support $MAN_CURL$, Xinerama support
$MAN_XINERAMA$, builtin EXIF support $MAN_EXIF$$MAN_DEBUG$
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
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
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.
.
.Pp
.
A little note about EXIF support: The recommended way to display EXIF data is
using exiv2 / exifgrep via
.Cm --info
.Pq see the Sx USAGE EXAMPLES No section .
However, if you compile feh with exif=1, you can also display it directly.
is based on various modes, which are selected at startup by command line
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
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 - .
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
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.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
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.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Thumbnail mode is like index mode, but the mini-images are clickable and open
the selected image in a new window.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Multiwindow mode shows images in multiple windows, instead of as a slideshow
in one window. Don't use with a large filelist ;)
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
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.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
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.
.
.It Cm -A , --action Oo Ar flag Oc Ns Ar action
Birte Kristina Friesel
committed
.
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.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
If
.Ar flag
is
.Qq \&; ,
.Nm
will reload the current image instead of switching to the next one after
executing the action.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
The action will be executed by /bin/sh. Use format specifiers to refer to
image info. See
.Sx FORMAT SPECIFIERS
for examples. E.g.
.Qq feh -A "mv ~/images/%n" * .
In slideshow mode, the next image will be shown after running the action, in
multiwindow mode, the window will be closed.
.It Cm --action1 No .. Cm --action9
Birte Kristina Friesel
committed
.
Extra actions which can be set and triggered using the appropriate number key.
Birte Kristina Friesel
committed
.
Zoom pictures to screen size in fullscreen / fixed geometry mode.
Birte Kristina Friesel
committed
.
.It Cm -P , --cache-thumbnails
Birte Kristina Friesel
committed
.
Enable thumbnail caching in
.Pa ~/.thumbnails .
Birte Kristina Friesel
committed
Only works with thumbnails <= 256x256 pixels.
.It Cm -K , --caption-path Ar path
Birte Kristina Friesel
committed
.
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
Birte Kristina Friesel
committed
.
Don't display images, print image info according to
Birte Kristina Friesel
committed
.
Exit
.Nm
after one loop through the slideshow.
.It Cm -G , --draw-actions
Birte Kristina Friesel
committed
.
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 .
.
Birte Kristina Friesel
committed
.
Draw the filename at the top-left of the image.
Birte Kristina Friesel
committed
.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
Birte Kristina Friesel
committed
.
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
directory, one filename per line.
.
.Pp
.
If
.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
Birte Kristina Friesel
committed
.
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 .
Birte Kristina Friesel
committed
.
Specify
.Ar path
as extra directory in which to search for fonts; can be used multiple times to
add multiple paths.
Birte Kristina Friesel
committed
.
Disable antialiasing for zooming, background setting etc.
.
Birte Kristina Friesel
committed
.
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 .
.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
.It Cm -F , --fullscreen
Birte Kristina Friesel
committed
.
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
Birte Kristina Friesel
committed
.
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
Birte Kristina Friesel
committed
Note that this option does not enforce the geometry, changing it by a tiling
WM or manually is still possible.
.
.It Cm -Y , --hide-pointer
Birte Kristina Friesel
committed
.
.Pq useful for slideshows .
Birte Kristina Friesel
committed
.
Use style as background for transparent image parts and the like.
Accepted values: checks (default), white, black.
Birte Kristina Friesel
committed
.
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.
.
.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
committed
.
and display its output in the bottom left corner of the image. Can be used to
display e.g. image dimensions or EXIF information. Supports
.Sx FORMAT SPECIFIERS .
.
Birte Kristina Friesel
committed
.
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.
.It Cm --keep-zoom-vp
.
When switching images, keep zoom and viewport settings
.Pq zoom level and X, Y offsets
.
Birte Kristina Friesel
committed
.
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.
Birte Kristina Friesel
committed
.
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 either something large
or -1.
.
.It Cm -M , --menu-font Ar font
Birte Kristina Friesel
committed
.
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.
.
Birte Kristina Friesel
committed
.
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 .
Birte Kristina Friesel
committed
.
Disable slideshow mode. With this setting, instead of opening multiple files
in slideshow mode, multiple windows will be opened; one per file.
Birte Kristina Friesel
committed
.
Don't jump to the first image after resorting the filelist.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.It Cm --no-screen-clip
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
By default, window sizes are limited to the screen size. With this option,
windows will have the size of the image inside them. Note that they may
become very large this way, making them unmanageable in certain window
managers.
Birte Kristina Friesel
committed
.
Disable Xinerama support. Only makes sense when you have Xinerama support
compiled in.
.It Cm -j , --output-dir Ar directory
Birte Kristina Friesel
committed
.
Save files to
.Ar directory
.Pq only useful with -k
Birte Kristina Friesel
committed
.
Preload images. This doesn't mean hold them in RAM, it means run through
them and eliminate unloadable images first. Otherwise they will be removed
as you flick through. This also analyses the images to get data for use in
sorting, such as pixel size, type etc. A preload run will be automatically
performed if you specify one of these sort modes.
Birte Kristina Friesel
committed
.
Don't report non-fatal errors for failed loads. Verbose and quiet modes are
not mutually exclusive, the first controls informational messages, the second
only errors.
Birte Kristina Friesel
committed
.
When viewing multiple files in a slideshow, randomize the file list before
displaying.
Birte Kristina Friesel
committed
.
Recursively expand any directories in the commandline arguments
to the content of those directories, all the way down to the bottom level.
Birte Kristina Friesel
committed
.
seconds. Useful for viewing HTTP webcams or frequently changing directories.
.Pq Note that the filelist reloading is still experimental.
Birte Kristina Friesel
committed
.Pp
.
If an image is removed,
.Nm
will either show the next one or quit. However, if an image still exists, but
can no longer be loaded,
.Nm
will continue to try loading it.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Reverse the sort order. Use this to invert the order of the filelist.
E.g. to sort in reverse width order, use
.Cm -nSwidth .
Birte Kristina Friesel
committed
.
When not in fullscreen: Scale images to screen size if they are too big.
.Pp
.
In tiling environments, this also causes the image to be centered in the window.
.
.It Cm -D , --slideshow-delay Ar float
Birte Kristina Friesel
committed
.
For slideshow mode, wait
.Ar float
seconds between automatically changing slides. Useful for presentations.
Birte Kristina Friesel
committed
Specify a negative number to set the delay
.Pq which will then be Ar float No * (-1) ,
Birte Kristina Friesel
committed
.
The file list may be sorted according to image parameters. Allowed sort
types are: name, filename, mtime, width, height, pixels, size, format. For sort
modes other than name, filename, or mtime, a preload run will be necessary,
causing a delay proportional to the number of images in the list.
.Pp
.
The mtime sort mode sorts images by most recently modified. To sort by oldest
first, reverse the filelist with --reverse.
.
.It Cm -| , --start-at Ar filename
Birte Kristina Friesel
committed
.
Start the filelist at
.Ar filename .
See
.Sx USAGE EXAMPLES .
Birte Kristina Friesel
committed
.
Load options from config file with name
.Ar theme
- see
for more info. Note that commandline options always override theme options.
The theme can also be set via the program name
.Pq e.g. with symlinks ,
so by default
.Nm
will look for a
.Qq Nm
theme.
Birte Kristina Friesel
committed
.
Same as Index mode, but the thumbnails are clickable image launchers.
.Cm --fullscreen
and
.Cm --scale-down
do not affect the thumbnail window. They do, however, work for image windows
launched from thumbnail mode.
Also supports
.Sx MONTAGE MODE OPTIONS .
.It Cm -~ , --thumb-title Ar string
Birte Kristina Friesel
committed
.
Set
.Ar title
for windows opened from thumbnail mode. See also
.Sx FORMAT SPECIFIERS .
Birte Kristina Friesel
committed
.
Set window title. Applies to all windows except those opened from thumbnail
mode. See
Birte Kristina Friesel
committed
.
Don't display images. Just print out their names if imlib2 can NOT
successfully load them.
Returns false if at least one image was loadable.
Birte Kristina Friesel
committed
.
output useful information, progress bars, etc.
Birte Kristina Friesel
committed
.
output version information and exit.
.It Cm --zoom Ar percent No | Cm max No | Cm fill
Birte Kristina Friesel
committed
.
Zoom images by
.Ar percent
when in full screen mode or when window geometry is fixed. When combined with
.Cm --auto-zoom ,
zooming will be limited to the specified
.Ar percent .
Birte Kristina Friesel
committed
.Cm max
is like setting
.Cm --auto-zoom ,
using
These additional options can be used for index, montage and
.Pq partially
thumbnail mode.
Birte Kristina Friesel
committed
.
When drawing thumbnails onto the background, set their transparency level to
.Ar int
.Pq 0 - 255 .
.It Cm -b , --bg Ar file No | Cm trans
Birte Kristina Friesel
committed
.
Use
.Ar file
as background for your montage. With this option specified, the montage size
will default to the size of
.Ar file
if no size restrictions were specified. Alternatively, if
.Ar file
is
.Qq trans ,
the background will be made transparent.
Birte Kristina Friesel
committed
.
By default, the montage thumbnails will retain their aspect ratios, while
fitting into thumb-width/-height. This options forces them to be the size set
by
.Cm --thumb-width No and Cm --thumb-height .
This will prevent any empty space in the final montage.
.It Cm -H , --limit-height Ar pixels
Birte Kristina Friesel
committed
.
Limit the height of the montage.
.It Cm -W , --limit-width Ar pixels
Birte Kristina Friesel
committed
.
Limit the width of the montage, defaults to 800 pixels.
.Pp
.
If both
.Cm --limit-width No and Cm --limit-height
are specified, the montage will be exactly
.Ar width No x Ar height
pixels in dimensions.
Birte Kristina Friesel
committed
.
Save the created montage to
.Ar file .
.It Cm -O , --output-only Ar file
Birte Kristina Friesel
committed
.
Just save the created montage to
.Ar file
without displaying it.
Birte Kristina Friesel
committed
.
Normally, if an image is smaller than the specified thumbnail size, it will
not be enlarged. If this option is set, the image will be scaled up to fit
the thumbnail size. Aspect ratio will be maintained unless
.Cm --ignore-aspect
is specified.
.It Cm -E , --thumb-height Ar pixels
Birte Kristina Friesel
committed
.
.It Cm -y , --thumb-width Ar pixels
Birte Kristina Friesel
committed
.
.It Cm -J , --thumb-redraw Ar n
Birte Kristina Friesel
committed
.
Only relevant for
.Cm --thumbnails :
Redraw thumbnail window every
.Ar n
images. In
.Nm
<= 1.5, the thumbnail image used to be redrawn after every computed thumbnail
.Pq so, it updated immediately .
However, since the redrawing takes quite long
.Pq especially for thumbnail mode on a large filelist ,
this turned out to be a major performance penalty.
As a workaround, the thumbnail image is redrawn every 10th image now by
default. Set
.Ar n No = 1
to get the old behaviour,
.Ar n No = 0
will only redraw once all thumbnails are loaded.
Birte Kristina Friesel
committed
.
.It Cm -@ , --title-font Ar font
Birte Kristina Friesel
committed
.
Set font to print a title on the index, if no font is specified, no title will
be printed.
.El
.
.Sh BACKGROUND SETTING
can also be used as a background setter. Unless you pass the
.Cm --no-fehbg
option, it will store the command line necessary to set the background in
.Pa ~/.fehbg ,
so to have your background restored every time you start X, you can add
to your X startup script
.Pq like Pa ~/.xinitrc .
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Note that all options except
.Cm --bg-tile
support Xinerama.
For instance, if you have multiple screens connected and use e.g.
.Cm --bg-center ,
.Nm
will center the image on each screen.
You may even specify more than one file, in that case, the first file is set
on screen 0, the second on screen 1, and so on.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Use
.Cm --no-xinerama
to treat the whole X display as one screen when setting wallpapers.
.
.Bl -tag -width indent
.
.It Cm --bg-center
Birte Kristina Friesel
committed
.
Center the file on the background. If it is too small, it will be surrounded
by a black border
.
.It Cm --bg-fill
Birte Kristina Friesel
committed
.
Like
.Cm --bg-scale ,
but preserves aspect ratio by zooming the image until it fits. Either a
horizontal or a vertical part of the image will be cut off
.
.It Cm --bg-max
Birte Kristina Friesel
committed
.
Like
.Cm --bg-fill ,
but scale the image to the maximum size that fits the screen with black borders on one side.
.
.It Cm --bg-scale
Birte Kristina Friesel
committed
.
Fit the file into the background without repeating it, cutting off stuff or
using borders. But the aspect ratio is not preserved either
.
.It Cm --bg-tile
Birte Kristina Friesel
committed
.
Tile
.Pq repeat
the image in case it is too small for the screen
.
.
Do not write a
.Pa ~/.fehbg
file
.
.El
.
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
.It %F
.
Escaped image path/filename
.Pq for use in shell commands
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Total number of files in filelist
Birte Kristina Friesel
committed
.
.It %L
.
Temporary copy of filelist. Multiple uses of %L within the same format string will return the same copy.
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
.It \&%N
.
Escaped image name
.
.It %o
.
x,y offset of top-left image corner to window corner in pixels
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.Pq kilopixels / megapixels
Birte Kristina Friesel
committed
.
.It %r
.
Image rotation. A half right turn equals pi.
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
.It %S
.
Birte Kristina Friesel
committed
Human-readable image size
.Pq kB / MB
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.It %V
.
Process ID
.
.It %z
.
current image zoom
.
for key bindings and
.Pa buttons
for mouse button bindings.
It will try to read them from
.Pa $XDG_CONFIG_HOME/feh/ ,
which
.Pq when XDG_CONFIG_HOME is unset
defaults to
.Pa ~/.config/feh/ .
If the files are not found in that directory, it will also try
.Pa /etc/feh/ .
.Pp
All config files treat lines starting with a
.Qq #
character as comments.
Note that mid-line comments are not supported.
.
.Pa .config/feh/themes
allows the naming of option groups, called themes.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
It takes entries of the form
.Qq Ar theme options ... ,
where
.Ar theme
is the name of the entry and
.Ar options
are the options which will be applied when the theme is used.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
An example entry would be
.Qq imagemap -rVq --thumb-width 40 --thumb-height 30 .
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
You can use this theme in two ways. Either call
.Qo
.Nm
-Timagemap *.jpg
.Qc
or create a symbolic link to
.Nm
with the name of the theme you want it to use. So from the example above:
.Qo
ln -s `which
.Nm
` ~/bin/imagemap
.Qc .
Now just run
.Qq imagemap *.jpg
to use these options.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Note that you can split a theme over several lines by placing a backslash at
the end of a line, like in the shell.
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
You can combine these themes with commandline options.
.Pa .config/feh/keys
defines key bindings.
It has entries of the form
.Qq Ar action Op Ar key1 Op Ar key2 Op Ar key3 .
Birte Kristina Friesel
committed
.
Birte Kristina Friesel
committed
.
Each
.Ar key
is an X11 keysym name as shown by
.Xr xev 1 ,
like
.Qq Delete .
It may optionally start with modifiers for things like Control, in which case
.Ar mod Ns No - Ns Ar keysym
.Po
for example
.Qq C-Delete
for Ctrl+Delete or
.Qq C-1-Delete