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