1FEH(1)                    BSD General Commands Manual                   FEH(1)
2

NAME

4     feh — image viewer and cataloguer
5

SYNOPSIS

7     feh [options] [--] [files | directories | URLs ...]
8

VERSION

10     This manual documents feh 3.9.1
11
12     Compile-time switches in this build:
13     libcurl remote file support enabled
14     Xinerama multi-monitor support enabled
15     libexif builtin EXIF reader available
16     inotify-based auto-reload of changed files disabled
17     libmagic disabled
18

DESCRIPTION

20     feh is a light-weight, configurable and versatile image viewer.  It is
21     aimed at command line users, but can also be started from graphical file
22     managers.  Apart from viewing images, it can compile text and thumbnail
23     listings, show (un)loadable files, set X11 backgrounds, and more.
24
25     Features include filelists, various image sorting modes, custom action
26     scripts, and image captions.  feh can be controlled by configurable key‐
27     board and mouse shortcuts, terminal input and signals.  When no file ar‐
28     guments or filelists are specified and --start-at is not used, feh dis‐
29     plays all files in the current directory.
30
31     EXIF tags are supported either using exiv2 / exifgrep via --info (see the
32     USAGE EXAMPLES section), or as a builtin feature by compiling feh with
33     exif=1. In this build of feh, builtin EXIF support is available.
34

MODES

36     feh is based on various modes, which are selected at startup by command
37     line options.
38
39     Slideshow mode is the default.  It opens a window and displays the first
40     image in it; the slideshow position can be advanced (or otherwise
41     changed) using keyboard and mouse shortcuts.  In slideshow mode, images
42     can be deleted either from the filelist or from the disk, a changed
43     filelist can also be saved to the disk and reopened at a later time.  An
44     image can also be read from stdin via "feh -".
45
46     Montage mode forms a montage from the filelist.  The resulting image can
47     be viewed or saved, and its size can be limited by height, width or both.
48
49     Index mode forms an index print from the filelist.  Image thumbnails are
50     shown along with the filename, size and dimensions, printed using a true‐
51     type font of your choice.  The resulting image can be viewed or saved,
52     and its size can be limited by height, width or both.
53
54     Thumbnail mode is like index mode, but the mini-images are clickable and
55     open the selected image in a new window.
56
57     Multiwindow mode shows images in multiple windows, instead of as a
58     slideshow in one window.  Don't use with a large filelist ;)
59
60     List mode doesn't display images.  Instead, it outputs an ls-style list‐
61     ing of the files in the filelist, including image info such as size, num‐
62     ber of pixels, type, etc.  There is also a Customlist mode which prints
63     image info in a custom format specified by a printf-like format string.
64
65     feh can also list either all the loadable files in a filelist or all the
66     unloadable files.  This is useful for preening a directory.
67

SUPPORTED FORMATS

69     feh can open any format supported by imlib2, most notably jpeg, png, pnm,
70     tiff, and bmp.  The gif format is also supported, but only for static im‐
71     ages.  In case of animations, only the first frame will be shown.  If the
72     convert binary (supplied by ImageMagick) is available, it also has lim‐
73     ited support for many other file types, such as svg, xcf and otf.  If
74     dcraw is available, feh also supports RAW files provided by cameras and
75     will display the embedded thumbnails.  Use --conversion-timeout timeout
76     with a non-negative value to enable support for these formats.
77
78     (optional feature, disabled in this build) feh can use libmagic to only
79     pass image files to Imlib2.  This feature is disabled in this build.
80     When using feh with lots of non-image files (especially with Imlib2
81     version 1.6.x or 1.7.0), this can speed up the detection of non-image
82     files significantly.  If you think that Imlib2 can load a file which feh
83     has determined to be likely not an image, set the environment variable
84     "FEH_SKIP_MAGIC" to pass all files directly to Imlib2, bypassing this
85     check.  The environment variable's value does not matter, it just needs
86     to be set.
87

OPTIONS

89     -A, --action [flag][[title]]action
90             Specify a shell command as an action to perform on the image.  In
91             slideshow or multiwindow mode, the action will be run when the
92             action_0 key is pressed, in list mode, it will be run for each
93             file.  In loadable/unloadable mode, it will be run for each load‐
94             able/unloadable file, respectively.  In thumbnail mode, clicking
95             on an image will cause the action to run instead of opening the
96             image.
97
98             If flag is ";", feh will reload the current image instead of
99             switching to the next one (slideshow mode) or closing the window
100             (multiwindow mode) after executing the action.  If [title] is
101             specified (note the literal "[" and "]"), --draw-actions will
102             display title instead of action in the action list.  Note that
103             title must not start with a space.  If it does, the action is
104             handled as if it did not have a title.  This special case exists
105             for backwards compatibility reasons and makes sure that actions
106             like "[ -L %F ] && foo" still work.
107
108             The action will be executed by /bin/sh.  Use format specifiers to
109             refer to image info, see FORMAT SPECIFIERS for details.  Example
110             usage: "feh -A "mv %F ~/images/%N" *".
111
112     --action1 .. --action9 [flag][[title]]action
113             Extra actions which can be set and triggered using the appropri‐
114             ate number key.
115
116     --auto-reload
117             (optional feature, disabled in this build) automatically reload
118             image when the underlying file changes.  Note that auto-reload
119             (if enabled in the build) is on by default.  This option is only
120             useful to re-enable auto-reload after it has been disabled by a
121             preceding --reload=0 option.
122
123             Automatic reload is not supported in montage, index, or thumbnail
124             mode.
125
126     --auto-rotate
127             (optional feature, available in this build) (deprecated in favor
128             of Imlib2's auto-orientation support) Automatically rotate images
129             based on EXIF data.  Does not alter the image files.
130
131             Note that Imlib2 version 1.7.5+ performs auto-rotation by itself,
132             so this option is obsolete on systems with Imlib2 version 1.7.5
133             or later.  feh currently cannot detect this at runtime.
134
135     -Z, --auto-zoom
136             Zoom pictures to screen size in fullscreen / fixed geometry mode.
137
138     -x, --borderless
139             Create borderless windows.
140
141     --cache-size size
142             Set imlib2 in-memory cache to size MiB.  A higher cache size can
143             significantly improve performance especially for small slide
144             shows, however at the cost of increased memory consumption.  size
145             must be between 0 and 2048 MiB and defaults to 4.
146
147     -P, --cache-thumbnails
148             Enable thumbnail caching.  Thumbnails are saved in
149             $XDG_CACHE_HOME/thumbnails, which defaults to
150             ~/.cache/thumbnails.  Note that thumbnails are only cached if the
151             configured thumbnail size does not exceed 256x256 pixels.
152
153     -K, --caption-path path
154             Path to directory containing image captions.  This turns on cap‐
155             tion viewing, and if captions are found in path, which is rela‐
156             tive to the directory of each image, they are overlayed on the
157             displayed image.  E.g. with caption path "captions/", and viewing
158             image "images/foo.jpg", the caption will be looked for in
159             "images/captions/foo.jpg.txt".
160
161     --conversion-timeout timeout
162             feh can use ImageMagick to try converting unloadable files into a
163             supported file format.  As this can take a long time, it is dis‐
164             abled by default.  Set timeout to a non-negative value to enable
165             it.  A positive value specifies after how many seconds conversion
166             attempts should be aborted, zero causes feh to try indefinitely.
167             Negative values restore the default by disabling conversion alto‐
168             gether.
169
170     --class class
171             Set the X11 class hint to class.  Default: feh
172
173     -L, --customlist format
174             Don't display images, print image info according to format in‐
175             stead.  See FORMAT SPECIFIERS.
176
177     -G, --draw-actions
178             Draw the defined actions and what they do at the top-left of the
179             image.
180
181     --draw-exif
182             (optional feature, available in this build) display some EXIF in‐
183             formation in the bottom left corner, similar to using --info with
184             exiv2 / exifgrep.
185
186     -d, --draw-filename
187             Draw the file name at the top-left of the image.
188
189     --draw-tinted
190             Show overlay texts (as created by --draw-filename et al) on a
191             semi-transparent background to improve their readability.
192
193     --edit  Enable basic editing of files.  This makes rotation and mirroring
194             (bound to "<", ">", "|", and "_" by default) change the underly‐
195             ing file and not just its displayed content.
196
197     -f, --filelist file
198             This option is similar to the playlists used by music software.
199             If file exists, it will be read for a list of files to load, in
200             the order they appear.  The format is a list of image file names,
201             absolute or relative to the current directory, one file name per
202             line.
203
204             If file doesn't exist, it will be created from the internal
205             filelist at the end of a viewing session.  This is best used to
206             store the results of complex sorts (-Spixels for example) for
207             later viewing.
208
209             Any changes to the internal filelist (such as deleting a file or
210             it being pruned for being unloadable) will be saved to file when
211             feh exits.  You can add files to filelists by specifying them on
212             the command line when also specifying the list.
213
214             If file is "-", feh will read the filelist from its standard in‐
215             put.
216
217     -e, --font font
218             Set global font.  Should be a truetype font, resident in the cur‐
219             rent directory or the font directory, and should be defined in
220             the form fontname/size, like "yudit/12" (which is the default).
221
222     -C, --fontpath path
223             Specify path as extra directory in which to search for fonts; can
224             be used multiple times to add multiple paths.
225
226     --force-aliasing
227             Disable anti-aliasing for zooming, background setting etc.
228
229     -I, --fullindex
230             Same as index mode, but with additional information below the
231             thumbnails.  Works just like "feh --index --index-info
232             "%n\n%S\n%wx%h"".  Enables MONTAGE MODE OPTIONS.
233
234             Note: This option needs to load all images to calculate the di‐
235             mensions of the feh window, so when using it with many files it
236             will take a while before a feh window is visible.  Use --preload
237             to get a progress bar.
238
239     -F, --fullscreen
240             Make the window fullscreen.  Note that in this mode, large images
241             will always be scaled down to fit the screen, and --zoom zoom
242             only affects smaller images and never scales larger than neces‐
243             sary to fit the screen size.  The only exception is a zoom of
244             100, in which case images will always be shown at 100% zoom.
245
246             When combined with --thumbnails, this option only affects images
247             opened from the thumbnail overview.  The thumbnail list itself
248             will still be windowed.
249
250     -g, --geometry width x height | + x + y | width x height + x + y
251             Use a fixed window size as specified in the X-style geometry
252             string, e.g. 640x480.  An optional +x+y window offset can be
253             specified.  Combine with --scale-down to scale down larger images
254             like in fullscreen mode.  Note that this option does not enforce
255             the window size; changing it by a tiling WM or manually is still
256             possible.  However, auto-resize remains disabled.
257
258     -Y, --hide-pointer
259             Hide the pointer (useful for slideshows).
260
261     -B, --image-bg style
262             Use style as background for transparent image parts and the like.
263             Accepted values: default, checks, or an XColor (e.g. "black" or
264             "#428bdd").  Note that some shells treat the hash symbol as a
265             special character, so you may need to quote or escape it for the
266             XColor code to work.  In windowed mode, the default is checks (a
267             checkered background so transparent image parts are easy to see).
268             In fullscreen and background setting mode, checks is not accepted
269             and the default is black.
270
271     -i, --index
272             Enable Index mode.  Index mode is similar to montage mode, and
273             accepts the same options.  It creates an index print of thumb‐
274             nails, printing the image name beneath each thumbnail.  Index
275             mode enables certain other options, see INDEX AND THUMBNAIL MODE
276             OPTIONS and MONTAGE MODE OPTIONS.
277
278     --info [flag]command_line
279             Execute command_line and display its output in the bottom left
280             corner of the image.  Can be used to display e.g. image dimen‐
281             sions or EXIF information.  Supports FORMAT SPECIFIERS.  If flag
282             is set to ";", the output will not be displayed by default, but
283             has to be enabled by the toggle_info key.
284
285     --insecure
286             When viewing files with HTTPS, this option disables all certifi‐
287             cate checks.  It allows images on sites with self-signed or ex‐
288             pired certificates to be opened, but is no more secure than plain
289             HTTP.
290
291     -k, --keep-http
292             When viewing files using HTTP, feh normally deletes the local
293             copies after viewing, or, if caching, on exit.  This option per‐
294             manently stores them on disk, either in the directory specified
295             by --output-dir, or in the current working directory.
296
297     --keep-zoom-vp
298             When switching images, keep zoom and viewport settings (zoom
299             level and X, Y offsets)
300
301     -l, --list
302             Don't display images.  Analyze them and display an ls(1) - style
303             listing.  Useful in scripts to hunt out images of a certain
304             size/resolution/type etc.
305
306     -U, --loadable
307             Don't display images.  Just print out their names if imlib2 can
308             successfully load them.  Returns false if at least one image
309             failed to load.
310
311     --max-dimension width x height
312             Only show images with width <= width and height <= height.  If
313             you only care about one parameter, set the other to 0 (or a
314             negative value).
315
316     -M, --menu-font font
317             Use font (truetype, with size, like "yudit/12") as menu font.
318
319     --min-dimension width x height
320             Only show images with width >= width and height >= height.  If
321             you only care about one parameter, set the other to 0.
322
323     -m, --montage
324             Enable montage mode.  Montage mode creates a new image consisting
325             of a grid of thumbnails of the images in the filelist.  When mon‐
326             tage mode is selected, certain other options become available.
327             See MONTAGE MODE OPTIONS.
328
329     -w, --multiwindow
330             Disable slideshow mode.  With this setting, instead of opening
331             multiple files in slideshow mode, multiple windows will be
332             opened; one per file.
333
334     --no-conversion-cache
335             When loading images via HTTP, ImageMagick or dcraw, feh will only
336             load/convert them once and re-use the cached file on subsequent
337             slideshow passes.  This option disables the cache.  It is also
338             disabled when --reload is used.  Use it if you rely on frequently
339             changing files loaded via one of these sources.  Note that it
340             will impair performance.
341
342     --no-jump-on-resort
343             Don't jump to the first image after resorting the filelist.
344
345     -N, --no-menus
346             Don't load or show any menus.
347
348     --no-screen-clip
349             By default, window sizes are limited to the screen size.  With
350             this option, windows will have the size of the image inside them.
351             Note that they may become very large this way, making them unman‐
352             ageable in certain window managers.
353
354     --no-xinerama
355             (optional feature, enabled in this build) Disable Xinerama sup‐
356             port.
357
358     --on-last-slide hold | quit | resume
359             Select behaviour when trying to select the next image on the last
360             slide (or the previous image on the first slide) in a slide show.
361
362             With hold, feh will stop advancing images in this case and con‐
363             tinue displaying the first/last image, respectively.  This is in‐
364             tended for linear slide shows.  Behaviour is unspecified when us‐
365             ing other navigation commands than previous and next image.
366
367             quit will cause feh to quit when trying to advance past the last
368             image in the slide show.
369
370             resume is the default behaviour: On the last (first) image, feh
371             will wrap around to the first (last) image.
372
373     -j, --output-dir directory
374             Save files to directory when using --keep-http or the save_image
375             or save_filelist command.  By default, files are saved in the
376             current working directory.
377
378     -p, --preload
379             Preload images.  This doesn't mean hold them in RAM, it means run
380             through them and eliminate unloadable images first.  Otherwise
381             they will be removed as you flick through.  This also analyses
382             the images to get data for use in sorting, such as pixel size,
383             type etc.  A preload run will be automatically performed if you
384             specify one of these sort modes.
385
386     -q, --quiet
387             Don't report non-fatal errors for failed loads.  Verbose and
388             quiet modes are not mutually exclusive, the first controls infor‐
389             mational messages, the second only errors.
390
391     -z, --randomize
392             When viewing multiple files in a slideshow, randomize the file
393             list before displaying.  The list is re-randomized whenever the
394             slideshow cycles (that is, transitions from last to first image).
395
396     -r, --recursive
397             Recursively expand any directories in the command line arguments
398             to the content of those directories, all the way down to the bot‐
399             tom level.
400
401     --no-recursive
402             Don't recursively expand any directories.  This is the default,
403             but this option is useful to override themes containing
404             --recursive.
405
406     -R, --reload int
407             Reload filelist and current image after int seconds.  Useful for
408             viewing HTTP webcams or frequently changing directories.  (Note
409             that filelist reloading is still experimental.) Set to zero to
410             disable any kind of automatic reloading.
411
412             If an image is removed, feh will either show the next one or
413             quit.  However, if an image still exists, but can no longer be
414             loaded, feh will continue to try loading it.
415
416             Setting this option causes inotify-based auto-reload to be dis‐
417             abled.  Reload is not supported in montage, index, or thumbnail
418             mode.
419
420     -n, --reverse
421             Reverse the sort order.  Use this to invert the order of the
422             filelist.  E.g. to sort in reverse width order, use -nSwidth.
423
424     -., --scale-down
425             Scale images to fit window geometry (defaults to screen size when
426             no geometry was specified).  Note that the window geometry is not
427             updated when changing images at the moment.  This option is rec‐
428             ommended for tiling window managers.  This option is ignored when
429             in fullscreen and thumbnail list mode.
430
431             In tiling environments, this also causes the image to be centered
432             in the window.
433
434     --scroll-step count
435             Scroll count pixels whenever scroll_up, scroll_down, scroll_left
436             or scroll_right is pressed.  Note that this option accepts nega‐
437             tive numbers in case you need to reverse the scroll direction.
438             See KEYS CONFIG SYNTAX for how to reverse it permanently.  De‐
439             fault: 20
440
441     -D, --slideshow-delay float
442             For slideshow mode, wait float seconds between automatically
443             changing slides.  Useful for presentations.  Specify a negative
444             number to set the delay (which will then be float * (-1)), but
445             start feh in paused mode.
446
447     -S, --sort sort_type
448             Sort file list according to image parameters.  Allowed sort types
449             are: name, filename, dirname, mtime, width, height, pixels, size,
450             format.  For sort modes other than name, filename, dirname, or
451             mtime, a preload run is necessary, causing a delay proportional
452             to the number of images in the list.
453
454             mtime starts with the most recently modified image.  width,
455             height, pixels and size start with the smallest.  Use --reverse
456             to sort by oldest or largest first.
457
458             For name, filename, and dirname you can use --version-sort to
459             sort numbers naturally, so that e.g. 10.jpg comes after 2.jpg.
460
461     -|, --start-at filename
462             Start the filelist at filename.  If no other files or filelists
463             were specified on the command line, feh will first load all files
464             from the directory in which filename resides.  This way, it's
465             possible to look at a specific image and use the next / prev keys
466             to browse through the directory.  See USAGE EXAMPLES for exam‐
467             ples.  If filename is a remote URL and no files or filelists were
468             specified, feh will show filename and not attempt to load addi‐
469             tional files or directories.
470
471             Note: If you use relative paths in your filelist, filename should
472             also be a relative path.  If you use absolute paths, it should
473             also be an absolute path.  If feh cannot find an exact match, it
474             will compare basenames (filenames without the directory suffix).
475             This may lead to mismatches if several files in your filelist
476             have the same basename.
477
478     -T, --theme theme
479             Load options from config file with name theme - see THEMES CONFIG
480             SYNTAX for more info.  Note that command line options always
481             override theme options.  The theme can also be set via the pro‐
482             gram name (e.g. with symlinks), so by default feh will look for a
483             "feh" theme.
484
485     -t, --thumbnails
486             Same as Index mode, but the thumbnails are clickable image
487             launchers.  Note that --fullscreen and --scale-down do not affect
488             the thumbnail window.  They do, however, work for image windows
489             launched from thumbnail mode.  Also supports INDEX AND THUMBNAIL
490             MODE OPTIONS as well as MONTAGE MODE OPTIONS.
491
492     -~, --thumb-title string
493             Set title for windows opened from thumbnail mode.  See also
494             FORMAT SPECIFIERS.
495
496     -^, --title title
497             Set window title.  Applies to all windows except those opened
498             from thumbnail mode.  See FORMAT SPECIFIERS.
499
500     -u, --unloadable
501             Don't display images.  Just print out their names if imlib2 can
502             NOT successfully load them.  Returns false if at least one image
503             was loadable.
504
505     -V, --verbose
506             output useful information, progress bars, etc.
507
508     -v, --version
509             output version information and exit.
510
511     --version-sort
512             When combined with --sort name, --sort filename, or --sort
513             dirname: use natural sorting for file and directory names.  In
514             this mode, filenames are sorted as an ordinary human would ex‐
515             pect, e.g.  "2.jpg" comes before "10.jpg".  Note that this option
516             only has an effect when a sort mode is set using --sort.
517
518     --window-id windowid
519             Draw to an existing X11 window by its ID windowid.  This option
520             is intended for use with software such as xcreensaver or xsecure‐
521             lock, which provide a window for other applications to draw into.
522             Unexpected things will happen if you specify a window belonging
523             to software which does not expect feh to draw into it or attempt
524             to use options or keybindings which affect window attributes,
525             such as full-screen mode.
526
527     --xinerama-index monitor
528             (optional feature, enabled in this build) Override feh's idea of
529             the active Xinerama monitor.  May be useful in certain circum‐
530             stances where the window manager places the feh window on Xin‐
531             erama monitor A while feh assumes that it will be placed on moni‐
532             tor B.
533
534             In background setting mode: When used with any option other than
535             --bg-tile: Only set wallpaper on monitor.  All other monitors
536             will be filled black/white.  This is most useful in a Xinerama
537             configuration with overlapping monitors.  For instance, assume
538             you have two overlapping displays (index 0 and 1), where index 0
539             is smaller.  To center a background on the display with index 0
540             and fill the extra space on index 1 black/white, use
541             "--xinerama-index 0" when setting the wallpaper.
542
543             Use xrandr --listmonitor to determine how Xinerama monitor IDs
544             map to screens/monitors in your setup.
545
546     --zoom percent | max | fill
547             Zoom images by percent when in full screen mode or when window
548             geometry is fixed.  When combined with --auto-zoom, zooming will
549             be limited to the specified percent.  Specifying max is like set‐
550             ting --auto-zoom, using fill makes feh zoom the image like the
551             --bg-fill mode.
552
553     --zoom-step percent
554             Zoom images in and out by percent (default: 25) when using the
555             zoom keys and buttons.
556

MONTAGE MODE OPTIONS

558     These additional options can be used for index, montage and (partially)
559     thumbnail mode.
560
561     -a, --alpha int
562             When drawing thumbnails onto the background, set their transpar‐
563             ency level to int (0 - 255).
564
565     -b, --bg file | trans
566             Use file as background for your montage.  With this option speci‐
567             fied, the montage size will default to the size of file if no
568             size restrictions were specified.  Alternatively, if file is
569             "trans", the background will be made transparent.
570
571     -X, --ignore-aspect
572             By default, the montage thumbnails will retain their aspect ra‐
573             tios, while fitting into thumb-width/-height.  This options
574             forces them to be the size set by --thumb-width and
575             --thumb-height.  This will prevent any empty space in the final
576             montage.
577
578     -H, --limit-height pixels
579             Limit the height of the montage.
580
581     -W, --limit-width pixels
582             Limit the width of the montage, defaults to 800 pixels.
583
584             If both --limit-width and --limit-height are specified, the mon‐
585             tage will be exactly width x height pixels in dimensions.
586
587     -o, --output file
588             Save the created montage to file.
589
590     -O, --output-only file
591             Just save the created montage to file without displaying it.
592
593     -s, --stretch
594             Normally, if an image is smaller than the specified thumbnail
595             size, it will not be enlarged.  If this option is set, the image
596             will be scaled up to fit the thumbnail size.  Aspect ratio will
597             be maintained unless --ignore-aspect is specified.
598
599     -E, --thumb-height pixels
600             Set thumbnail height.
601
602     -y, --thumb-width pixels
603             Set thumbnail width.
604

INDEX AND THUMBNAIL MODE OPTIONS

606     In addition to MONTAGE MODE OPTIONS --alpha, --bg, --limit-height,
607     --limit-width, --output, --output-only, --thumb-height, --thumb-width,
608     the following options can be used.
609
610     --index-info format
611             Show image information based on format below thumbnails in index
612             / thumbnail mode.  See FORMAT SPECIFIERS.  May contain newlines.
613             Use "--index-info ''" to display thumbnails without any info text
614
615             Note: If you specify image-related formats (such as %w or %s),
616             feh needs to load all images to calculate the dimensions of its
617             own window.  So when using them with many files, it will take a
618             while before a feh window becomes visible.  Use --preload to get
619             a progress bar.
620
621     -@, --title-font font
622             Set font to print a title on the index, if no font is specified,
623             no title will be printed.
624
625     -J, --thumb-redraw n
626             Redraw thumbnail window every n images while generating thumb‐
627             nails.  Redrawing takes quite long, so the default is 10.  Set n
628             = 1 to update the thumbnail window immediately.  With n = 0,
629             there will only be one redraw once all thumbnails are loaded.
630

BACKGROUND SETTING

632     In many desktop environments, feh can also be used as a background set‐
633     ter.  Unless you pass the --no-fehbg option, it will write a script to
634     set the current background to ~/.fehbg.  So to have your background re‐
635     stored every time you start X, you can add "~/.fehbg &" to your X startup
636     script (such as ~/.xinitrc).  Note that the commandline written to
637     ~/.fehbg always includes the --no-fehbg option to ensure that it is not
638     inadvertently changed by differences in X11 screen layout or similar.
639
640     Note that feh does not support setting the wallpaper of GNOME shell desk‐
641     tops.  In this environment, you can use "gsettings set
642     org.gnome.desktop.background picture-uri file:///path" instead.
643
644     For --bg-center, --bg-fill, and --bg-max, you can use --geometry to spec‐
645     ify an offset from one side of the monitor instead of centering the im‐
646     age.  Positive values will offset from the left/top side, negative values
647     from the bottom/right.  +0 and -0 are both valid and distinct values.
648
649     Note that all options except --bg-tile support Xinerama.  For instance,
650     if you have multiple monitors connected and use e.g.  --bg-center, feh
651     will center or appropriately offset the image on each monitor.  You may
652     even specify more than one file, in that case, the first file is set on
653     monitor 0, the second on monitor 1, and so on.  Use xrandr --listmonitor
654     to determine how Xinerama monitor IDs map to screens / monitors in your
655     setup.
656
657     Use --no-xinerama to treat the whole X display as one monitor when set‐
658     ting wallpapers.  You may also use --xinerama-index to use feh as a back‐
659     ground setter for a specific monitor.
660
661     --bg-center
662             Center the file on the background.  If it is too small, it will
663             be surrounded by a border as specified by --image-bg.
664
665     --bg-fill
666             Like --bg-scale, but preserves aspect ratio by zooming the image
667             until it fits.  Either a horizontal or a vertical part of the im‐
668             age will be cut off
669
670     --bg-max
671             Like --bg-fill, but scale the image to the maximum size that fits
672             the screen with borders on one side.  The border color can be set
673             using --image-bg.
674
675     --bg-scale
676             Fit the file into the background without repeating it, cutting
677             off stuff or using borders.  But the aspect ratio is not pre‐
678             served either
679
680     --bg-tile
681             Tile (repeat) the image in case it is too small for the screen
682
683     --no-fehbg
684             Do not write a ~/.fehbg file
685

FORMAT SPECIFIERS

687     %a      Information about slideshow state (playing/paused)
688
689     %f      Image path/filename
690
691     %F      Escaped image path/filename (for use in shell commands)
692
693     %g      w,h window dimensions in pixels (mnemonic: geometry)
694
695     %h      Image height
696
697     %l      Total number of files in filelist
698
699     %L      Temporary copy of filelist.  Multiple uses of %L within the same
700             format string will return the same copy.
701
702     %m      Current mode
703
704     %n      Image name
705
706     %N      Escaped image name
707
708     %o      x,y offset of top-left image corner to window corner in pixels
709
710     %p      Number of image pixels
711
712     %P      Number of image pixels in human-readable format with k/M
713             (kilopixels / megapixels) suffix
714
715     %r      Image rotation.  A half right turn equals pi.
716
717     %s      Image size in bytes
718
719     %S      Human-readable image size (kB / MB)
720
721     %t      Image format
722
723     %u      Number of current file
724
725     %w      Image width
726
727     %v      feh version
728
729     %V      Process ID
730
731     %z      Current image zoom, rounded to two decimal places
732
733     %Z      Current image zoom, higher precision
734
735     %%      A literal %
736

CONFIGURATION

738     feh has three config files: themes for theme definitions, keys for key
739     bindings and buttons for mouse button bindings.  It will try to read them
740     from $XDG_CONFIG_HOME/feh/, which (when XDG_CONFIG_HOME is unset) de‐
741     faults to ~/.config/feh/.  If the files are not found in that directory,
742     it will also try /etc/feh/.
743
744     All config files treat lines starting with a "#" character as comments.
745     Comments at the end of a line are not supported.
746

THEMES CONFIG SYNTAX

748     .config/feh/themes allows the naming of option groups, called themes.
749
750     It takes entries of the form "theme options ...", where theme is the name
751     of the entry and options are the options which will be applied when the
752     theme is used.
753
754     Note that the option parser does not behave like a normal shell: filename
755     expansion and backslash escape sequences are not supported and passed to
756     feh's option parser as-is.  However, quoting of arguments is respected
757     and can be used for arguments with whitespace.  So, the sequence "--info
758     "foo bar"" works as intended (that is, it display the string "foo bar"),
759     whereas the option string "--info foo\ bar" will only display "foo\" and
760     complain about the file bar not existing.  Please keep this in mind when
761     writing theme files.
762
763     An example entry is "imagemap -rVq --thumb-width 40 --thumb-height 30
764     --index-info '%n\n%wx%h'".
765
766     You can use this theme in two ways.  Either call "feh -Timagemap *.jpg",
767     or create a symbolic link to feh with the name of the theme you want it
768     to use.  For the example above, this would be "ln -s `which feh `
769     ~/bin/imagemap".  Now just run "imagemap *.jpg" to use these options.
770
771     Note that you can split a theme over several lines by placing a backslash
772     at the end of an unfinished line.  A single option-argument-pair must not
773     span multiple lines.  A single line must not be longer than 1023 charac‐
774     ters, but there's no upper limit for the length of a theme.
775
776     Command line options always override theme options.
777

KEYS CONFIG SYNTAX

779     .config/feh/keys defines key bindings.  It has entries of the form
780     "action [key1 [key2 [key3]]]".
781
782     Each key is an X11 keysym name as shown by xev(1), like "Delete".  It may
783     optionally start with modifiers for things like Control, in which case
784     key looks like mod-keysym (for example "C-Delete" for Ctrl+Delete or
785     "C-1-Delete" for Ctrl+Alt+Delete)
786
787     Available modifiers are C for Control, S for Shift and 1, 4 for Mod1 and
788     Mod4.  To match an uppercase letter like "S" instead of "s", the Shift
789     modifier is not required.
790
791     Specifying an action without any keys unbinds it (i.e. the default bind‐
792     ings are removed).
793
794     Note: Do not use the same keybinding for multiple actions.  When binding
795     an action to a new key (or mouse button), make sure to unbind it from its
796     previous action, if present.  feh does not check for conflicting bind‐
797     ings, so their behaviour is undefined.
798
799     For a list of the action names, see KEYS.  Note that not all of the key
800     names used there correspond to X11 keysyms.  Most notably, page up (Prior
801     / Page_Up), page down (Next / Page_Down) and the keypad keys (KP_*) do
802     not.
803

KEYS

805     The following actions and default key bindings can be used in an image
806     window.  (The strings in [square brackets] are the config action names).
807     If feh is running inside a terminal and its standard input is not used
808     for images or filelists, key input from the terminal is also accepted.
809     However, terminal input support is currently limited to most alphanumeric
810     characters (0-9 a-z A-Z and some more), arrow keys, return and backspace.
811     The Alt (Mod1) modifier is also supported.
812
813     a [toggle_actions]
814             Toggle actions display (see --draw-actions)
815
816     A [toggle_aliasing]
817             Enable/Disable anti-aliasing
818
819     c [toggle_caption]
820             Caption entry mode.  If --caption-path has been specified, then
821             this enables caption editing.  The caption at the bottom of the
822             screen will turn yellow and can be edited.  Hit return to confirm
823             and save the caption, or escape to cancel editing.  Note that you
824             can insert an actual newline into the caption using
825             ⟨Ctrl+return⟩.
826
827     d [toggle_filenames]
828             Toggle filename display (see --draw-filename)
829
830     e [toggle_exif]
831             (optional feature, available in this build) Toggle EXIF tag dis‐
832             play
833
834     f [toggle_fullscreen]
835             Toggle fullscreen
836
837     g [toggle_fixed_geometry]
838             Enable/Disable automatic window resize when changing images.
839
840     h [toggle_pause]
841             Pause/Continue the slideshow.  When it is paused, it will not au‐
842             tomatically change slides based on --slideshow-delay.
843
844     i [toggle_info]
845             Toggle info display (see --info)
846
847     k [toggle_keep_vp]
848             Toggle zoom and viewport keeping.  When enabled, feh will keep
849             zoom and X, Y offset when switching images.
850
851     L [save_filelist]
852             Save the current filelist as "feh_PID_ID_filelist".  It is saved
853             in the directory specified by --output-dir, if set, and in the
854             current working directory otherwise.
855
856     m [toggle_menu]
857             Show menu.  Use the arrow keys and return to select items, and
858             ⟨escape⟩ to close the menu.
859
860     n, ⟨space⟩, ⟨Right⟩ [next_img]
861             Show next image.  Selects the next image in thumbnail mode.
862
863     o [toggle_pointer]
864             Toggle pointer visibility
865
866     p, ⟨BackSpace⟩, ⟨Left⟩ [prev_img]
867             Show previous image.  Selects the previous image in thumbnail
868             mode.
869
870     q, ⟨Escape⟩ [quit]
871             Quit feh
872
873     r [reload_image]
874             Reload current image.  Useful for webcams
875
876     s [save_image]
877             Save the current image as "feh_PID_ID_FILENAME".  It is saved in
878             the directory specified by --output-dir, if set, and in the cur‐
879             rent working directory otherwise.
880
881     w [size_to_image]
882             Change window size to fit current image size (plus/minus zoom, if
883             set).  In scale-down and fixed-geometry mode, this also updates
884             the window size limits.
885
886     x [close]
887             Close current window
888
889     z [jump_random]
890             Jump to a random position in the current filelist
891
892     Z [toggle_auto_zoom]
893             Toggle auto-zoom.
894
895     [, ] [prev_dir, next_dir]
896             Jump to the first image of the previous or next sequence of im‐
897             ages sharing a directory name in the current filelist.  Use
898             --sort dirname if you would like to ensure that all images in a
899             directory are grouped together.
900
901     <, > [orient_3, orient_1]
902             rotate the image 90 degrees (counter)clockwise.
903
904             When --edit is used, this also rotates the image in the underly‐
905             ing file.  Rotation is lossless, but may create artifacts in some
906             image corners when used with JPEG images.  Rotating in the re‐
907             verse direction will make them go away.  See jpegtran(1) for more
908             about lossless JPEG rotation.  Note: feh assumes that this fea‐
909             ture is used to normalize image orientation.  For JPEG images, it
910             will unconditionally set the EXIF orientation tag to 1 ("0,0 is
911             top left") after every rotation.  See jpegexiforient(1) for de‐
912             tails on how to change this flag.
913
914     _ [flip]
915             Vertically flip image.  When --edit is used, this also flips the
916             image in the underlying file (see above).
917
918     | [mirror]
919             Horizontally flip image.  When --edit is used, this also flips
920             the image in the underlying file (see above).
921
922     0 .. 9 [action_0 .. action_9]
923             Execute the corresponding action (0 = --action, 1 = --action1
924             etc.)
925
926     ⟨Return⟩ [action_0]
927             Run the command defined by --action
928
929     ⟨Home⟩ [jump_first]
930             Show first image
931
932     ⟨End⟩ [jump_last]
933             Show last image
934
935     ⟨page up⟩ [jump_fwd]
936             Go forward ~5% of the filelist
937
938     ⟨page down⟩ [jump_back]
939             Go backward ~5% of the filelist
940
941     + [reload_plus]
942             Increase reload delay by 1 second
943
944     - [reload_minus]
945             Decrease reload delay by 1 second
946
947     ⟨Delete⟩ [remove]
948             Remove current file from filelist
949
950     ⟨Ctrl+Delete⟩ [delete]
951             Remove current file from filelist and delete it
952
953     ⟨keypad Left⟩, ⟨Ctrl+Left⟩ [scroll_left]
954             Scroll to the left
955
956     ⟨keypad Right⟩, ⟨Ctrl+Right⟩ [scroll_right]
957             Scroll to the right
958
959     ⟨keypad up⟩, ⟨Ctrl+Up⟩ [scroll_up]
960             Scroll up
961
962     ⟨keypad Down⟩, ⟨Ctrl+Down⟩ [scroll_down]
963             Scroll down.  Note that the scroll keys work without anti-alias‐
964             ing for performance reasons; hit the render key after scrolling
965             to anti-alias the image.
966
967     ⟨Alt+Left [scroll_left_page]⟩
968             Scroll to the left by one page
969
970     ⟨Alt+Right [scroll_right_page]⟩
971             Scroll to the right by one page
972
973     ⟨Alt+Up [scroll_up_page]⟩
974             Scroll up by one page
975
976     ⟨Alt+Down [scroll_down_page]⟩
977             Scroll down by one page
978
979     R, ⟨keypad begin⟩ [render]
980             Anti-alias the image.  Opens the currently selected image in
981             thumbnail mode.
982
983     ⟨keypad +⟩, ⟨Up⟩ [zoom_in]
984             Zoom in
985
986     ⟨keypad -⟩, ⟨Down⟩ [zoom_out]
987             Zoom out
988
989     *, ⟨keypad *⟩ [zoom_default]
990             Zoom to 100%
991
992     /, ⟨keypad /⟩ [zoom_fit]
993             Zoom to fit the window size
994
995     ! [zoom_fill]
996             Zoom to fill the window size like --bg-fill
997
998   MENU KEYS
999     The following keys bindings are used for the feh menu:
1000
1001     ⟨Escape⟩ [menu_close]
1002             Close the menu
1003
1004     ⟨Up⟩ [menu_up]
1005             Highlight previous menu item
1006
1007     ⟨Down⟩ [menu_down]
1008             Highlight next menu item
1009
1010     ⟨Left⟩ [menu_parent]
1011             Highlight parent menu item
1012
1013     ⟨Right⟩ [menu_child]
1014             Highlight child menu item
1015
1016     ⟨Return⟩, ⟨space⟩ [menu_select]
1017             Select highlighted menu item
1018

BUTTONS CONFIG SYNTAX

1020     .config/feh/buttons.  This works like the keys config file: the entries
1021     are of the form "action [binding]".
1022
1023     Each binding is a button number.  It may optionally start with modifiers
1024     for things like Control, in which case binding looks like mod-button (for
1025     example C-1 for Ctrl + Left button).
1026
1027     Note: Do not use the same button for multiple actions.  feh does not
1028     check for conflicting bindings, so their behaviour is undefined.  Either
1029     unbind the unwanted action, or bind it to another unused button.  The or‐
1030     der in which you bind / unbind does not matter, though.
1031
1032     For the available modifiers, see KEYS CONFIGURATION SYNTAX.
1033
1034   BUTTONS
1035     In an image window, the following buttons may be used (The strings in
1036     [square brackets] are the config action names).  Additionally, all ac‐
1037     tions specified in the KEYS section can also be bound to a button.
1038
1039     unbound [reload]
1040             Reload current image
1041
1042     0 ⟨cursor movement while not panning, zooming, or similar⟩
1043             Does not have a default binding.  By binding it to quit, you can
1044             turn feh into a simple screensaver.
1045
1046     1 ⟨left mouse button⟩ [pan]
1047             pan the current image
1048
1049     2 ⟨middle mouse button⟩ [zoom]
1050             Zoom the current image
1051
1052     3 ⟨right mouse button⟩ [toggle_menu]
1053             Toggle menu
1054
1055     4 ⟨mousewheel down⟩ [prev_img]
1056             Show previous image
1057
1058     5 ⟨mousewheel up⟩ [next_img]
1059             Show next image
1060
1061     Ctrl+1 [blur]
1062             Blur current image
1063
1064     Ctrl+2 [rotate]
1065             Rotate current image
1066
1067     unbound [zoom_in]
1068             Zoom in
1069
1070     unbound [zoom_out]
1071             Zoom out
1072

MOUSE ACTIONS

1074     Default Bindings: When viewing an image, mouse button 1 pans the image
1075     (moves it around) or, when only clicked, moves to the next image
1076     (slideshow mode only).  Quick drags with less than 2px of movement per
1077     axis will be treated as clicks to aid graphics tablet users.  Mouse but‐
1078     ton 2 zooms (click and drag left->right to zoom in, right->left to zoom
1079     out, click once to restore zoom to 100%) and mouse button 3 opens the
1080     menu.
1081
1082     Ctrl+Button 1 blurs or sharpens the image (drag left to blur, right to
1083     sharpen); Ctrl+Button 2 rotates the image around the center point.
1084
1085     A note about pan and zoom modes: In pan mode, if you reach a window bor‐
1086     der but haven't yet panned to the end of the image, feh will warp your
1087     cursor to the opposite border so you can continue panning.
1088
1089     When clicking the zoom button and immediately releasing it, the image
1090     will be back at 100% zoom.  When clicking it and moving the mouse while
1091     holding the button down, the zoom will be continued at the previous zoom
1092     level.  The zoom will always happen so that the pixel on which you en‐
1093     tered the zoom mode remains stationary.  So, to enlarge a specific part
1094     of an image, click the zoom button on that part.
1095

SIGNALS

1097     In slideshow and multiwindow mode, feh handles the following signals:
1098
1099     SIGUSR1
1100             Slideshow mode: switch to next image; reload current image if the
1101             slideshow consists of a single file.  Multiwindow mode: reload
1102             all images.
1103
1104     SIGUSR2
1105             Slideshow mode: switch to previous image; reload current image if
1106             the slideshow consists of a single file.  Multiwindow mode:
1107             reload all images.
1108

USAGE EXAMPLES

1110     Here are some examples of useful option combinations.  See also:
1111https://feh.finalrewind.org/examples/
1112
1113     feh ~/Pictures
1114             Show all images in ~/Pictures
1115
1116     feh -r ~/Pictures
1117             Recursively show all images found in ~/Pictures and subdirecto‐
1118             ries
1119
1120     feh -rSfilename --version-sort ~/Pictures
1121             Same as above, but sort naturally.  By default, feh will show
1122             files in the string order of their names, meaning e.g.  "foo
1123             10.jpg" will come before "foo 2.jpg".  In this case, they are in‐
1124             stead ordered as a human would expect.
1125
1126     feh -t -Sfilename -E 128 -y 128 -W 1024 ~/Pictures
1127             Show 128x128 pixel thumbnails, limit window width to 1024 pixels.
1128
1129     feh -t -Sfilename -E 128 -y 128 -W 1024 -P -C
1130             /usr/share/fonts/truetype/ttf-dejavu/ -e DejaVuSans/8 ~/Pictures
1131             Same as above, but enable thumbnail caching and use a smaller
1132             font.
1133
1134     feh -irFarial/14 -O index.jpg ~/Pictures
1135             Make an index print of ~/Pictures and all directories below it,
1136             using 14 point Arial to write the image info under each thumb‐
1137             nail.  Save the image as index.jpg and don't display it, just
1138             exit.  Note that this even works without a running X server
1139
1140     feh --unloadable -r ~/Pictures
1141             Print all unloadable images in ~/Pictures, recursively
1142
1143     feh -f by_width -S width --reverse --list .
1144             Write a list of all images in the directory to by_width, sorted
1145             by width (widest images first)
1146
1147     feh -w ~/Pictures/holidays
1148             Open each image in ~/Pictures/holidays in its own window
1149
1150     feh -FD5 -Sname ~/Pictures/presentation
1151             Show the images in .../presentation, sorted by name, in
1152             fullscreen, automatically change to the next image after 5 sec‐
1153             onds
1154
1155     feh -rSwidth -A "mv %F ~/images/%N" ~/Pictures
1156             View all images in ~/Pictures and below, sorted by width, move an
1157             image to ~/image/image_name when enter is pressed
1158
1159     feh --start-at ~/Pictures/foo.jpg
1160             View all images in ~/Pictures, starting with foo.jpg.  All other
1161             images are still in the slideshow and can be viewed normally
1162
1163     feh --start-at ~/Pictures/foo.jpg ~/Pictures
1164             Same as above.
1165
1166     feh --info "exifgrep '(Model|DateTimeOriginal|FNumber|ISO|Flash)' %F |
1167             cut -d . -f 4-" .
1168             Show some EXIF information, extracted by exifprobe/exifgrep
1169
1170     feh --action 'rm %F' -rl --max-dimension 1000x800
1171             Recursively remove all images with dimensions below or equal to
1172             1000x800 pixels from the current directory.
1173
1174     feh -L '%w %h %f' | awk '{ if ($1 > $2) { print $0 } }' | cut -d ' ' -f
1175             3- | feh -f -
1176             Show landscape pictures (image width greater than height) in the
1177             current directory.
1178

DEPENDENCIES

1180     When --edit is used, feh needs the jpegtran and jpegexiforient binaries
1181     (usually distributed in "libjpeg-progs" or similar) for lossless JPEG ro‐
1182     tation.
1183
1184     To view images from URLs such as "http://", feh must be compiled with
1185     libcurl support.  It is enabled in this build
1186

KNOWN BUGS

1188     Imlib2 releases prior to 1.7.4 are unable to load gif, tiff, and webp im‐
1189     ages if the filename does not end with gif, tiff, or webp, respectively.
1190     Notably, this means that feh is unable to show gif, tiff, and webp images
1191     from stdin or network URLs on systems using an Imlib2 version older than
1192     1.7.4.
1193
1194     Imlib2 releases 1.7.5+ automatically rotate images based on their EXIF
1195     tags.  When combined with the --auto-rotate option, this causes images to
1196     be rotated twice and end up in an incorrect orientation.  As a work‐
1197     around, do not use --auto-rotate on systems with Imlib2 version 1.7.5 or
1198     later.
1199
1200     On systems with giflib 5.1.2, feh may be unable to load gif images.  For
1201     affected mips, mipsel and arm devices, gif support is completely broken,
1202     while on x86 / x86_64 gifs can usually only be loaded if they are the
1203     first image in the filelist.  This appears to be a bug in giflib, see
1204https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729⟩ for details.
1205     Workaround: Use --conversion-timeout 5 (or some other positive value) to
1206     load gifs with imagemagick instead, or downgrade to giflib 5.1.1, or up‐
1207     grade to giflib 5.1.4.
1208
1209     While loading images using libcurl, feh will not react to key or mouse
1210     actions.
1211
1212     Thumbnail mode is somewhat inefficient, and because of that not nearly as
1213     fast as it could be.
1214
1215     --scale-down does not take window decorations into account and may there‐
1216     fore make the window slightly too large.
1217
1218   REPORTING BUGS
1219     If you find a bug, please report it to ⟨derf+feh@finalrewind.org⟩ or via
1220https://github.com/derf/feh/issues⟩.
1221
1222     Please include the feh version ⟨the output of "feh --version"⟩, steps to
1223     reproduce the bug and, if necessary, images to reproduce it.  Note that
1224     feh is a hobby project, so bug reports may be addressed with significant
1225     delays.
1226

LICENSE

1228     Copyright (C) 1999, 2000 by Paul Duncan.  Copyright (C) 1999, 2000 by Tom
1229     Gilbert and contributors.  Copyright (C) 2010-2020 by Daniel Friesel and
1230     contributors.
1231
1232     Permission is hereby granted, free of charge, to any person obtaining a
1233     copy of this software and associated documentation files (the "Soft‐
1234     ware"), to deal in the Software without restriction, including without
1235     limitation the rights to use, copy, modify, merge, publish, distribute,
1236     sublicense, and/or sell copies of the Software, and to permit persons to
1237     whom the Software is furnished to do so, subject to the following condi‐
1238     tions:
1239
1240     The above copyright notice and this permission notice shall be included
1241     in all copies of the Software and its documentation and acknowledgment
1242     shall be given in the documentation and software packages that this Soft‐
1243     ware was used.
1244
1245     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1246     OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL‐
1247     ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
1248     SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1249     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
1250     OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1251     SOFTWARE.
1252
1253     Current developer: Daniel Friesel ⟨derf@finalrewind.org⟩
1254
1255     Original author (no longer developing): Tom Gilbert
1256     ⟨feh_sucks@linuxbrit.co.uk⟩
1257
1258     Website: https://feh.finalrewind.org
1259
1260BSD                             August 22, 2022                            BSD
Impressum