1FEH(1) BSD General Commands Manual FEH(1)
2
4 feh — image viewer and cataloguer
5
7 feh [options] [--] [files | directories | URLs ...]
8
10 This manual documents feh 3.6.3
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
19 feh is a light-weight, configurable and versatile image viewer. It is
20 aimed at command line users, but can also be started from graphical file
21 managers. Apart from viewing images, it can compile text and thumbnail
22 listings, show (un)loadable files, set X11 backgrounds, and more.
23
24 Features include filelists, various image sorting modes, custom action
25 scripts, and image captions. feh can be controlled by configurable key‐
26 board and mouse shortcuts, terminal input and signals. When no file
27 arguments or filelists are specified and --start-at is not used, feh dis‐
28 plays all files in the current directory.
29
30 EXIF tags are supported either using exiv2 / exifgrep via --info (see the
31 USAGE EXAMPLES section), or as a builtin feature by compiling feh with
32 exif=1. In this build of feh, builtin EXIF support is available.
33
35 feh is based on various modes, which are selected at startup by command
36 line options.
37
38 Slideshow mode is the default. It opens a window and displays the first
39 image in it; the slideshow position can be advanced (or otherwise
40 changed) using keyboard and mouse shortcuts. In slideshow mode, images
41 can be deleted either from the filelist or from the disk, a changed
42 filelist can also be saved to the disk and reopened at a later time. An
43 image can also be read from stdin via "feh -".
44
45 Montage mode forms a montage from the filelist. The resulting image can
46 be viewed or saved, and its size can be limited by height, width or both.
47
48 Index mode forms an index print from the filelist. Image thumbnails are
49 shown along with the filename, size and dimensions, printed using a true‐
50 type font of your choice. The resulting image can be viewed or saved,
51 and its size can be limited by height, width or both.
52
53 Thumbnail mode is like index mode, but the mini-images are clickable and
54 open the selected image in a new window.
55
56 Multiwindow mode shows images in multiple windows, instead of as a
57 slideshow in one window. Don't use with a large filelist ;)
58
59 List mode doesn't display images. Instead, it outputs an ls-style list‐
60 ing of the files in the filelist, including image info such as size, num‐
61 ber of pixels, type, etc. There is also a Customlist mode which prints
62 image info in a custom format specified by a printf-like format string.
63
64 feh can also list either all the loadable files in a filelist or all the
65 unloadable files. This is useful for preening a directory.
66
68 feh can open any format supported by imlib2, most notably jpeg, png, pnm,
69 tiff, and bmp. The gif format is also supported, but only for static
70 images. In case of animations, only the first frame will be shown. If
71 the convert binary (supplied by ImageMagick) is available, it also has
72 limited support for many other file types, such as svg, xcf and otf. If
73 dcraw is available, feh also supports RAW files provided by cameras and
74 will display the embedded thumbnails. Use --conversion-timeout timeout
75 with a non-negative value to enable support for these formats.
76
77 As Imlib2 may take several seconds to determine whether it can load a
78 file or not (e.g. when attempting to open a large video), feh checks each
79 file's header before loading it. If it looks like an image, it is passed
80 on to Imlib2, otherwise, it is assumed to be unloadable. This greatly
81 improves performance when working in directories with mixed files (i.e.,
82 directories which do not exclusively contain image files). If you think
83 that Imlib2 can load a file which feh has determined to be likely not an
84 image, set the environment variable "FEH_SKIP_MAGIC" to pass all files
85 directly to Imlib2, bypassing the header check. The environment vari‐
86 able's value does not matter, it just needs to be set.
87
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) Automatically rotate
128 images based on EXIF data. Does not alter the image files.
129
130 -Z, --auto-zoom
131 Zoom pictures to screen size in fullscreen / fixed geometry mode.
132
133 -x, --borderless
134 Create borderless windows.
135
136 --cache-size size
137 Set imlib2 in-memory cache to size MiB. A higher cache size can
138 significantly improve performance especially for small slide
139 shows, however at the cost of increased memory consumption. size
140 must be between 0 and 2048 MiB and defaults to 4.
141
142 -P, --cache-thumbnails
143 Enable thumbnail caching. Thumbnails are saved in
144 $XDG_CACHE_HOME/thumbnails, which defaults to
145 ~/.cache/thumbnails. Note that thumbnails are only cached if the
146 configured thumbnail size does not exceed 256x256 pixels.
147
148 -K, --caption-path path
149 Path to directory containing image captions. This turns on cap‐
150 tion viewing, and if captions are found in path, which is rela‐
151 tive to the directory of each image, they are overlayed on the
152 displayed image. E.g. with caption path "captions/", and viewing
153 image "images/foo.jpg", the caption will be looked for in
154 "images/captions/foo.jpg.txt".
155
156 --conversion-timeout timeout
157 feh can use ImageMagick to try converting unloadable files into a
158 supported file format. As this can take a long time, it is dis‐
159 abled by default. Set timeout to a non-negative value to enable
160 it. A positive value specifies after how many seconds conversion
161 attempts should be aborted, zero causes feh to try indefinitely.
162 Negative values restore the default by disabling conversion alto‐
163 gether.
164
165 --class class
166 Set the X11 class hint to class. Default: feh
167
168 -L, --customlist format
169 Don't display images, print image info according to format
170 instead. See FORMAT SPECIFIERS.
171
172 -G, --draw-actions
173 Draw the defined actions and what they do at the top-left of the
174 image.
175
176 --draw-exif
177 (optional feature, available in this build) display some EXIF
178 information in the bottom left corner, similar to using --info
179 with exiv2 / exifgrep.
180
181 -d, --draw-filename
182 Draw the file name at the top-left of the image.
183
184 --draw-tinted
185 Show overlay texts (as created by --draw-filename et al) on a
186 semi-transparent background to improve their readability.
187
188 --edit Enable basic editing of files. This makes rotation and mirroring
189 (bound to "<", ">", "|", and "_" by default) change the underly‐
190 ing file and not just its displayed content.
191
192 -f, --filelist file
193 This option is similar to the playlists used by music software.
194 If file exists, it will be read for a list of files to load, in
195 the order they appear. The format is a list of image file names,
196 absolute or relative to the current directory, one file name per
197 line.
198
199 If file doesn't exist, it will be created from the internal
200 filelist at the end of a viewing session. This is best used to
201 store the results of complex sorts (-Spixels for example) for
202 later viewing.
203
204 Any changes to the internal filelist (such as deleting a file or
205 it being pruned for being unloadable) will be saved to file when
206 feh exits. You can add files to filelists by specifying them on
207 the command line when also specifying the list.
208
209 If file is "-", feh will read the filelist from its standard
210 input.
211
212 -e, --font font
213 Set global font. Should be a truetype font, resident in the cur‐
214 rent directory or the font directory, and should be defined in
215 the form fontname/points, like "myfont/12".
216
217 -C, --fontpath path
218 Specify path as extra directory in which to search for fonts; can
219 be used multiple times to add multiple paths.
220
221 --force-aliasing
222 Disable anti-aliasing for zooming, background setting etc.
223
224 -I, --fullindex
225 Same as index mode, but with additional information below the
226 thumbnails. Works just like "feh --index --index-info
227 "%n\n%S\n%wx%h"". Enables MONTAGE MODE OPTIONS.
228
229 Note: This option needs to load all images to calculate the
230 dimensions of the feh window, so when using it with many files it
231 will take a while before a feh window is visible. Use --preload
232 to get a progress bar.
233
234 -F, --fullscreen
235 Make the window fullscreen. Note that in this mode, large images
236 will always be scaled down to fit the screen, and --zoom zoom
237 only affects smaller images and never scales larger than neces‐
238 sary to fit the screen size. The only exception is a zoom of
239 100, in which case images will always be shown at 100% zoom.
240
241 When combined with --thumbnails, this option only affects images
242 opened from the thumbnail overview. The thumbnail list itself
243 will still be windowed.
244
245 -g, --geometry width x height | + x + y | width x height + x + y
246 Use a fixed window size as specified in the X-style geometry
247 string, e.g. 640x480. An optional +x+y window offset can be
248 specified. Combine with --scale-down to scale down larger images
249 like in fullscreen mode. Note that this option does not enforce
250 the window size; changing it by a tiling WM or manually is still
251 possible. However, auto-resize remains disabled.
252
253 -Y, --hide-pointer
254 Hide the pointer (useful for slideshows).
255
256 -B, --image-bg style
257 Use style as background for transparent image parts and the like.
258 Accepted values: default, checks, or an XColor (e.g. "black" or
259 "#428bdd"). Note that some shells treat the hash symbol as a
260 special character, so you may need to quote or escape it for the
261 XColor code to work. In windowed mode, the default is checks (a
262 checkered background so transparent image parts are easy to see).
263 In fullscreen and background setting mode, checks is not accepted
264 and the default is black.
265
266 -i, --index
267 Enable Index mode. Index mode is similar to montage mode, and
268 accepts the same options. It creates an index print of thumb‐
269 nails, printing the image name beneath each thumbnail. Index
270 mode enables certain other options, see INDEX AND THUMBNAIL MODE
271 OPTIONS and MONTAGE MODE OPTIONS.
272
273 --info [flag]command_line
274 Execute command_line and display its output in the bottom left
275 corner of the image. Can be used to display e.g. image dimen‐
276 sions or EXIF information. Supports FORMAT SPECIFIERS. If flag
277 is set to ";", the output will not be displayed by default, but
278 has to be enabled by the toggle_info key.
279
280 --insecure
281 When viewing files with HTTPS, this option disables all certifi‐
282 cate checks. It allows images on sites with self-signed or
283 expired certificates to be opened, but is no more secure than
284 plain HTTP.
285
286 -k, --keep-http
287 When viewing files using HTTP, feh normally deletes the local
288 copies after viewing, or, if caching, on exit. This option per‐
289 manently stores them on disk, either in the directory specified
290 by --output-dir, or in the current working directory.
291
292 --keep-zoom-vp
293 When switching images, keep zoom and viewport settings (zoom
294 level and X, Y offsets)
295
296 -l, --list
297 Don't display images. Analyze them and display an ls(1) - style
298 listing. Useful in scripts to hunt out images of a certain
299 size/resolution/type etc.
300
301 -U, --loadable
302 Don't display images. Just print out their names if imlib2 can
303 successfully load them. Returns false if at least one image
304 failed to load.
305
306 --max-dimension width x height
307 Only show images with width <= width and height <= height. If
308 you only care about one parameter, set the other to 0 (or a
309 negative value).
310
311 -M, --menu-font font
312 Use font (truetype, with size, like "yudit/12") as menu font.
313
314 --min-dimension width x height
315 Only show images with width >= width and height >= height. If
316 you only care about one parameter, set the other to 0.
317
318 -m, --montage
319 Enable montage mode. Montage mode creates a new image consisting
320 of a grid of thumbnails of the images in the filelist. When mon‐
321 tage mode is selected, certain other options become available.
322 See MONTAGE MODE OPTIONS.
323
324 -w, --multiwindow
325 Disable slideshow mode. With this setting, instead of opening
326 multiple files in slideshow mode, multiple windows will be
327 opened; one per file.
328
329 --no-conversion-cache
330 When loading images via HTTP, ImageMagick or dcraw, feh will only
331 load/convert them once and re-use the cached file on subsequent
332 slideshow passes. This option disables the cache. It is also
333 disabled when --reload is used. Use it if you rely on frequently
334 changing files loaded via one of these sources. Note that it
335 will impair performance.
336
337 --no-jump-on-resort
338 Don't jump to the first image after resorting the filelist.
339
340 -N, --no-menus
341 Don't load or show any menus.
342
343 --no-screen-clip
344 By default, window sizes are limited to the screen size. With
345 this option, windows will have the size of the image inside them.
346 Note that they may become very large this way, making them unman‐
347 ageable in certain window managers.
348
349 --no-xinerama
350 (optional feature, enabled in this build) Disable Xinerama sup‐
351 port.
352
353 --on-last-slide hold | quit | resume
354 Select behaviour when trying to select the next image on the last
355 slide (or the previous image on the first slide) in a slide show.
356
357 With hold, feh will stop advancing images in this case and con‐
358 tinue displaying the first/last image, respectively. This is
359 intended for linear slide shows. Behaviour is unspecified when
360 using other navigation commands than previous and next image.
361
362 quit will cause feh to quit when trying to advance past the last
363 image in the slide show.
364
365 resume is the default behaviour: On the last (first) image, feh
366 will wrap around to the first (last) image.
367
368 -j, --output-dir directory
369 Save files to directory when using --keep-http or the save_image
370 or save_filelist command. By default, files are saved in the
371 current working directory.
372
373 -p, --preload
374 Preload images. This doesn't mean hold them in RAM, it means run
375 through them and eliminate unloadable images first. Otherwise
376 they will be removed as you flick through. This also analyses
377 the images to get data for use in sorting, such as pixel size,
378 type etc. A preload run will be automatically performed if you
379 specify one of these sort modes.
380
381 -q, --quiet
382 Don't report non-fatal errors for failed loads. Verbose and
383 quiet modes are not mutually exclusive, the first controls infor‐
384 mational messages, the second only errors.
385
386 -z, --randomize
387 When viewing multiple files in a slideshow, randomize the file
388 list before displaying. The list is re-randomized whenever the
389 slideshow cycles (that is, transitions from last to first image).
390
391 -r, --recursive
392 Recursively expand any directories in the command line arguments
393 to the content of those directories, all the way down to the bot‐
394 tom level.
395
396 --no-recursive
397 Don't recursively expand any directories. This is the default,
398 but this option is useful to override themes containing
399 --recursive.
400
401 -R, --reload int
402 Reload filelist and current image after int seconds. Useful for
403 viewing HTTP webcams or frequently changing directories. (Note
404 that filelist reloading is still experimental.) Set to zero to
405 disable any kind of automatic reloading.
406
407 If an image is removed, feh will either show the next one or
408 quit. However, if an image still exists, but can no longer be
409 loaded, feh will continue to try loading it.
410
411 Setting this option causes inotify-based auto-reload to be dis‐
412 abled. Reload is not supported in montage, index, or thumbnail
413 mode.
414
415 -n, --reverse
416 Reverse the sort order. Use this to invert the order of the
417 filelist. E.g. to sort in reverse width order, use -nSwidth.
418
419 -., --scale-down
420 Scale images to fit window geometry (defaults to screen size when
421 no geometry was specified). Note that the window geometry is not
422 updated when changing images at the moment. This option is rec‐
423 ommended for tiling window managers. This option is ignored when
424 in fullscreen and thumbnail list mode.
425
426 In tiling environments, this also causes the image to be centered
427 in the window.
428
429 --scroll-step count
430 Scroll count pixels whenever scroll_up, scroll_down, scroll_left
431 or scroll_right is pressed. Note that this option accepts nega‐
432 tive numbers in case you need to reverse the scroll direction.
433 See KEYS CONFIG SYNTAX for how to reverse it permanently.
434 Default: 20
435
436 -D, --slideshow-delay float
437 For slideshow mode, wait float seconds between automatically
438 changing slides. Useful for presentations. Specify a negative
439 number to set the delay (which will then be float * (-1)), but
440 start feh in paused mode.
441
442 -S, --sort sort_type
443 Sort file list according to image parameters. Allowed sort types
444 are: name, filename, dirname, mtime, width, height, pixels, size,
445 format. For sort modes other than name, filename, dirname, or
446 mtime, a preload run is necessary, causing a delay proportional
447 to the number of images in the list.
448
449 mtime starts with the most recently modified image. width,
450 height, pixels and size start with the smallest. Use --reverse
451 to sort by oldest or largest first.
452
453 For name, filename, and dirname you can use --version-sort to
454 sort numbers naturally, so that e.g. 10.jpg comes after 2.jpg.
455
456 -|, --start-at filename
457 Start the filelist at filename. If no other files or filelists
458 were specified on the command line, feh will first load all files
459 from the directory in which filename resides. This way, it's
460 possible to look at a specific image and use the next / prev keys
461 to browse through the directory. See USAGE EXAMPLES for exam‐
462 ples. If filename is a remote URL and no files or filelists were
463 specified, feh will show filename and not attempt to load addi‐
464 tional files or directories.
465
466 Note: If you use relative paths in your filelist, filename should
467 also be a relative path. If you use absolute paths, it should
468 also be an absolute path. If feh cannot find an exact match, it
469 will compare basenames (filenames without the directory suffix).
470 This may lead to mismatches if several files in your filelist
471 have the same basename.
472
473 -T, --theme theme
474 Load options from config file with name theme - see THEMES CONFIG
475 SYNTAX for more info. Note that command line options always
476 override theme options. The theme can also be set via the pro‐
477 gram name (e.g. with symlinks), so by default feh will look for a
478 "feh" theme.
479
480 -t, --thumbnails
481 Same as Index mode, but the thumbnails are clickable image
482 launchers. Note that --fullscreen and --scale-down do not affect
483 the thumbnail window. They do, however, work for image windows
484 launched from thumbnail mode. Also supports INDEX AND THUMBNAIL
485 MODE OPTIONS as well as MONTAGE MODE OPTIONS.
486
487 -~, --thumb-title string
488 Set title for windows opened from thumbnail mode. See also
489 FORMAT SPECIFIERS.
490
491 -^, --title title
492 Set window title. Applies to all windows except those opened
493 from thumbnail mode. See FORMAT SPECIFIERS.
494
495 -u, --unloadable
496 Don't display images. Just print out their names if imlib2 can
497 NOT successfully load them. Returns false if at least one image
498 was loadable.
499
500 -V, --verbose
501 output useful information, progress bars, etc.
502
503 -v, --version
504 output version information and exit.
505
506 --version-sort
507 When combined with --sort name, --sort filename, or --sort
508 dirname: use natural sorting for file and directory names. In
509 this mode, filenames are sorted as an ordinary human would
510 expect, e.g. "2.jpg" comes before "10.jpg". Note that this
511 option only has an effect when a sort mode is set using --sort.
512
513 --xinerama-index screen
514 (optional feature, enabled in this build) Override feh's idea of
515 the active Xinerama screen. May be useful in certain circum‐
516 stances where the window manager places the feh window on Xin‐
517 erama screen A while feh assumes that it will be placed on screen
518 B.
519
520 In background setting mode: When used with any option other than
521 --bg-tile: Only set wallpaper on screen. All other screens will
522 be filled black/white. This is most useful in a Xinerama config‐
523 uration with overlapping screens. For instance, assume you have
524 two overlapping displays (index 0 and 1), where index 0 is
525 smaller. To center a background on the display with index 0 and
526 fill the extra space on index 1 black/white, use
527 "--xinerama-index 0" when setting the wallpaper.
528
529 --zoom percent | max | fill
530 Zoom images by percent when in full screen mode or when window
531 geometry is fixed. When combined with --auto-zoom, zooming will
532 be limited to the specified percent. Specifying max is like set‐
533 ting --auto-zoom, using fill makes feh zoom the image like the
534 --bg-fill mode.
535
537 These additional options can be used for index, montage and (partially)
538 thumbnail mode.
539
540 -a, --alpha int
541 When drawing thumbnails onto the background, set their trans‐
542 parency level to int (0 - 255).
543
544 -b, --bg file | trans
545 Use file as background for your montage. With this option speci‐
546 fied, the montage size will default to the size of file if no
547 size restrictions were specified. Alternatively, if file is
548 "trans", the background will be made transparent.
549
550 -X, --ignore-aspect
551 By default, the montage thumbnails will retain their aspect
552 ratios, while fitting into thumb-width/-height. This options
553 forces them to be the size set by --thumb-width and
554 --thumb-height. This will prevent any empty space in the final
555 montage.
556
557 -H, --limit-height pixels
558 Limit the height of the montage.
559
560 -W, --limit-width pixels
561 Limit the width of the montage, defaults to 800 pixels.
562
563 If both --limit-width and --limit-height are specified, the mon‐
564 tage will be exactly width x height pixels in dimensions.
565
566 -o, --output file
567 Save the created montage to file.
568
569 -O, --output-only file
570 Just save the created montage to file without displaying it.
571
572 -s, --stretch
573 Normally, if an image is smaller than the specified thumbnail
574 size, it will not be enlarged. If this option is set, the image
575 will be scaled up to fit the thumbnail size. Aspect ratio will
576 be maintained unless --ignore-aspect is specified.
577
578 -E, --thumb-height pixels
579 Set thumbnail height.
580
581 -y, --thumb-width pixels
582 Set thumbnail width.
583
585 In addition to MONTAGE MODE OPTIONS --alpha, --bg, --limit-height,
586 --limit-width, --output, --output-only, --thumb-height, --thumb-width,
587 the following options can be used.
588
589 --index-info format
590 Show image information based on format below thumbnails in index
591 / thumbnail mode. See FORMAT SPECIFIERS. May contain newlines.
592 Use "--index-info ''" to display thumbnails without any info text
593
594 Note: If you specify image-related formats (such as %w or %s),
595 feh needs to load all images to calculate the dimensions of its
596 own window. So when using them with many files, it will take a
597 while before a feh window becomes visible. Use --preload to get
598 a progress bar.
599
600 -@, --title-font font
601 Set font to print a title on the index, if no font is specified,
602 no title will be printed.
603
604 -J, --thumb-redraw n
605 Redraw thumbnail window every n images while generating thumb‐
606 nails. Redrawing takes quite long, so the default is 10. Set n
607 = 1 to update the thumbnail window immediately. With n = 0,
608 there will only be one redraw once all thumbnails are loaded.
609
611 In many desktop environments, feh can also be used as a background set‐
612 ter. Unless you pass the --no-fehbg option, it will write a script to
613 set the current background to ~/.fehbg. So to have your background
614 restored every time you start X, you can add "~/.fehbg &" to your X
615 startup script (such as ~/.xinitrc). Note that the commandline written
616 to ~/.fehbg always includes the --no-fehbg option to ensure that it is
617 not inadvertently changed by differences in X11 screen layout or similar.
618
619 Note that feh does not support setting the wallpaper of GNOME shell desk‐
620 tops. In this environment, you can use "gsettings set
621 org.gnome.desktop.background picture-uri file:///path" instead.
622
623 For --bg-center, --bg-fill, and --bg-max, you can use --geometry to spec‐
624 ify an offset from one side of the screen instead of centering the image.
625 Positive values will offset from the left/top side, negative values from
626 the bottom/right. +0 and -0 are both valid and distinct values.
627
628 Note that all options except --bg-tile support Xinerama. For instance,
629 if you have multiple screens connected and use e.g. --bg-center, feh
630 will center or appropriately offset the image on each screen. You may
631 even specify more than one file, in that case, the first file is set on
632 screen 0, the second on screen 1, and so on.
633
634 Use --no-xinerama to treat the whole X display as one screen when setting
635 wallpapers. You may also use --xinerama-index to use feh as a background
636 setter for a specific screen.
637
638 --bg-center
639 Center the file on the background. If it is too small, it will
640 be surrounded by a border as specified by --image-bg.
641
642 --bg-fill
643 Like --bg-scale, but preserves aspect ratio by zooming the image
644 until it fits. Either a horizontal or a vertical part of the
645 image will be cut off
646
647 --bg-max
648 Like --bg-fill, but scale the image to the maximum size that fits
649 the screen with borders on one side. The border color can be set
650 using --image-bg.
651
652 --bg-scale
653 Fit the file into the background without repeating it, cutting
654 off stuff or using borders. But the aspect ratio is not pre‐
655 served either
656
657 --bg-tile
658 Tile (repeat) the image in case it is too small for the screen
659
660 --no-fehbg
661 Do not write a ~/.fehbg file
662
664 %a Information about slideshow state (playing/paused)
665
666 %f Image path/filename
667
668 %F Escaped image path/filename (for use in shell commands)
669
670 %g w,h window dimensions in pixels (mnemonic: geometry)
671
672 %h Image height
673
674 %l Total number of files in filelist
675
676 %L Temporary copy of filelist. Multiple uses of %L within the same
677 format string will return the same copy.
678
679 %m Current mode
680
681 %n Image name
682
683 %N Escaped image name
684
685 %o x,y offset of top-left image corner to window corner in pixels
686
687 %p Number of image pixels
688
689 %P Number of image pixels in human-readable format with k/M
690 (kilopixels / megapixels) suffix
691
692 %r Image rotation. A half right turn equals pi.
693
694 %s Image size in bytes
695
696 %S Human-readable image size (kB / MB)
697
698 %t Image format
699
700 %u Number of current file
701
702 %w Image width
703
704 %v feh version
705
706 %V Process ID
707
708 %z Current image zoom, rounded to two decimal places
709
710 %Z Current image zoom, higher precision
711
712 %% A literal %
713
715 feh has three config files: themes for theme definitions, keys for key
716 bindings and buttons for mouse button bindings. It will try to read them
717 from $XDG_CONFIG_HOME/feh/, which (when XDG_CONFIG_HOME is unset)
718 defaults to ~/.config/feh/. If the files are not found in that direc‐
719 tory, it will also try /etc/feh/.
720
721 All config files treat lines starting with a "#" character as comments.
722 Comments at the end of a line are not supported.
723
725 .config/feh/themes allows the naming of option groups, called themes.
726
727 It takes entries of the form "theme options ...", where theme is the name
728 of the entry and options are the options which will be applied when the
729 theme is used.
730
731 Note that the option parser does not behave like a normal shell: filename
732 expansion and backslash escape sequences are not supported and passed to
733 feh's option parser as-is. However, quoting of arguments is respected
734 and can be used for arguments with whitespace. So, the sequence "--info
735 "foo bar"" works as intended (that is, it display the string "foo bar"),
736 whereas the option string "--info foo\ bar" will only display "foo\" and
737 complain about the file bar not existing. Please keep this in mind when
738 writing theme files.
739
740 An example entry is "imagemap -rVq --thumb-width 40 --thumb-height 30
741 --index-info '%n\n%wx%h'".
742
743 You can use this theme in two ways. Either call "feh -Timagemap *.jpg",
744 or create a symbolic link to feh with the name of the theme you want it
745 to use. For the example above, this would be "ln -s `which feh `
746 ~/bin/imagemap". Now just run "imagemap *.jpg" to use these options.
747
748 Note that you can split a theme over several lines by placing a backslash
749 at the end of an unfinished line. A single option-argument-pair must not
750 span multiple lines. A single line must not be longer than 1023 charac‐
751 ters, but there's no upper limit for the length of a theme.
752
753 Command line options always override theme options.
754
756 .config/feh/keys defines key bindings. It has entries of the form
757 "action [key1 [key2 [key3]]]".
758
759 Each key is an X11 keysym name as shown by xev(1), like "Delete". It may
760 optionally start with modifiers for things like Control, in which case
761 key looks like mod-keysym (for example "C-Delete" for Ctrl+Delete or
762 "C-1-Delete" for Ctrl+Alt+Delete)
763
764 Available modifiers are C for Control, S for Shift and 1, 4 for Mod1 and
765 Mod4. To match an uppercase letter like "S" instead of "s", the Shift
766 modifier is not required.
767
768 Specifying an action without any keys unbinds it (i.e. the default bind‐
769 ings are removed).
770
771 Note: Do not use the same keybinding for multiple actions. When binding
772 an action to a new key (or mouse button), make sure to unbind it from its
773 previous action, if present. feh does not check for conflicting bind‐
774 ings, so their behaviour is undefined.
775
776 For a list of the action names, see KEYS. Note that not all of the key
777 names used there correspond to X11 keysyms. Most notably, page up (Prior
778 / Page_Up), page down (Next / Page_Down) and the keypad keys (KP_*) do
779 not.
780
782 The following actions and default key bindings can be used in an image
783 window. (The strings in [square brackets] are the config action names).
784 If feh is running inside a terminal and its standard input is not used
785 for images or filelists, key input from the terminal is also accepted.
786 However, terminal input support is currently limited to most alphanumeric
787 characters (0-9 a-z A-Z and some more), arrow keys, return and backspace.
788 The Alt (Mod1) modifier is also supported.
789
790 a [toggle_actions]
791 Toggle actions display (see --draw-actions)
792
793 A [toggle_aliasing]
794 Enable/Disable anti-aliasing
795
796 c [toggle_caption]
797 Caption entry mode. If --caption-path has been specified, then
798 this enables caption editing. The caption at the bottom of the
799 screen will turn yellow and can be edited. Hit return to confirm
800 and save the caption, or escape to cancel editing. Note that you
801 can insert an actual newline into the caption using
802 ⟨Ctrl+return⟩.
803
804 d [toggle_filenames]
805 Toggle filename display (see --draw-filename)
806
807 e [toggle_exif]
808 (optional feature, available in this build) Toggle EXIF tag dis‐
809 play
810
811 f [toggle_fullscreen]
812 Toggle fullscreen
813
814 g [toggle_fixed_geometry]
815 Enable/Disable automatic window resize when changing images.
816
817 h [toggle_pause]
818 Pause/Continue the slideshow. When it is paused, it will not
819 automatically change slides based on --slideshow-delay.
820
821 i [toggle_info]
822 Toggle info display (see --info)
823
824 k [toggle_keep_vp]
825 Toggle zoom and viewport keeping. When enabled, feh will keep
826 zoom and X, Y offset when switching images.
827
828 L [save_filelist]
829 Save the current filelist as "feh_PID_ID_filelist". It is saved
830 in the directory specified by --output-dir, if set, and in the
831 current working directory otherwise.
832
833 m [toggle_menu]
834 Show menu. Use the arrow keys and return to select items, and
835 ⟨escape⟩ to close the menu.
836
837 n, ⟨space⟩, ⟨Right⟩ [next_img]
838 Show next image. Selects the next image in thumbnail mode.
839
840 o [toggle_pointer]
841 Toggle pointer visibility
842
843 p, ⟨BackSpace⟩, ⟨Left⟩ [prev_img]
844 Show previous image. Selects the previous image in thumbnail
845 mode.
846
847 q, ⟨Escape⟩ [quit]
848 Quit feh
849
850 r [reload_image]
851 Reload current image. Useful for webcams
852
853 s [save_image]
854 Save the current image as "feh_PID_ID_FILENAME". It is saved in
855 the directory specified by --output-dir, if set, and in the cur‐
856 rent working directory otherwise.
857
858 w [size_to_image]
859 Change window size to fit current image size (plus/minus zoom, if
860 set). In scale-down and fixed-geometry mode, this also updates
861 the window size limits.
862
863 x [close]
864 Close current window
865
866 z [jump_random]
867 Jump to a random position in the current filelist
868
869 Z [toggle_auto_zoom]
870 Toggle auto-zoom.
871
872 [, ] [prev_dir, next_dir]
873 Jump to the first image of the previous or next sequence of
874 images sharing a directory name in the current filelist. Use
875 --sort dirname if you would like to ensure that all images in a
876 directory are grouped together.
877
878 <, > [orient_3, orient_1]
879 rotate the image 90 degrees (counter)clockwise.
880
881 When --edit is used, this also rotates the image in the underly‐
882 ing file. Rotation is lossless, but may create artifacts in some
883 image corners when used with JPEG images. Rotating in the
884 reverse direction will make them go away. See jpegtran(1) for
885 more about lossless JPEG rotation. Note: feh assumes that this
886 feature is used to normalize image orientation. For JPEG images,
887 it will unconditionally set the EXIF orientation tag to 1 ("0,0
888 is top left") after every rotation. See jpegexiforient(1) for
889 details on how to change this flag.
890
891 _ [flip]
892 Vertically flip image. When --edit is used, this also flips the
893 image in the underlying file (see above).
894
895 | [mirror]
896 Horizontally flip image. When --edit is used, this also flips
897 the image in the underlying file (see above).
898
899 0 .. 9 [action_0 .. action_9]
900 Execute the corresponding action (0 = --action, 1 = --action1
901 etc.)
902
903 ⟨Return⟩ [action_0]
904 Run the command defined by --action
905
906 ⟨Home⟩ [jump_first]
907 Show first image
908
909 ⟨End⟩ [jump_last]
910 Show last image
911
912 ⟨page up⟩ [jump_fwd]
913 Go forward ~5% of the filelist
914
915 ⟨page down⟩ [jump_back]
916 Go backward ~5% of the filelist
917
918 + [reload_plus]
919 Increase reload delay by 1 second
920
921 - [reload_minus]
922 Decrease reload delay by 1 second
923
924 ⟨Delete⟩ [remove]
925 Remove current file from filelist
926
927 ⟨Ctrl+Delete⟩ [delete]
928 Remove current file from filelist and delete it
929
930 ⟨keypad Left⟩, ⟨Ctrl+Left⟩ [scroll_left]
931 Scroll to the left
932
933 ⟨keypad Right⟩, ⟨Ctrl+Right⟩ [scroll_right]
934 Scroll to the right
935
936 ⟨keypad up⟩, ⟨Ctrl+Up⟩ [scroll_up]
937 Scroll up
938
939 ⟨keypad Down⟩, ⟨Ctrl+Down⟩ [scroll_down]
940 Scroll down. Note that the scroll keys work without anti-alias‐
941 ing for performance reasons; hit the render key after scrolling
942 to anti-alias the image.
943
944 ⟨Alt+Left [scroll_left_page]⟩
945 Scroll to the left by one page
946
947 ⟨Alt+Right [scroll_right_page]⟩
948 Scroll to the right by one page
949
950 ⟨Alt+Up [scroll_up_page]⟩
951 Scroll up by one page
952
953 ⟨Alt+Down [scroll_down_page]⟩
954 Scroll down by one page
955
956 R, ⟨keypad begin⟩ [render]
957 Anti-alias the image. Opens the currently selected image in
958 thumbnail mode.
959
960 ⟨keypad +⟩, ⟨Up⟩ [zoom_in]
961 Zoom in
962
963 ⟨keypad -⟩, ⟨Down⟩ [zoom_out]
964 Zoom out
965
966 *, ⟨keypad *⟩ [zoom_default]
967 Zoom to 100%
968
969 /, ⟨keypad /⟩ [zoom_fit]
970 Zoom to fit the window size
971
972 ! [zoom_fill]
973 Zoom to fill the window size like --bg-fill
974
975 MENU KEYS
976 The following keys bindings are used for the feh menu:
977
978 ⟨Escape⟩ [menu_close]
979 Close the menu
980
981 ⟨Up⟩ [menu_up]
982 Highlight previous menu item
983
984 ⟨Down⟩ [menu_down]
985 Highlight next menu item
986
987 ⟨Left⟩ [menu_parent]
988 Highlight parent menu item
989
990 ⟨Right⟩ [menu_child]
991 Highlight child menu item
992
993 ⟨Return⟩, ⟨space⟩ [menu_select]
994 Select highlighted menu item
995
997 .config/feh/buttons. This works like the keys config file: the entries
998 are of the form "action [binding]".
999
1000 Each binding is a button number. It may optionally start with modifiers
1001 for things like Control, in which case binding looks like mod-button (for
1002 example C-1 for Ctrl + Left button).
1003
1004 Note: Do not use the same button for multiple actions. feh does not
1005 check for conflicting bindings, so their behaviour is undefined. Either
1006 unbind the unwanted action, or bind it to another unused button. The
1007 order in which you bind / unbind does not matter, though.
1008
1009 For the available modifiers, see KEYS CONFIGURATION SYNTAX.
1010
1011 BUTTONS
1012 In an image window, the following buttons may be used (The strings in
1013 [square brackets] are the config action names). Additionally, all
1014 actions specified in the KEYS section can also be bound to a button.
1015
1016 unbound [reload]
1017 Reload current image
1018
1019 1 ⟨left mouse button⟩ [pan]
1020 pan the current image
1021
1022 2 ⟨middle mouse button⟩ [zoom]
1023 Zoom the current image
1024
1025 3 ⟨right mouse button⟩ [toggle_menu]
1026 Toggle menu
1027
1028 4 ⟨mousewheel down⟩ [prev_img]
1029 Show previous image
1030
1031 5 ⟨mousewheel up⟩ [next_img]
1032 Show next image
1033
1034 Ctrl+1 [blur]
1035 Blur current image
1036
1037 Ctrl+2 [rotate]
1038 Rotate current image
1039
1040 unbound [zoom_in]
1041 Zoom in
1042
1043 unbound [zoom_out]
1044 Zoom out
1045
1047 Default Bindings: When viewing an image, mouse button 1 pans the image
1048 (moves it around) or, when only clicked, moves to the next image
1049 (slideshow mode only). Quick drags with less than 2px of movement per
1050 axis will be treated as clicks to aid graphics tablet users. Mouse but‐
1051 ton 2 zooms (click and drag left->right to zoom in, right->left to zoom
1052 out, click once to restore zoom to 100%) and mouse button 3 opens the
1053 menu.
1054
1055 Ctrl+Button 1 blurs or sharpens the image (drag left to blur, right to
1056 sharpen); Ctrl+Button 2 rotates the image around the center point.
1057
1058 A note about pan and zoom modes: In pan mode, if you reach a window bor‐
1059 der but haven't yet panned to the end of the image, feh will warp your
1060 cursor to the opposite border so you can continue panning.
1061
1062 When clicking the zoom button and immediately releasing it, the image
1063 will be back at 100% zoom. When clicking it and moving the mouse while
1064 holding the button down, the zoom will be continued at the previous zoom
1065 level. The zoom will always happen so that the pixel on which you
1066 entered the zoom mode remains stationary. So, to enlarge a specific part
1067 of an image, click the zoom button on that part.
1068
1070 In slideshow and multiwindow mode, feh handles the following signals:
1071
1072 SIGUSR1
1073 Slideshow mode: switch to next image; reload current image if the
1074 slideshow consists of a single file. Multiwindow mode: reload
1075 all images.
1076
1077 SIGUSR2
1078 Slideshow mode: switch to previous image; reload current image if
1079 the slideshow consists of a single file. Multiwindow mode:
1080 reload all images.
1081
1083 Here are some examples of useful option combinations. See also:
1084 ⟨https://feh.finalrewind.org/examples/⟩
1085
1086 feh ~/Pictures
1087 Show all images in ~/Pictures
1088
1089 feh -r ~/Pictures
1090 Recursively show all images found in ~/Pictures and subdirecto‐
1091 ries
1092
1093 feh -rSfilename --version-sort ~/Pictures
1094 Same as above, but sort naturally. By default, feh will show
1095 files in the string order of their names, meaning e.g. "foo
1096 10.jpg" will come before "foo 2.jpg". In this case, they are
1097 instead ordered as a human would expect.
1098
1099 feh -t -Sfilename -E 128 -y 128 -W 1024 ~/Pictures
1100 Show 128x128 pixel thumbnails, limit window width to 1024 pixels.
1101
1102 feh -t -Sfilename -E 128 -y 128 -W 1024 -P -C
1103 /usr/share/fonts/truetype/ttf-dejavu/ -e DejaVuSans/8 ~/Pictures
1104 Same as above, but enable thumbnail caching and use a smaller
1105 font.
1106
1107 feh -irFarial/14 -O index.jpg ~/Pictures
1108 Make an index print of ~/Pictures and all directories below it,
1109 using 14 point Arial to write the image info under each thumb‐
1110 nail. Save the image as index.jpg and don't display it, just
1111 exit. Note that this even works without a running X server
1112
1113 feh --unloadable -r ~/Pictures
1114 Print all unloadable images in ~/Pictures, recursively
1115
1116 feh -f by_width -S width --reverse --list .
1117 Write a list of all images in the directory to by_width, sorted
1118 by width (widest images first)
1119
1120 feh -w ~/Pictures/holidays
1121 Open each image in ~/Pictures/holidays in its own window
1122
1123 feh -FD5 -Sname ~/Pictures/presentation
1124 Show the images in .../presentation, sorted by name, in
1125 fullscreen, automatically change to the next image after 5 sec‐
1126 onds
1127
1128 feh -rSwidth -A "mv %F ~/images/%N" ~/Pictures
1129 View all images in ~/Pictures and below, sorted by width, move an
1130 image to ~/image/image_name when enter is pressed
1131
1132 feh --start-at ~/Pictures/foo.jpg
1133 View all images in ~/Pictures, starting with foo.jpg. All other
1134 images are still in the slideshow and can be viewed normally
1135
1136 feh --start-at ~/Pictures/foo.jpg ~/Pictures
1137 Same as above.
1138
1139 feh --info "exifgrep '(Model|DateTimeOriginal|FNumber|ISO|Flash)' %F |
1140 cut -d . -f 4-" .
1141 Show some EXIF information, extracted by exifprobe/exifgrep
1142
1143 feh --action 'rm %F' -rl --max-dimension 1000x800
1144 Recursively remove all images with dimensions below or equal to
1145 1000x800 pixels from the current directory.
1146
1147 feh -L '%w %h %f' | awk '{ if ($1 > $2) { print $0 } }' | cut -d ' ' -f
1148 3- | feh -f -
1149 Show landscape pictures (image width greater than height) in the
1150 current directory.
1151
1153 When --edit is used, feh needs the jpegtran and jpegexiforient binaries
1154 (usually distributed in "libjpeg-progs" or similar) for lossless JPEG
1155 rotation.
1156
1157 To view images from URLs such as "http://", feh must be compiled with
1158 libcurl support. It is enabled in this build
1159
1161 On systems with giflib 5.1.2, feh may be unable to load gif images. For
1162 affected mips, mipsel and arm devices, gif support is completely broken,
1163 while on x86 / x86_64 gifs can usually only be loaded if they are the
1164 first image in the filelist. This appears to be a bug in giflib, see
1165 ⟨https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729⟩ for details.
1166 Workaround: Use --conversion-timeout 5 (or some other positive value) to
1167 load gifs with imagemagick instead, or downgrade to giflib 5.1.1, or
1168 upgrade to giflib 5.1.4.
1169
1170 While loading images using libcurl, feh will not react to key or mouse
1171 actions.
1172
1173 Thumbnail mode is somewhat inefficient, and because of that not nearly as
1174 fast as it could be.
1175
1176 --scale-down does not take window decorations into account and may there‐
1177 fore make the window slightly too large.
1178
1179 REPORTING BUGS
1180 If you find a bug, please report it to ⟨derf+feh@finalrewind.org⟩ or via
1181 ⟨https://github.com/derf/feh/issues⟩. You are also welcome to direct any
1182 feh-related comments/questions/... to #feh on irc.oftc.net.
1183
1184 Please include the feh version ⟨the output of "feh --version"⟩, steps to
1185 reproduce the bug and, if necessary, images to reproduce it.
1186
1188 Copyright (C) 1999, 2000 by Paul Duncan. Copyright (C) 1999, 2000 by Tom
1189 Gilbert and contributors. Copyright (C) 2010-2020 by Daniel Friesel and
1190 contributors.
1191
1192 Permission is hereby granted, free of charge, to any person obtaining a
1193 copy of this software and associated documentation files (the "Soft‐
1194 ware"), to deal in the Software without restriction, including without
1195 limitation the rights to use, copy, modify, merge, publish, distribute,
1196 sublicense, and/or sell copies of the Software, and to permit persons to
1197 whom the Software is furnished to do so, subject to the following condi‐
1198 tions:
1199
1200 The above copyright notice and this permission notice shall be included
1201 in all copies of the Software and its documentation and acknowledgment
1202 shall be given in the documentation and software packages that this Soft‐
1203 ware was used.
1204
1205 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1206 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL‐
1207 ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
1208 SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1209 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
1210 OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1211 SOFTWARE.
1212
1213 Current developer: Daniel Friesel ⟨derf@finalrewind.org⟩
1214
1215 Original author (no longer developing): Tom Gilbert
1216 ⟨feh_sucks@linuxbrit.co.uk⟩
1217
1218 Website: https://feh.finalrewind.org
1219
1220BSD January 25, 2021 BSD