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.10
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
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
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
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
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, none, filename, dirname, mtime, width, height, pixels,
450 size, format. For sort modes other than name, none, filename,
451 dirname, or mtime, a preload run is necessary, causing a delay
452 proportional 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 none is the default; you can specify it explicitly to discard a
462 sort mode that has been specified at an earlier point in the com‐
463 mand line arguments.
464
465 -|, --start-at filename
466 Start the filelist at filename. If no other files or filelists
467 were specified on the command line, feh will first load all files
468 from the directory in which filename resides. This way, it's
469 possible to look at a specific image and use the next / prev keys
470 to browse through the directory. See USAGE EXAMPLES for exam‐
471 ples. If filename is a remote URL and no files or filelists were
472 specified, feh will show filename and not attempt to load addi‐
473 tional files or directories.
474
475 Note: If you use relative paths in your filelist, filename should
476 also be a relative path. If you use absolute paths, it should
477 also be an absolute path. If feh cannot find an exact match, it
478 will compare basenames (filenames without the directory suffix).
479 This may lead to mismatches if several files in your filelist
480 have the same basename.
481
482 -T, --theme theme
483 Load options from config file with name theme - see THEMES CONFIG
484 SYNTAX for more info. Note that command line options always
485 override theme options. The theme can also be set via the pro‐
486 gram name (e.g. with symlinks), so by default feh will look for a
487 "feh" theme.
488
489 -t, --thumbnails
490 Same as Index mode, but the thumbnails are clickable image
491 launchers. Note that --fullscreen and --scale-down do not affect
492 the thumbnail window. They do, however, work for image windows
493 launched from thumbnail mode. Also supports INDEX AND THUMBNAIL
494 MODE OPTIONS as well as MONTAGE MODE OPTIONS.
495
496 -~, --thumb-title string
497 Set title for windows opened from thumbnail mode. See also
498 FORMAT SPECIFIERS.
499
500 -^, --title title
501 Set window title. Applies to all windows except those opened
502 from thumbnail mode. See FORMAT SPECIFIERS.
503
504 -u, --unloadable
505 Don't display images. Just print out their names if imlib2 can
506 NOT successfully load them. Returns false if at least one image
507 was loadable.
508
509 -V, --verbose
510 output useful information, progress bars, etc.
511
512 -v, --version
513 output version information and exit.
514
515 --version-sort
516 When combined with --sort name, --sort filename, or --sort
517 dirname: use natural sorting for file and directory names. In
518 this mode, filenames are sorted as an ordinary human would ex‐
519 pect, e.g. "2.jpg" comes before "10.jpg". Note that this option
520 only has an effect when a sort mode is set using --sort.
521
522 --window-id windowid
523 Draw to an existing X11 window by its ID windowid. This option
524 is intended for use with software such as xcreensaver or xsecure‐
525 lock, which provide a window for other applications to draw into.
526 Unexpected things will happen if you specify a window belonging
527 to software which does not expect feh to draw into it or attempt
528 to use options or keybindings which affect window attributes,
529 such as full-screen mode.
530
531 --xinerama-index monitor
532 (optional feature, enabled in this build) Override feh's idea of
533 the active Xinerama monitor. May be useful in certain circum‐
534 stances where the window manager places the feh window on Xin‐
535 erama monitor A while feh assumes that it will be placed on moni‐
536 tor B.
537
538 In background setting mode: When used with any option other than
539 --bg-tile: Only set wallpaper on monitor. All other monitors
540 will be filled black/white. This is most useful in a Xinerama
541 configuration with overlapping monitors. For instance, assume
542 you have two overlapping displays (index 0 and 1), where index 0
543 is smaller. To center a background on the display with index 0
544 and fill the extra space on index 1 black/white, use
545 "--xinerama-index 0" when setting the wallpaper.
546
547 Use xrandr --listmonitor to determine how Xinerama monitor IDs
548 map to screens/monitors in your setup.
549
550 --zoom percent | max | fill
551 Zoom images by percent when in full screen mode or when window
552 geometry is fixed. When combined with --auto-zoom, zooming will
553 be limited to the specified percent. Specifying max is like set‐
554 ting --auto-zoom, using fill makes feh zoom the image like the
555 --bg-fill mode.
556
557 --zoom-step percent
558 Zoom images in and out by percent (default: 25) when using the
559 zoom keys and buttons.
560
562 These additional options can be used for index, montage and (partially)
563 thumbnail mode.
564
565 -a, --alpha int
566 When drawing thumbnails onto the background, set their transpar‐
567 ency level to int (0 - 255).
568
569 -b, --bg file | trans
570 Use file as background for your montage. With this option speci‐
571 fied, the montage size will default to the size of file if no
572 size restrictions were specified. Alternatively, if file is
573 "trans", the background will be made transparent.
574
575 -X, --ignore-aspect
576 By default, the montage thumbnails will retain their aspect ra‐
577 tios, while fitting into thumb-width/-height. This options
578 forces them to be the size set by --thumb-width and
579 --thumb-height. This will prevent any empty space in the final
580 montage.
581
582 -H, --limit-height pixels
583 Limit the height of the montage.
584
585 -W, --limit-width pixels
586 Limit the width of the montage, defaults to 800 pixels.
587
588 If both --limit-width and --limit-height are specified, the mon‐
589 tage will be exactly width x height pixels in dimensions.
590
591 -o, --output file
592 Save the created montage to file.
593
594 -O, --output-only file
595 Just save the created montage to file without displaying it.
596
597 -s, --stretch
598 Normally, if an image is smaller than the specified thumbnail
599 size, it will not be enlarged. If this option is set, the image
600 will be scaled up to fit the thumbnail size. Aspect ratio will
601 be maintained unless --ignore-aspect is specified.
602
603 -E, --thumb-height pixels
604 Set thumbnail height.
605
606 -y, --thumb-width pixels
607 Set thumbnail width.
608
610 In addition to MONTAGE MODE OPTIONS --alpha, --bg, --limit-height,
611 --limit-width, --output, --output-only, --thumb-height, --thumb-width,
612 the following options can be used.
613
614 --index-info format
615 Show image information based on format below thumbnails in index
616 / thumbnail mode. See FORMAT SPECIFIERS. May contain newlines.
617 Use "--index-info ''" to display thumbnails without any info text
618
619 Note: If you specify image-related formats (such as %w or %s),
620 feh needs to load all images to calculate the dimensions of its
621 own window. So when using them with many files, it will take a
622 while before a feh window becomes visible. Use --preload to get
623 a progress bar.
624
625 -@, --title-font font
626 Set font to print a title on the index, if no font is specified,
627 no title will be printed.
628
629 -J, --thumb-redraw n
630 Redraw thumbnail window every n images while generating thumb‐
631 nails. Redrawing takes quite long, so the default is 10. Set n
632 = 1 to update the thumbnail window immediately. With n = 0,
633 there will only be one redraw once all thumbnails are loaded.
634
636 In many desktop environments, feh can also be used as a background set‐
637 ter. Unless you pass the --no-fehbg option, it will write a script to
638 set the current background to ~/.fehbg. So to have your background re‐
639 stored every time you start X, you can add "~/.fehbg &" to your X startup
640 script (such as ~/.xinitrc). Note that the commandline written to
641 ~/.fehbg always includes the --no-fehbg option to ensure that it is not
642 inadvertently changed by differences in X11 screen layout or similar.
643
644 Note that feh does not support setting the wallpaper of GNOME shell desk‐
645 tops. In this environment, you can use "gsettings set
646 org.gnome.desktop.background picture-uri file:///path" instead.
647
648 For --bg-center, --bg-fill, and --bg-max, you can use --geometry to spec‐
649 ify an offset from one side of the monitor instead of centering the im‐
650 age. Positive values will offset from the left/top side, negative values
651 from the bottom/right. +0 and -0 are both valid and distinct values.
652
653 Note that all options except --bg-tile support Xinerama. For instance,
654 if you have multiple monitors connected and use e.g. --bg-center, feh
655 will center or appropriately offset the image on each monitor. You may
656 even specify more than one file, in that case, the first file is set on
657 monitor 0, the second on monitor 1, and so on. Use xrandr --listmonitor
658 to determine how Xinerama monitor IDs map to screens / monitors in your
659 setup.
660
661 Use --no-xinerama to treat the whole X display as one monitor when set‐
662 ting wallpapers. You may also use --xinerama-index to use feh as a back‐
663 ground setter for a specific monitor.
664
665 --bg-center
666 Center the file on the background. If it is too small, it will
667 be surrounded by a border as specified by --image-bg.
668
669 --bg-fill
670 Like --bg-scale, but preserves aspect ratio by zooming the image
671 until it fits. Either a horizontal or a vertical part of the im‐
672 age will be cut off
673
674 --bg-max
675 Like --bg-fill, but scale the image to the maximum size that fits
676 the screen with borders on one side. The border color can be set
677 using --image-bg.
678
679 --bg-scale
680 Fit the file into the background without repeating it, cutting
681 off stuff or using borders. But the aspect ratio is not pre‐
682 served either
683
684 --bg-tile
685 Tile (repeat) the image in case it is too small for the screen
686
687 --no-fehbg
688 Do not write a ~/.fehbg file
689
691 %a Information about slideshow state (playing/paused)
692
693 %f Image path/filename
694
695 %F Escaped image path/filename (for use in shell commands)
696
697 %g w,h window dimensions in pixels (mnemonic: geometry)
698
699 %h Image height
700
701 %l Total number of files in filelist
702
703 %L Temporary copy of filelist. Multiple uses of %L within the same
704 format string will return the same copy.
705
706 %m Current mode
707
708 %n Image name
709
710 %N Escaped image name
711
712 %o x,y offset of top-left image corner to window corner in pixels
713
714 %p Number of image pixels
715
716 %P Number of image pixels in human-readable format with k/M
717 (kilopixels / megapixels) suffix
718
719 %r Image rotation. A half right turn equals pi.
720
721 %s Image size in bytes
722
723 %S Human-readable image size (kB / MB)
724
725 %t Image format
726
727 %u Number of current file
728
729 %w Image width
730
731 %v feh version
732
733 %V Process ID
734
735 %z Current image zoom, rounded to two decimal places
736
737 %Z Current image zoom, higher precision
738
739 %% A literal %
740
742 feh has three config files: themes for theme definitions, keys for key
743 bindings and buttons for mouse button bindings. It will try to read them
744 from $XDG_CONFIG_HOME/feh/, which (when XDG_CONFIG_HOME is unset) de‐
745 faults to ~/.config/feh/. If the files are not found in that directory,
746 it will also try /etc/feh/.
747
748 All config files treat lines starting with a "#" character as comments.
749 Comments at the end of a line are not supported.
750
752 .config/feh/themes allows the naming of option groups, called themes.
753
754 It takes entries of the form "theme options ...", where theme is the name
755 of the entry and options are the options which will be applied when the
756 theme is used.
757
758 Note that the option parser does not behave like a normal shell: filename
759 expansion and backslash escape sequences are not supported and passed to
760 feh's option parser as-is. However, quoting of arguments is respected
761 and can be used for arguments with whitespace. So, the sequence "--info
762 "foo bar"" works as intended (that is, it display the string "foo bar"),
763 whereas the option string "--info foo\ bar" will only display "foo\" and
764 complain about the file bar not existing. Please keep this in mind when
765 writing theme files.
766
767 An example entry is "imagemap -rVq --thumb-width 40 --thumb-height 30
768 --index-info '%n\n%wx%h'".
769
770 You can use this theme in two ways. Either call "feh -Timagemap *.jpg",
771 or create a symbolic link to feh with the name of the theme you want it
772 to use. For the example above, this would be "ln -s `which feh `
773 ~/bin/imagemap". Now just run "imagemap *.jpg" to use these options.
774
775 Note that you can split a theme over several lines by placing a backslash
776 at the end of an unfinished line. A single option-argument-pair must not
777 span multiple lines. A single line must not be longer than 1023 charac‐
778 ters, but there's no upper limit for the length of a theme.
779
780 Command line options always override theme options.
781
783 .config/feh/keys defines key bindings. It has entries of the form
784 "action [key1 [key2 [key3]]]".
785
786 Each key is an X11 keysym name as shown by xev(1), like "Delete". It may
787 optionally start with modifiers for things like Control, in which case
788 key looks like mod-keysym (for example "C-Delete" for Ctrl+Delete or
789 "C-1-Delete" for Ctrl+Alt+Delete)
790
791 Available modifiers are C for Control, S for Shift and 1, 4 for Mod1 and
792 Mod4. To match an uppercase letter like "S" instead of "s", the Shift
793 modifier is not required.
794
795 Specifying an action without any keys unbinds it (i.e. the default bind‐
796 ings are removed).
797
798 Note: Do not use the same keybinding for multiple actions. When binding
799 an action to a new key (or mouse button), make sure to unbind it from its
800 previous action, if present. feh does not check for conflicting bind‐
801 ings, so their behaviour is undefined.
802
803 For a list of the action names, see KEYS. Note that not all of the key
804 names used there correspond to X11 keysyms. Most notably, page up (Prior
805 / Page_Up), page down (Next / Page_Down) and the keypad keys (KP_*) do
806 not.
807
809 The following actions and default key bindings can be used in an image
810 window. (The strings in [square brackets] are the config action names).
811 If feh is running inside a terminal and its standard input is not used
812 for images or filelists, key input from the terminal is also accepted.
813 However, terminal input support is currently limited to most alphanumeric
814 characters (0-9 a-z A-Z and some more), arrow keys, return and backspace.
815 The Alt (Mod1) modifier is also supported.
816
817 a [toggle_actions]
818 Toggle actions display (see --draw-actions)
819
820 A [toggle_aliasing]
821 Enable/Disable anti-aliasing
822
823 c [toggle_caption]
824 Caption entry mode. If --caption-path has been specified, then
825 this enables caption editing. The caption at the bottom of the
826 screen will turn yellow and can be edited. Hit return to confirm
827 and save the caption, or escape to cancel editing. Note that you
828 can insert an actual newline into the caption using
829 ⟨Ctrl+return⟩.
830
831 d [toggle_filenames]
832 Toggle filename display (see --draw-filename)
833
834 e [toggle_exif]
835 (optional feature, available in this build) Toggle EXIF tag dis‐
836 play
837
838 f [toggle_fullscreen]
839 Toggle fullscreen
840
841 g [toggle_fixed_geometry]
842 Enable/Disable automatic window resize when changing images.
843
844 h [toggle_pause]
845 Pause/Continue the slideshow. When it is paused, it will not au‐
846 tomatically change slides based on --slideshow-delay.
847
848 i [toggle_info]
849 Toggle info display (see --info)
850
851 k [toggle_keep_vp]
852 Toggle zoom and viewport keeping. When enabled, feh will keep
853 zoom and X, Y offset when switching images.
854
855 L [save_filelist]
856 Save the current filelist as "feh_PID_ID_filelist". It is saved
857 in the directory specified by --output-dir, if set, and in the
858 current working directory otherwise.
859
860 m [toggle_menu]
861 Show menu. Use the arrow keys and return to select items, and
862 ⟨escape⟩ to close the menu.
863
864 n, ⟨space⟩, ⟨Right⟩ [next_img]
865 Show next image. Selects the next image in thumbnail mode.
866
867 o [toggle_pointer]
868 Toggle pointer visibility
869
870 p, ⟨BackSpace⟩, ⟨Left⟩ [prev_img]
871 Show previous image. Selects the previous image in thumbnail
872 mode.
873
874 q, ⟨Escape⟩ [quit]
875 Quit feh
876
877 r [reload_image]
878 Reload current image. Useful for webcams
879
880 s [save_image]
881 Save the current image as "feh_PID_ID_FILENAME". It is saved in
882 the directory specified by --output-dir, if set, and in the cur‐
883 rent working directory otherwise.
884
885 w [size_to_image]
886 Change window size to fit current image size (plus/minus zoom, if
887 set). In scale-down and fixed-geometry mode, this also updates
888 the window size limits.
889
890 x [close]
891 Close current window
892
893 z [jump_random]
894 Jump to a random position in the current filelist
895
896 Z [toggle_auto_zoom]
897 Toggle auto-zoom.
898
899 [, ] [prev_dir, next_dir]
900 Jump to the first image of the previous or next sequence of im‐
901 ages sharing a directory name in the current filelist. Use
902 --sort dirname if you would like to ensure that all images in a
903 directory are grouped together.
904
905 <, > [orient_3, orient_1]
906 rotate the image 90 degrees (counter)clockwise.
907
908 When --edit is used, this also rotates the image in the underly‐
909 ing file. Rotation is lossless, but may create artifacts in some
910 image corners when used with JPEG images. Rotating in the re‐
911 verse direction will make them go away. See jpegtran(1) for more
912 about lossless JPEG rotation. Note: feh assumes that this fea‐
913 ture is used to normalize image orientation. For JPEG images, it
914 will unconditionally set the EXIF orientation tag to 1 ("0,0 is
915 top left") after every rotation. See jpegexiforient(1) for de‐
916 tails on how to change this flag.
917
918 _ [flip]
919 Vertically flip image. When --edit is used, this also flips the
920 image in the underlying file (see above).
921
922 | [mirror]
923 Horizontally flip image. When --edit is used, this also flips
924 the image in the underlying file (see above).
925
926 0 .. 9 [action_0 .. action_9]
927 Execute the corresponding action (0 = --action, 1 = --action1
928 etc.)
929
930 ⟨Return⟩ [action_0]
931 Run the command defined by --action
932
933 ⟨Home⟩ [jump_first]
934 Show first image
935
936 ⟨End⟩ [jump_last]
937 Show last image
938
939 ⟨page up⟩ [jump_fwd]
940 Go forward ~5% of the filelist
941
942 ⟨page down⟩ [jump_back]
943 Go backward ~5% of the filelist
944
945 + [reload_plus]
946 Increase reload delay by 1 second
947
948 - [reload_minus]
949 Decrease reload delay by 1 second
950
951 ⟨Delete⟩ [remove]
952 Remove current file from filelist
953
954 ⟨Ctrl+Delete⟩ [delete]
955 Remove current file from filelist and delete it
956
957 ⟨keypad Left⟩, ⟨Ctrl+Left⟩ [scroll_left]
958 Scroll to the left
959
960 ⟨keypad Right⟩, ⟨Ctrl+Right⟩ [scroll_right]
961 Scroll to the right
962
963 ⟨keypad up⟩, ⟨Ctrl+Up⟩ [scroll_up]
964 Scroll up
965
966 ⟨keypad Down⟩, ⟨Ctrl+Down⟩ [scroll_down]
967 Scroll down. Note that the scroll keys work without anti-alias‐
968 ing for performance reasons; hit the render key after scrolling
969 to anti-alias the image.
970
971 ⟨Alt+Left [scroll_left_page]⟩
972 Scroll to the left by one page
973
974 ⟨Alt+Right [scroll_right_page]⟩
975 Scroll to the right by one page
976
977 ⟨Alt+Up [scroll_up_page]⟩
978 Scroll up by one page
979
980 ⟨Alt+Down [scroll_down_page]⟩
981 Scroll down by one page
982
983 R, ⟨keypad begin⟩ [render]
984 Anti-alias the image. Opens the currently selected image in
985 thumbnail mode.
986
987 ⟨keypad +⟩, ⟨Up⟩ [zoom_in]
988 Zoom in
989
990 ⟨keypad -⟩, ⟨Down⟩ [zoom_out]
991 Zoom out
992
993 *, ⟨keypad *⟩ [zoom_default]
994 Zoom to 100%
995
996 /, ⟨keypad /⟩ [zoom_fit]
997 Zoom to fit the window size
998
999 ! [zoom_fill]
1000 Zoom to fill the window size like --bg-fill
1001
1002 MENU KEYS
1003 The following keys bindings are used for the feh menu:
1004
1005 ⟨Escape⟩ [menu_close]
1006 Close the menu
1007
1008 ⟨Up⟩ [menu_up]
1009 Highlight previous menu item
1010
1011 ⟨Down⟩ [menu_down]
1012 Highlight next menu item
1013
1014 ⟨Left⟩ [menu_parent]
1015 Highlight parent menu item
1016
1017 ⟨Right⟩ [menu_child]
1018 Highlight child menu item
1019
1020 ⟨Return⟩, ⟨space⟩ [menu_select]
1021 Select highlighted menu item
1022
1024 .config/feh/buttons. This works like the keys config file: the entries
1025 are of the form "action [binding]".
1026
1027 Each binding is a button number. It may optionally start with modifiers
1028 for things like Control, in which case binding looks like mod-button (for
1029 example C-1 for Ctrl + Left button).
1030
1031 Note: Do not use the same button for multiple actions. feh does not
1032 check for conflicting bindings, so their behaviour is undefined. Either
1033 unbind the unwanted action, or bind it to another unused button. The or‐
1034 der in which you bind / unbind does not matter, though.
1035
1036 For the available modifiers, see KEYS CONFIGURATION SYNTAX.
1037
1038 BUTTONS
1039 In an image window, the following buttons may be used (The strings in
1040 [square brackets] are the config action names). Additionally, all ac‐
1041 tions specified in the KEYS section can also be bound to a button.
1042
1043 unbound [reload]
1044 Reload current image
1045
1046 0 ⟨cursor movement while not panning, zooming, or similar⟩
1047 Does not have a default binding. By binding it to quit, you can
1048 turn feh into a simple screensaver.
1049
1050 1 ⟨left mouse button⟩ [pan]
1051 pan the current image
1052
1053 2 ⟨middle mouse button⟩ [zoom]
1054 Zoom the current image
1055
1056 3 ⟨right mouse button⟩ [toggle_menu]
1057 Toggle menu
1058
1059 4 ⟨mousewheel down⟩ [prev_img]
1060 Show previous image
1061
1062 5 ⟨mousewheel up⟩ [next_img]
1063 Show next image
1064
1065 Ctrl+1 [blur]
1066 Blur current image
1067
1068 Ctrl+2 [rotate]
1069 Rotate current image
1070
1071 unbound [zoom_in]
1072 Zoom in
1073
1074 unbound [zoom_out]
1075 Zoom out
1076
1078 Default Bindings: When viewing an image, mouse button 1 pans the image
1079 (moves it around) or, when only clicked, moves to the next image
1080 (slideshow mode only). Quick drags with less than 2px of movement per
1081 axis will be treated as clicks to aid graphics tablet users. Mouse but‐
1082 ton 2 zooms (click and drag left->right to zoom in, right->left to zoom
1083 out, click once to restore zoom to 100%) and mouse button 3 opens the
1084 menu.
1085
1086 Ctrl+Button 1 blurs or sharpens the image (drag left to blur, right to
1087 sharpen); Ctrl+Button 2 rotates the image around the center point.
1088
1089 A note about pan and zoom modes: In pan mode, if you reach a window bor‐
1090 der but haven't yet panned to the end of the image, feh will warp your
1091 cursor to the opposite border so you can continue panning.
1092
1093 When clicking the zoom button and immediately releasing it, the image
1094 will be back at 100% zoom. When clicking it and moving the mouse while
1095 holding the button down, the zoom will be continued at the previous zoom
1096 level. The zoom will always happen so that the pixel on which you en‐
1097 tered the zoom mode remains stationary. So, to enlarge a specific part
1098 of an image, click the zoom button on that part.
1099
1101 In slideshow and multiwindow mode, feh handles the following signals:
1102
1103 SIGUSR1
1104 Slideshow mode: switch to next image; reload current image if the
1105 slideshow consists of a single file. Multiwindow mode: reload
1106 all images.
1107
1108 SIGUSR2
1109 Slideshow mode: switch to previous image; reload current image if
1110 the slideshow consists of a single file. Multiwindow mode:
1111 reload all images.
1112
1114 Here are some examples of useful option combinations. See also:
1115 ⟨https://feh.finalrewind.org/examples/⟩
1116
1117 feh ~/Pictures
1118 Show all images in ~/Pictures
1119
1120 feh -r ~/Pictures
1121 Recursively show all images found in ~/Pictures and subdirecto‐
1122 ries
1123
1124 feh -rSfilename --version-sort ~/Pictures
1125 Same as above, but sort naturally. By default, feh will show
1126 files in the string order of their names, meaning e.g. "foo
1127 10.jpg" will come before "foo 2.jpg". In this case, they are in‐
1128 stead ordered as a human would expect.
1129
1130 feh -t -Sfilename -E 128 -y 128 -W 1024 ~/Pictures
1131 Show 128x128 pixel thumbnails, limit window width to 1024 pixels.
1132
1133 feh -t -Sfilename -E 128 -y 128 -W 1024 -P -C
1134 /usr/share/fonts/truetype/ttf-dejavu/ -e DejaVuSans/8 ~/Pictures
1135 Same as above, but enable thumbnail caching and use a smaller
1136 font.
1137
1138 feh -irFarial/14 -O index.jpg ~/Pictures
1139 Make an index print of ~/Pictures and all directories below it,
1140 using 14 point Arial to write the image info under each thumb‐
1141 nail. Save the image as index.jpg and don't display it, just
1142 exit. Note that this even works without a running X server
1143
1144 feh --unloadable -r ~/Pictures
1145 Print all unloadable images in ~/Pictures, recursively
1146
1147 feh -f by_width -S width --reverse --list .
1148 Write a list of all images in the directory to by_width, sorted
1149 by width (widest images first)
1150
1151 feh -w ~/Pictures/holidays
1152 Open each image in ~/Pictures/holidays in its own window
1153
1154 feh -FD5 -Sname ~/Pictures/presentation
1155 Show the images in .../presentation, sorted by name, in
1156 fullscreen, automatically change to the next image after 5 sec‐
1157 onds
1158
1159 feh -rSwidth -A "mv %F ~/images/%N" ~/Pictures
1160 View all images in ~/Pictures and below, sorted by width, move an
1161 image to ~/image/image_name when enter is pressed
1162
1163 feh --start-at ~/Pictures/foo.jpg
1164 View all images in ~/Pictures, starting with foo.jpg. All other
1165 images are still in the slideshow and can be viewed normally
1166
1167 feh --start-at ~/Pictures/foo.jpg ~/Pictures
1168 Same as above.
1169
1170 feh --info "exifgrep '(Model|DateTimeOriginal|FNumber|ISO|Flash)' %F |
1171 cut -d . -f 4-" .
1172 Show some EXIF information, extracted by exifprobe/exifgrep
1173
1174 feh --action 'rm %F' -rl --max-dimension 1000x800
1175 Recursively remove all images with dimensions below or equal to
1176 1000x800 pixels from the current directory.
1177
1178 feh -L '%w %h %f' | awk '{ if ($1 > $2) { print $0 } }' | cut -d ' ' -f
1179 3- | feh -f -
1180 Show landscape pictures (image width greater than height) in the
1181 current directory.
1182
1184 When --edit is used, feh needs the jpegtran and jpegexiforient binaries
1185 (usually distributed in "libjpeg-progs" or similar) for lossless JPEG ro‐
1186 tation.
1187
1188 To view images from URLs such as "http://", feh must be compiled with
1189 libcurl support. It is enabled in this build
1190
1192 Imlib2 releases prior to 1.7.4 are unable to load gif, tiff, and webp im‐
1193 ages if the filename does not end with gif, tiff, or webp, respectively.
1194 Notably, this means that feh is unable to show gif, tiff, and webp images
1195 from stdin or network URLs on systems using an Imlib2 version older than
1196 1.7.4.
1197
1198 Imlib2 releases 1.7.5+ automatically rotate images based on their EXIF
1199 tags. When combined with the --auto-rotate option, this causes images to
1200 be rotated twice and end up in an incorrect orientation. As a work‐
1201 around, do not use --auto-rotate on systems with Imlib2 version 1.7.5 or
1202 later.
1203
1204 On systems with giflib 5.1.2, feh may be unable to load gif images. For
1205 affected mips, mipsel and arm devices, gif support is completely broken,
1206 while on x86 / x86_64 gifs can usually only be loaded if they are the
1207 first image in the filelist. This appears to be a bug in giflib, see
1208 ⟨https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729⟩ for details.
1209 Workaround: Use --conversion-timeout 5 (or some other positive value) to
1210 load gifs with imagemagick instead, or downgrade to giflib 5.1.1, or up‐
1211 grade to giflib 5.1.4.
1212
1213 While loading images using libcurl, feh will not react to key or mouse
1214 actions.
1215
1216 Thumbnail mode is somewhat inefficient, and because of that not nearly as
1217 fast as it could be.
1218
1219 --scale-down does not take window decorations into account and may there‐
1220 fore make the window slightly too large.
1221
1222 REPORTING BUGS
1223 If you find a bug, please report it to ⟨derf+feh@finalrewind.org⟩ or via
1224 ⟨https://github.com/derf/feh/issues⟩.
1225
1226 Please include the feh version ⟨the output of "feh --version"⟩, steps to
1227 reproduce the bug and, if necessary, images to reproduce it. Note that
1228 feh is a hobby project, so bug reports may be addressed with significant
1229 delays.
1230
1232 Copyright (C) 1999, 2000 by Paul Duncan. Copyright (C) 1999, 2000 by Tom
1233 Gilbert and contributors. Copyright (C) 2010-2020 by Daniel Friesel and
1234 contributors.
1235
1236 Permission is hereby granted, free of charge, to any person obtaining a
1237 copy of this software and associated documentation files (the "Soft‐
1238 ware"), to deal in the Software without restriction, including without
1239 limitation the rights to use, copy, modify, merge, publish, distribute,
1240 sublicense, and/or sell copies of the Software, and to permit persons to
1241 whom the Software is furnished to do so, subject to the following condi‐
1242 tions:
1243
1244 The above copyright notice and this permission notice shall be included
1245 in all copies of the Software and its documentation and acknowledgment
1246 shall be given in the documentation and software packages that this Soft‐
1247 ware was used.
1248
1249 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1250 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL‐
1251 ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
1252 SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1253 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
1254 OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1255 SOFTWARE.
1256
1257 Current developer: Daniel Friesel ⟨derf@finalrewind.org⟩
1258
1259 Original author (no longer developing): Tom Gilbert
1260 ⟨feh_sucks@linuxbrit.co.uk⟩
1261
1262 Website: https://feh.finalrewind.org
1263
1264BSD July 19, 2023 BSD