1feh(1) General Commands Manual feh(1)
2
3
4
6 feh - image viewer and cataloguer
7
9 feh [options] file(s)
10
12 feh is an image viewer using the imlib2 library to open and manipulate
13 images. feh has a large number of operational modes. The default mode
14 is an image slideshow, showing one image at a time from those specified
15 on the commandline. Keys and mouse control may be used to move through
16 them. Other modes can be specified on the commandline, and are
17 described below.
18
19 feh can also recurse through a directory structure to form a filelist
20 for processing, and will convert directory names on the commandline
21 into a list of their contents automatically.
22
23 Filelists can be sorted in a number of ways. The default is the order
24 the files were specified on the commandline, or the order they were
25 read from the disk. You can specify sorting modes such as randomize or
26 you can sort by filename, image name, width, height, pixels, etc.
27 Filelists can also be saved to or loaded from files.
28
30 Montage mode forms a montage from the filelist. The resultant image can
31 be viewed or saved, and it's size can be limited by height, width or
32 both.
33
34 Collage mode is very similar to montage mode, except the images are
35 distributed randomly and may overlap eachother
36
37 Index mode forms an index print from the filelist. Image thumbnails are
38 shown along with the filename, filesize and pixel size, printed using a
39 truetype font of your choice. The resultant image can be viewed or
40 saved, and it's size can be limited by height, width or both.
41
42 Thumbnail mode is like index mode, but the mini-images are clickable,
43 and launch the clicked image in a browser window.
44
45 Multiwindow mode shows images in multiple windows, instead of as a
46 slideshow in one window. Don't use with a large filelist ;)
47
48 Fullscreen mode shows image in fullscreen view, can be combined with a
49 slide-change delay to show an automated presentation.
50
51 List mode doesn't display images. Outputs an 'ls'-style listing of the
52 files in the filelist, including image info such as size, pixels, type,
53 etc. Customlist mode will display whatever image info you want, in the
54 format you choose.
55
56 feh can also list either all the loadable files in a filelist or all
57 the unloadable files. Useful for preening a directory.
58
59 feh also has the ability to load files over http or ftp, simply specify
60 the url on the commandline.
61
62 feh can read options from the commandline, or from a config file. The
63 syntax is the same in each case. See CONFIG FILE SYNTAX for details
64 about using themes defined in a config file. These methods may be used
65 in conjunction.
66
68 -h, --help
69 display help output and exit
70
71 -v, --version
72 output version information and exit
73
74 -V, --verbose
75 output useful information, progress bars, etc
76
77 -q, --quiet
78 Don't report non-fatal errors for failed loads. Verbose and quiet
79 modes are not mutually exclusive, the first controls informational
80 messages, the second only errors.
81
82 -T, --theme THEME
83 Load options from config file with name THEME - see CONFIG FILE
84 SYNTAX for more info.
85
86 --rcfile FILE
87 Use FILE to parse themes and options from, instead of the default
88 ~/.fehrc, /etc/fehrc files.
89
90 -r, --recursive
91 Recursively expand any directories in FILE to the content of those
92 directories, all the way down to the bottom level. (Take it easy)
93
94 -z, --randomize
95 When viewing multiple files in a slideshow, randomise the file
96 list before displaying.
97
98 -f, --filelist FILE
99 This option is similar to the playlists used by music software. If
100 FILE exists, it will be read for a list of files to load, in the
101 order they appear. The format is a list of image filenames, abso‐
102 lute or relative to the current directory, one filename per line.
103 If FILE doesn't exist, it will be created from the internal
104 filelist at the end of a viewing session. This is best used to
105 store the results of complex sorts (-Spixels for example) for
106 later viewing. Any changes to the internal filelist (such as
107 deleting a file or it being pruned for being unloadable) will be
108 saved to FILE when feh exits. You can add files to filelists by
109 specifying them on the commandline when also specifying the list.
110
111 -p, --preload
112 Preload images. This doesn't mean hold them in RAM, it means run
113 through them and eliminate unloadable images first. Otherwise they
114 will be removed as you flick through. This also analyses the
115 images to get data for use in sorting, such as pixel size, type
116 etc. A preload run will be automatically performed if you specify
117 one of these sort modes.
118
119 -F, --full-screen
120 Make the window fullscreen
121
122 -g, --geometry STRING
123 Limit (and don't change) the window size. Takes an X-style geome‐
124 try string like 640x480. Note that larger images will be zoomed
125 out to fit but you can see them at 1:1 by clicking the zoom but‐
126 ton.
127
128 -Z, --auto-zoom
129 Zoom picture to screen size in fullscreen (affected by --stretch
130 and --ignore-aspect).
131
132 --zoom PERCENT
133 Zooms images by a PERCENT, when in full screen mode or when window
134 geometry is fixed. If combined with --auto-zoom, zooming will be
135 limited to the the size.
136
137 -w, --multiwindow
138 Disable slideshow mode. With this setting, instead of opening mul‐
139 tiple files in slideshow mode, multiple windows will be opened,
140 one per file.
141
142 -x, --borderless
143 Create borderless windows
144
145 -d, --draw-filename
146 Draw the filename at the top-left of the image
147
148 -D, --slideshow-delay NUM
149 For slideshow mode, specifies time delay (seconds, can be a deci‐
150 mal) between automatically changing slides. Great for presenta‐
151 tions.
152
153 -R, --reload NUM
154 Use this option to tell feh to reload an image after NUM seconds.
155 Useful for viewing webcams via http, or even on your local
156 machine.
157
158 -k, --keep-http
159 When viewing files using HTTP, feh normally deletes the local
160 copies after viewing, or, if caching, on exit. This option pre‐
161 vents this so that you get to keep the local copies. They will be
162 in /tmp with "feh" in the name.
163
164 -Q, --builtin
165 Use builtin http client to grab remote files instead of wget, use‐
166 ful if you don't have wget installed.
167
168 --caption-path PATH
169 Path to directory containing image captions. This turns on caption
170 viewing, and if captions are found in PATH, which is relative to
171 the directory of each image, they are overlayed on the displayed
172 image. e.g with caption path "captions", and viewing image
173 images/foo.jpg, caption will be looked for as "images/cap‐
174 tions/foo.jpg.txt"
175
176 -l, --list
177 Don't display images. Analyse them and display an 'ls'-style list‐
178 ing. Useful in scripts hunt out images of a certain size/resolu‐
179 tion/type etc.
180
181 -L, --customlist FORMAT
182 Use FORMAT as the format specifier for list output. FORMAT is a
183 printf-like string containing image info specifiers. See FORMAT
184 SPECIFIERS.
185
186 -U, --loadable
187 Don't display images. Just print out their names if imlib2 can
188 successfully load them.
189
190 -u, --unloadable
191 Don't display images. Just print out their name if imlib2 can NOT
192 successfully load them.
193
194 -S, --sort SORT_TYPE
195 The file list may be sorted according to image parameters. Allowed
196 sort types are: name, filename, width, height, pixels, size, for‐
197 mat. For sort modes other than name or filename, a preload run
198 will be necessary, causing a delay proportional to the number of
199 images in the list
200
201 -n, --reverse
202 Reverse the sort order. Use this to invert the order of the
203 filelist. Eg to sort in reverse width order, use -nSwidth
204
205 -A, --action ACTION
206 Specify a string as an action to perform on the image. In
207 slideshow or multiwindow modes, the action will be run when the
208 enter key is pressed, in list mode, the action will be run for
209 each file listed. The action will be executed by /bin/sh. Use for‐
210 mat specifiers to refer to image info. See FORMAT SPECIFIERS for
211 examples
212 Eg. feh -A "mv %f ~/images/%n" *
213 In slideshow mode, the next image will be shown after running the
214 action, in multiwindow mode, the window will be closed.
215
216 --action1...9
217 Extra actions which can be set and triggered using the appropriate
218 number key.
219
220 -m, --montage
221 Enable montage mode. Montage mode creates a new image consisting
222 of a grid of thumbnails of the images in the filelist. When mon‐
223 tage mode is selected, certain other options become available. See
224 MONTAGE MODE OPTIONS
225
226 -c, --collage
227 Enable collage mode. Collage mode is very similar to montage mode,
228 except the images are distributed randomly.
229
230 -i, --index
231 Enable Index mode. Index mode is similar to montage mode, and
232 accepts the same options. It creates an index print of thumbails,
233 printing the image name beneath each thumbnail. Index mode enables
234 certain other options, see INDEX MODE OPTIONS
235
236 -I, --fullindex
237 Same as Index mode, but you also get image size and dimensions
238 printed below each thumbnail.
239
240 -t, --thumbnails
241 Same as Index mode, but the thumbnails are clickable image launch‐
242 ers.
243
244 --bg-tile FILE
245
246 --bg-center FILE
247
248 --bg-scale FILE
249
250 --bg-seamless FILE
251 Set your desktop background to FILE. Feh can use enlightenment IPC
252 if you are running it, or will fall back to X methods. Feh stores
253 the commandline necessary to restore the background you chose in
254 ~/.fehbg. So to have feh-set backgrounds restored when you restart
255 X, add the line "`cat $HOME/.fehbg`" to your X startup script
256 (e.g. ~/.xsession). Note that you only need to do this for non E
257 window managers.
258
259 -M, --menu-font FONT
260 Use FONT for the font in menus.
261
262 --menu-style FILE
263 Use FILE as the style descriptor for menu text.
264
265 --menu-bg BG
266 Use BG for the background image in menus.
267
268 --menu-border INT
269 Specify number of pixels that define the menu background's border.
270 Borders are not stretched when images are scaled.
271
272 -N, --no-menus
273 Don't load or show any menus.
274
275 -1, --next-button B
276 Use button B to advance to the next image in slideshow mode
277 (defaults to 1, usually the left button).
278
279 -2, --zoom-button B
280 Use button B to zoom the current image in any mode (defaults to 2,
281 usually the middle button).
282
283 -3, --pan-button B
284 Use button B to pan the current image in any mode (defaults to 3,
285 usually the right button).
286
287 --no-pan-ctrl-mask
288 Don't require CTRL+Button for panning in any mode -- just use the
289 button (default=off).
290
291 -4, --menu-button B
292 Use CTRL+Button B to activate the menu in any mode. Set to 0 to
293 use any button. This option is disabled if the -N or --no-menus
294 option is set (defaults to 3, usually the right button).
295
296 -5, --no-menu-ctrl-mask
297 Don't require CTRL+Button for menu activation in any mode -- just
298 use the button (default=off).
299
300 -6, --rotate-button B
301 Use CTRL+Button B to rotate the current image in any mode
302 (default=2).
303
304 -7, --no-rotate-ctrl-mask
305 Don't require CTRL+Button for rotation in any mode -- just use the
306 button (default=off).
307
308 -8, --blur-button B
309 Use CTRL+Button B to blur the current image in any mode
310 (default=1).
311
312 -9, --no-blur-ctrl-mask
313 Don't require CTRL+Button for blurring in any mode -- just use the
314 button (default=off).
315
316 --xinerama
317 Enable/disable Xinerama support. Has no effect unless you have an
318 Xinerama compiled in.
319
320 --screen-clip
321 Enable/disable window clipping based on screen size. WARNING:
322 With this disabled, windows could become very large, making them
323 unmanageable in certain window managers.
324
325 --hide-pointer
326 Hide the mouse pointer in full screen mode (useful for slideshows
327 etc).
328
330 %f image path/filename
331 %n image name
332 %s image size (bytes)
333 %p image pixel size
334 %w image width
335 %h image height
336 %t image format
337 %P prints feh
338 %v prints the version
339 %m prints the mode (slideshow, multiwindow...)
340 %l prints the total number of files in the filelist
341 %u prints the current file number
342 \n newline
343 Eg. feh -A "mv %f ~/images/%n" *
344
346 -X, --ignore-aspect
347 By default, the montage thumbnails will retain their aspect
348 ratios, while fitting in --thumb-width and --thumb-height. This
349 option will force them to be the size set by --thumb-width and
350 --thumb-height This will prevent any whitespace in the final mon‐
351 tage
352
353 -s, --stretch
354 Normally, if an image is smaller than the specified thumbnail
355 size, it will not be enlarged. If this option is set, the image
356 will be scaled up to fit the thumnail size. (Aspect ratio will be
357 maintained unless --ignore-aspect is specified)
358
359 -y, --thumb-width NUM
360 Set thumbnail width in pixels
361
362 -E, --thumb-height NUM
363 Set thumbnail height in pixels Thumbnails default to 20x20 pixels
364
365 -W, --limit-width NUM
366 Limit the width of the montage in pixels
367
368 -H, --limit-height NUM
369 Limit the height of the montage in pixels These options can be
370 used together (to define the image size exactly), or separately.
371 If only one is specified, theother is calculated from the number
372 of files specified and the size of the thumbnails. The default is
373 to limit width to 800 pixels and calculate the height as necessary
374
375 -b, --bg FILE|trans
376 Use FILE as a background for your montage. With this option speci‐
377 fied, the size of the montage will default to the size of FILE if
378 no size restrictions are specified. Alternatively, if FILE is
379 'trans', the background will be made transparent.
380
381 -a, --alpha NUM
382 When drawing thumbnails onto the background, apply them with a
383 transparency level of NUM (0-255).
384
385 -o FILE
386 Save the created montage to FILE
387
388 -O FILE
389 Just save the created montage to FILE without displaying it (use
390 in scripts)
391
393 -e, --font FONT
394 Use FONT to print the information under each thumbnail. FONT
395 should be a truetype font, resident in the current directory, or
396 in feh's font directory, and should be defined in the form font‐
397 name/size(points). (No extension). eg. --font myfont/12
398
399 --fontpath PATH
400 Specify PATH as an extra directory in which to search for fonts,
401 can use multiple times to add multiple paths, e.g --fontpath
402 /path/a --fontpath /path/b.
403
404 --title-font FONT
405 Use FONT to print a title on the index, if no font is specified, a
406 title will not be printed
407
409 The feh config file allows the naming of option groups, or themes. If
410 $HOME/.fehrc exists, or if not, but /etc/fehrc exists, feh will look in
411 it for theme name/options pairs. If neither $HOME/.fehrc or /etc/fehrc
412 exist, feh will create a default one in ~/.fehrc. An example entry
413 would be:
414 imagemap -rVq --thumb-width 40 --thumb-height 30
415 You can then use this theme in two ways. Either
416 feh --theme imagemap *.jpg
417 or you can create a symbolic link to feh with the name of the options
418 you want it to use. So from the example above:
419 ln -s `which feh` ~/bin/imagemap
420 Now I just run imagemap *.jpg to use those options. A cooler example is
421 mkindex -iVO index.jpg --title-font 20thcent/24 .
422 Notice the '.' at the end. Now with a symlink I can create a mkindex
423 command which will create an index.jpg in the current directory. I just
424 run mkindex to do it.
425 You can combine these themes with commandline options, they will be
426 combined. So in the example above, typing mkindex -q will create and
427 index, suppressing error messages. An example.fehrc is provided with a
428 couple of cool examples.
429
431 The default mode for viewing mulitple images is Slideshow mode When
432 viewing a slideshow, the following keys may be used:
433
434 p, P, <BACKSPACE>, <LEFT>
435 Goto previous slide
436
437 n, N, <SPACE>, <RIGHT>
438 Goto next slide
439
440 r, R Reload current image. Useful for webcams.
441
442 v, V Toggle fullscreen.
443
444 m, M Show popup menu.
445
446 c, C Caption entry mode. If --caption-path has been specified, then
447 this enables caption editing. The caption will turn yellow and be
448 editable, hit enter to confirm and save the caption, or hit escape
449 to cancel and revert the caption.
450
451 w, W Size window to current image size.
452
453 h, H Pause the slideshow (only useful when using timed reloading or
454 image changes)
455
456 s, S Save the current image to a unique filename.
457
458 f, F Save the current filelist to a unique filename.
459
460 <, > In place editing, rotate the image 90 degrees left/right.
461
462 <HOME>
463 Goto first slide
464
465 <END>
466 Goto last slide
467
468 <PAGE UP>
469 Go forward around 5% of the way through the slideshow
470
471 <PAGE DOWN>
472 Go backward around 5% of the way through the slideshow
473
474 <ESCAPE>
475 Quit the slideshow
476
477 +, = Increase reload delay
478
479 -, _ Decrease reload delay
480
481 <DELETE>
482 Remove the currently viewed file from the filelist
483
484 <CTRL+DELETE>
485 Delete the currently viewed file and remove it from the filelist
486
487 x, X Close current window.
488
489 q, Q Quit the slideshow <KEYPAD LEFT> Move the image to the left <KEY‐
490 PAD RIGHT> Move the image to the right <KEYPAD +> Zoom in <KEYPAD
491 -> Zoom out <KEYPAD *> Zoom to 100% <KEYPAD /> Zoom to fit the
492 window
493
495 When viewing an image, mouse button 1 moves to the next image
496 (slideshow mode only), button 2 zooms (click and drag left->right to
497 zoom in, right-> left to zoom out, click once to restore 1x zoom), and
498 mouse button 3 pans. Ctrl+button 1 blurs or sharpens the image (drag
499 left to blur and right to sharpen). Ctrl+button 2 rotates the image
500 around the center point. Ctrl+ button 3 activates the context-sensi‐
501 tive menu. Buttons can be redefined with the -1 through -9 (or
502 --*-button) cmdline flags. All you people with million button mice can
503 remove the ctrl mask with the --no-*-ctrl-mask options.
504
506 Here are some examples of nice option combinations to achieve cool
507 results:
508
509 feh -r /opt/images
510 Recursively scan /opt/images and show all the images in a
511 slideshow.
512
513 feh -rSname /opt/image
514 Same again, but sort by name before showing.
515
516 feh -m /opt/images/landscapes
517 Create a montage from the images in /opt/images/landscapes
518
519 feh -Xrm -W 400 --thumb-width 30 --thumb-height 20 ./landscapes
520 Create a montage from the images in /opt/images/landscapes and all
521 directories below it. Limit the width of the image to 400 and make
522 the thumbnails 30x20, ignoring aspect ratio.
523
524 feh -irFarial/14 -O index.jpg /opt/images
525 Make an index print of /opt/images and all directories below it,
526 using 14 point arial to write the image info under each thumbnail.
527 Save the image as index.jpg and don't display it, just exit.
528
529 feh -LrSpixels /opt/images
530 List the images in /opt/images and all directories within, sorted
531 by pixel size, giving as much info as possible.
532
533 feh -kR30 http://url.of.a.webcam.jpg
534 Use feh to view a webcam, reloading every 30 seconds, and saving
535 the images in /tmp.
536
537 feh --unloadables -r /opt/images
538 Weed out (list) all the unloadable images in /opt/images and
539 below.
540
541 feh -w /opt/images/holidays
542 Open each image in /opt/images/holidays in it's own window
543
544 feh -FD5 -Sname /opt/images/presentation
545 Show the images in /opt/images/presentation, sorted by name, in
546 fullscreen view, automatically changing slides every 5 seconds.
547
548 feh -rSwidth -A 'mv %f ~/images/%n´ /opt/images
549 View all the images in /opt/images and below, sorted by width
550 (smallest first) and move the image to ~/images/image_name when
551 enter is pressed.
552
554 None known. However there are many, many options. It is possible that
555 some do not work well in conjuncion with each other. Let me know :)
556
558 Copyright Tom Gilbert (and various contributors), 1999, 2000
559
560 Permission is hereby granted, free of charge, to any person obtaining a
561 copy of this software and associated documentation files (the "Soft‐
562 ware"), to deal in the Software without restriction, including without
563 limitation the rights to use, copy, modify, merge, publish, distribute,
564 sublicense, and/or sell copies of the Software, and to permit persons
565 to whom the Software is furnished to do so, subject to the following
566 conditions:
567
568 The above copyright notice and this permission notice shall be included
569 in all copies of the Software and its documentation and acknowledgment
570 shall be given in the documentation and software packages that this
571 Software was used.
572
573 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
574 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MER‐
575 CHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
576 NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
577 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
578 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
579 DEALINGS IN THE SOFTWARE.
580
581 Email bugs and feature requests to
582 <feh_sucks@linuxbrit.co.uk>
583
584
585
586 August 14, 2001 feh(1)