sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Welcome to the FIM (Fbi IMproved) image viewer program homepage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FIM is a lightweight universal image viewer, mostly for Linux (but not only).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tutorials | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| We have the following tutorials: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tutorial: Browsing through a photo collection with FIM | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The very basics of FIM are opening files, e.g.:
fim DSC_0001.JPG DSC_0002.JPG
or a directory of files, e.g.:
fim -R ~/Pictures/
... and browsing through them with the basic keys: n (next file),
p (previous file),
+ (magnify),
- (reduce),
r (rotate),
m (mirror),
f (flip), ...
(see documentation for the common defaults for keys and commands). Starting with version 0.5, FIM has powerful features to browse through photo collections. Say you have a collection of digital photographs, e.g. thousands of JPEG files: $ ls DSC_0001.JPG DSC_0002.JPG ... sample.jpg You can maintain textual descriptions of them and have them displayed in FIM. To do so, first produce a text description file, say with: ls | sed 's/$/\t/g' > files.dsc, containing:
# This is a FIM images description file. # A line beginning with a pound (#) is treated as a comment. # Each line consists of the file name, a Tab character and a textual description of the given picture: DSC_0001.JPG A big dog. DSC_0002.JPG A statue. # ... sample.jpg Busto di Diana. Da Pompei, 1817, rinvenuto presso i portici occidentali del santuario di Apollo. Bronzo, II s.a.C. MANN, inv. 4895. # The file can be long as you wish. Then invoking e.g. fim --load-image-descriptions-file files.dsc sample.jpg ...
will additionally display each image description on screen, just like in the following screenshot:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
On the top of the screen you can see the
Busto di Diana. Da Pompei, 1817... image description from the files.dsc file.
But one can display more information about the image. In the status line (lower side) of the screenshot there is additional information, which can be customized via the _display_status_fmt
and
_info_fmt_str variables of your ~/.fimrc file.
The _info_fmt_str variable controls the information in the lower right corner, e.g.:
# This is a sample custom ~/.fimrc file. # A line beginning with a pound (#) is treated as a comment. # The other lines are treated as fim commands and need to end with a ; (semicolon). # _info_fmt_str is set to display current scale percentage, width, height, ... _info_fmt_str="%p%% %wx%h%L %i/%l%P img:%M cache:%C tot:%T %c"; # See man fimrc for a reference on the fim language commands. In the left side of the status line of the screenshot there is additional information: [1/15 sec.][f/4.0][ISO400].
These are respectively exposure time, aperture and ISO Speed rating. FIM extracts this information from the EXIF section of the JPEG file at load time. EXIF information usually pertains the camera, the shot and the digitized image, and can be camera and vendor specific. Each piece of such information is called EXIF tag and has a name. FIM does not know about all possible EXIF tag names, but it loads into variables associated to each loaded image each EXIF tag it encounters. In the above case, the status line displays the values of three variables corresponding to EXIF tags: i:EXIF_ExposureTime,
i:EXIF_FNumber,
i:EXIF_ISOSpeedRatings.
If you don't know in advance the names of the EXIF tags your camera produces, then load a photograph file, enter in console mode by typing :.
and print the list of variables loaded with the image:
echo i:*.
In the example above, the _display_status_fmt
has been customized as e.g.:
# This is a sample custom ~/.fimrc file. # A command can span multiple lines, and long strings can be composed by substrings joined by a dot (.). # The following info format string pertains the lower # left part of the status line. # Assuming these are set, it uses each of the values # in EXIF_ExposureTime, EXIF_FNumber, EXIF_ISOSpeedRatings. _display_status_fmt= "%?EXIF_ExposureTime?[%:EXIF_ExposureTime:]?". "%?EXIF_FNumber?[%:EXIF_FNumber:]?". "%?EXIF_ISOSpeedRatings?[ISO%:EXIF_ISOSpeedRatings:]?:%k"; # Above, the dot (.) has been used to break the declaration of a long string. # See man fimrc for a reference on the fim language commands. The mechanism of displaying per-image variables can be used also in the following way. Assuming an image has the i:city variable set to a certain value, this might be displayed in the status line by having e.g;:
_display_status_fmt="%?city?[%:city:]?";One can use this in conjunction with the following description file syntax: # This is files.dsc # Lines starting with '!fim:varname=varvalue' are not comments: they set variable varname to varvalue for the images following. #!fim:city=Rome DSC_0001.JPG A big dog. #!fim:city=Naples DSC_0002.JPG A statue. # ... sample.jpg Busto di Diana. Da Pompei, 1817, rinvenuto presso i portici occidentali del santuario di Apollo. Bronzo, II s.a.C. MANN, inv. 4895. #!fim:city= unknown.jpg Unknown city. This syntax will ensure that e.g. DSC_0001.JPG
will have
i:city="Rome"
while
DSC_0002.JPG,
sample.jpg
will have
i:city="Naples"
and
unknown.jpg
will have the value
i:city="" (unset).
This mechanism can be brought further with the new limit
command.
Given a long list of files, entering the
limit "city" "Naples"
command will temporarily restrict the browsable files list to the files having
i:city=="Naples".
This is useful when restricting the research in an archive down to a few pictures. Entering limit again will reset the list.
Even more can be achieved using the file marking mechanism. This mechanism allows to build up a list of file names to be printed out on the standard output when FIM terminates. Assume you want to browse your big pictures collection to select the ones you want to send to a friend. You can browse the pictures list and mark one by typing key Enter each time you think it is worth sending.
Once you have marked many of them you wish to re-check them. By entering limit "!" only the marked files will be displayed.
Then you can eventually unmark
(u)
some pictures, and when exiting, fim will print out to standard output only the ones effectively marked.
The examples above are just a small fraction of what you can do with FIM; see the documentation for more. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tutorial: How to display attached images in Mutt using FIM | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I assume you know how to use Mutt.
One can instruct Mutt to open attachments or multimedia files using specific programs. This is obviously possible also with FIM and images. All you have to do is to edit the ~/.mailcap file, which is used by Mutt when you open an attachment.
The following suffices for a minimal integration: image/*; fim %s You can also instruct FIM to use ASCII art if we are working over an SSH connection: image/*;( [ "$SSH_CLIENT" != "" ] && fim -o aa %s ) || ( fim %s )If you have configured FIM properly, this will work seamlessly in the Linux framebuffer, in X and through SSH. Finally, if you wish to use the fimgs wrapper script (installed automatically when you install fim) to convert transparently with different programs, and then display with FIM, you can do it like here:
image/*;( [ "$SSH_CLIENT" != "" ] && fim -o aa %s ) || ( fim %s ) # Use evince, and if not, fimgs: application/pdf;( [ "$DISPLAY" != "" ] && evince %s ) || fimgs %s # Use gv, and if not, fimgs: application/ps;( [ "$DISPLAY" != "" ] && gv %s ) || fimgs %s application/postscript;( [ "$DISPLAY" != "" ] && gv %s ) || fimgs %s # Use xdvi, and if not, fimgs: application/x-dvi;( [ "$DISPLAY" != "" ] && xdvi %s ) || fimgs %s # The following two examples are more funny than useful. # Display each bit as a pixel: application/octet-stream; fim --binary=1 %s # Display a text file rendered: application/vnd.openxmlformats-officedocument.wordprocessingml.document; docx2txt < %s | fim --as-text -i -q | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tutorial: VI/VIM-like feel in FIM | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
If you know the VI/VIM text editor shortcut based usage interface, then you know how to appreciate the comfort and speed of use it gives.
FIM offers a few features aimed at VI/VIM users, like:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
News: What's new with FIM | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(last update: 19/07/2017) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FIM NEWS -- history of (main) user-visible changes in FIM.
Version 0.5-rc3
* fix: mouse movement under SDL used to trigger unnecessary screen redraws.
* bugfix: on certain framebuffer configurations part of the screen would not be redrawn.
* bugfix: conversion from external program was vulnerable to failure due to missing check.
* fix: gif error handling could have led to NULL pointer usage.
* fix: the largest mipmap was not always being used.
* fix: -lfl linkage is not really necessary: removed it.
* fix: support for PPM files with 2 bytes per sample.
* fix: configure script regex_t check was unnecessarily broken
* fix: was likely using uninitialized data in Image()
* fix: a few more checks when reading PCX files
* documented the %k expando for _info_fmt_str and bugfix (avoiding data corruption when handling %k)
* to ease reproducible builds: imposing LC_ALL=C to $(YACC) and $(SORT), vim2html.pl reads SOURCE_DATE_EPOCH
* fix: when stdint.h is available use uint8_t, uint16_t, uint32_t instead of non-portable __u8, __u16, __u32
* fix: ./configure --disable-pcx was not properly disabling PCX format support
* fix: compilation was broken without framebuffer (FIM_WITH_NO_FRAMEBUFFER)
* fix: compilation was broken without FIM_WITH_LIBSDL configured in
* fix: with _re_search_opts='f' the in-descriptions search was broken
* fix: removed obsolete documentation for the "window" command, now disabled
* bugfix: repeating "recording 'repeat_last'" (default '.' key) by prepending a number now works
* fix: cleaned up the internal keysyms initialization code
* fix: lastly used image will be erased at last, after eventually prefetched images.
* fix: configure will try to detect curses/ncurses.
* fix: configure will use `sdl-config --static-lib`'.
* fix: a check was missing in the PS decoder when reading from stdin.
* bugfix: --offset option was ignoring lower bytes-offset.
* fix in _seek_magic and documentation.
* fix: in --offset mode, avoiding probing for external loader programs, handling of larger offsets.
* fix: 'recording' command non functioning properly.
* fix: configure would fail on --disable-aa and absent aalib.
Version 0.5-rc2
* configure will autodetect and turn aalib on by default
* fix: will emit more precise diagnostics on unsupported device string
* fix: adjusted man pages for roff cleanliness
* fix: typos fixed in the documentation
Version 0.5-rc1
* fix: enabled concurrent make, e.g.: make -j 4
* bug workaround: had no console scroll if no command executed on PostInteractiveCommand
* fix: some systems don't have sys_errlist: using strerror there
* fix: corrected the quiet mode (-q) to be quieter
* fix: no zlib.h build time dependency (this will be reintroduced in the future)
Version 0.5-rc0
* -R / --recursive switch to turn on recursive push of command line specified directories
* added --sort and --sort-basename to sort the images list
* introduced mipmap mechanism (_use_mipmaps) for faster display/scaling of images
* status bar customizable with _display_status_fmt and _info_fmt_str, which can be
controlled by the use of special image variable specifiers ('expandos'):
"%T" expando to get (and display) total memory used by the program
"%C" expando to get (and display) file/memory usage by image cache
"%M" expando to get (and display) memory used by the current (displayed) image
"%c" expando to get (and display) centering information
"%m" expando to get (and display) current image mipmap occupation information
"%k" expando to get (and display) current image i:_comment value
"%?PRE?VAR?POST?" expando to get (and display) "PRE".i:VAR."POST"
...
* search (and jump) on image descriptions via 'goto' and key '/'
* when repeating search with 'repeat_last', will use last direction
* '?' key is now assigned to backward search (goto '-//')
* default 'C-p' key is now assigned to repeat last backward search (goto '-//')
* image cache will remember alignment within viewport
* jump back and forth from the last viewed image with the ' (single quote aka apostrophe)
key and the _lastfileindex variable
* added --load-image-descriptions-file (equivalent to 'desc' 'load') to populate
the i:_comment values of each loaded image file and set _caption_over_image=2
(with it added also --image-descriptions-file-separator)
* added the 'desc "load"' command to load a textual files comments description file
* introduced a 'limit' command, with comment, file name, or marked file criteria
* the ' key is bound to toggle limit'ing to the marked files list
* introduced 'list "mark"' and 'list "unmark"' syntax styled as 'limit'
* load i:_comment and i:var from description file, with forms:
"filename comment" (to i:_comment),
"#!fim:var=value" (to set i:var=value on all all the files following)
"#!fim:var=" (to unset i:var=value on all all the files following)
"filename #!fim:=" (to i:_comment from the value read last)
"filename #!fim:+comment" (similar, but will append the new comment)
"filename #!fim:^comment" (similar, but will prepend the new comment)
"filename #!fim:s/f/t" (similar, but replace string f with string t)
* EXIF tags will be read with libexif and become i:EXIF_-prefixed variables
* if _want_exif_orientation is set, images will be reoriented according to EXIF
metadata (i:__exif_orientation, i:__exif_mirrored, i:__exif_flipped).
* the 'help' command will search also in fim command options
* will optionally use C++11 constructs with ./configure --enable-cxx11 (no user level impact)
* scaling image code faster (thanks to __restrict__ pointers)
* customizable SDL window caption line with _want_wm_caption_status
* BMP format support is now optional
* PCX format support (optional)
* changed meaning of variable _ignorecase: now it affects autocommands
* introduced variable _re_search_opts affecting regexp-based search
* default key 'r' is bound to 'rotate90', key 'R' to 'rotate270'
* can be invoked without stdin; e.g. from an X menu
* added "display 'resize'" to resize the SDL window, eventually to image size
* default SDL mode is windowed now
* by default, the 'C-w' key will resize the SDL window to the original image size
* by default, the 'W' key will resize the SDL window to the image size,
and added an --autowindow switch to adapt window size to picture size
* the 'help' command will search in help items if argument starts with /
* special variable i:* expanding to all the variable name/value pairs of the current image
* opening image files in archives (e.g. CBZ,CBR,RAR,TAR,fim-0.5-rc1.tar.gz,TBZ,7Z,ISO,...)
with libarchive (experimental)
* JPEG-2000 file support via JasPer (experimental)
* added a ':- INTEGER' syntax, so one can specify the file in the list counting from the end
* added an _archive_files variable to specify which file name types specify archives
* added a 'list "pushdirr"' command, working like "pushdir" but recursively
* the _fbfont variable will contain the current console font file string
* mirror/flip are now being applied with respect to the viewport borders
* stat() checking of files on load can be disabled with _push_checks
* added --no-stat-push to set _push_checks=0 before initialization
* added the _caption_over_image variable (which is 0 unless --load-image-descriptions-file)
* 'Pause' and 'Menu' keys are now available in SDL (-o sdl) mode
* added 'list' 'marked' to show the list of marked files
* key 'Del' bound to pop (delete) the current image from the list
* i:_file loader will store the used loader string
* switch --offset accepts a range now (using the new _open_offset_retry variable)
* if an image has been opened with an offset, i:_open_offset will be set accordingly
* variable i:pagecount is now replaced by i:pages
* put aside (disabled) the v: b: and w: namespaces until they make more sense
* panning on mouse movement in SDL mode
* make fim goal has been deleted
* changed librsb library detection: now it's e.g.:
LIBS="librsb-config --ldflags --extra_libs` " CXXFLAGS="`librsb-config --cflags ` \
./configure --enable-matrices-rendering
* bugfix: in some situations fim -o fb was not clearing the screen before drawing the image
* bugfix in the "list 'remove'" internals
* --binary=1/--binary=24 will not pad tiny renderings to _preferred_rendering_width pixels
Version 0.4
* changed --random semantics and introduced --random-no-seed switch
* customizable status bar file info string
* introduced --as-text to render printable bytes as text
* key r is bound to 'rotate90, key R to 'rotate270'
* bug fixes for the g: namespace, SDL/X mode, "list 'pop'" command,
the --offset option, 'ascale' and rotation, documentation.
Version 0.4-beta
* interface to the GraphicsMagic library (more graphics formats supported)
* introduced bitwise AND and OR operators
* support for rendering "matrix market" numerical matrix files (with librsb)
* X mode not anymore default in aalib, available at option
* libjpeg usage fixes
* libpng usage fixes (support for PNG_LIBPNG_VER>=10209)
* documentation improvements (e.g.: fim man page is auto-generated)
* "imlib2" X-based output device support
* "sdl" output device improvements (fullscreen/mouse/windowed options, I/O, ..)
* more default consolefont options (e.g.: hardcoded consolefonts support)
* configure option to disable the fim history file
* improvements to scale, goto, other commands
* improved directories reading
* introduced --no-commandline, --no-internal-config switches
* aggregated some commands for clarity
* output console can be disabled at configure time
* important fbdev bug fixes
* autocompletion of variable identifiers
Version 0.3
* minor strchr compilation problem on some systems
* better consolefonts support
* much better SDL support (different color modes)
* 'negate' feature
* -S, or 'sanity-check' switch
Version 0.3-beta-prerelease
* auto-generated documentation: more consistency
* grammar specification, in man fimrc
* internal commands,variables,autocommands reference man page, in man fimrc
* better internal help mechanisms
* more control (resolution change,windowed mode) in experimental sdl mode
* new commands (pread,reverse,shuffle,...)
* (temporarily) disabled internal windows splitting
* pushing files from a directory
* several minor and major bugfixes
Version 0.3-beta
* full support for AAlib (Ascii Art rendering) (-o aa)
* experimental support for SDLlib (Simple Directmedia Layer) (-o sdl) (X!)
* experimental PDF, PS, DJVU file support
* history file support (~/.fim_history)
* seamless caching and prefetching integration
* viewing of any type files as bitmaps (unset bits black, set bits white)
* viewing of any type files as pixmaps (as RGB triples)
* framebuffer driver now can be disabled at compile time
* colors inversion: saves a significant fraction of power when viewing documents
Version 0.3-alpha
* experimental support for AAlib (Ascii Art rendering) (-t)
* reading image files (-i) and scripts (-p) from stdin
* runs on the powerpc architecure
* rewritten from scratch the debug console, now buffered and with scrolling
* achieved speedup in magnifying pictures
* achieved speedup in displaying dithered images
* smarter quoting rules (looser quote checking) when "push"ing files
* dumping to file execution logs as executable scripts (-W/--write-scriptout)
* implemented regular expressions matching operator (=~)
* new default key bindings for split windows control
* could be compiled with no readline library (--disable-readline)
Version 0.2
* internal windowing (with splitting, resizing, swapping) support
* .xcf, .fig, .dia, .svg files now viewable via wrapper calls
* introduced interactive command iteration ( in the [n]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Screenshots | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A screenshot of a regular (framebuffer) FIM run (SDL would look the same) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A screenshot of an ASCII Art FIM run: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Both screenshots taken with the
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Links to documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you wish to get an idea of FIM in action see these tutorials first.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Download and build instructions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You are welcome to download the latest (prerelease, dated 19/07/2017) version of FIM:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
man fim | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fimNAMESYNOPSIS DESCRIPTION USAGE OPTIONS PROGRAM RETURN STATUS COMMON KEYS AND COMMANDS AFFECTING ENVIRONMENT VARIABLES COMMON PROBLEMS INVOCATION EXAMPLES NOTES BUGS FILES SEE ALSO AUTHOR COPYRIGHT NAMEfim - fbi (linux framebuffer imageviewer) improved SYNOPSISfim
[{options}] [--] {imagefile} [{imagefiles}] DESCRIPTIONfim is a ’swiss army knife’ for displaying image files. It is capable of displaying image files using different graphical devices while offering a uniform look and feel; it features an internal command language specialized to the image viewing purposes; it is capable of interacting with standard input and output; the internal command language is accessible via a command line capable of autocompletion and history; it features command recording, supports initialization files, customizable key bindings, internal variables and command aliases, vim-like autocommands, JPEG comments, EXIF tags display, EXIF rotation/orientation, and much more. As a default, fim displays the specified file(s) on the detected graphical device (e.g. with SDL if X is detected, or the linux framebuffer device if not). JPEG,PNG,GIF,BMP,TIFF,PPM,PGM,PBM,PCX formats are supported. For ’XCF’ (Gimp’s) images, fim will try to use ’xcftopnm’. For ’.FIG’ vectorial images, fim will try to use ’fig2dev’. For ’.DIA’ vectorial images, fim will try to use ’dia’. For ’.SVG’ vectorial images, fim will try to use ’inkscape’. For other formats fim will try to use ImageMagick’s ’convert’ executable. If {imagefile} is a directory, therein contained files of supported formats will be loaded. If {imagefile} contains a trailing slash (/), it will be treated as a directory; otherwise a check will be made using stat(2). To change this default, see description of the _pushdir_re variable and the --no-stat-push and --recursive options. If configured at build time, fim will be capable of using SDL or aalib output. This man page only describes the fim command line options. See man fimrc(5) for a full specification of the fim language, commands, variables, and an example configuration file. USAGEYou may invoke fim from an interactive shell and control it with the keyboard, as you would do with any image viewer with reasonable key bindings. fim is keyboard oriented: there are no user menus or buttons available. If you need some feature or setting which is not accessible from the default keyboard configuration, you probably need a custom configuration or simply need to type a custom command. For these, you can use the internal command and configuration language. The full specification for these is accessible at runtime using the internal help system (typing :help). OPTIONSAccepted command line {options} :
-a, --autozoom Enable autozoom. fim will automagically pick a reasonable zoom factor when loading a new image (as in fbi). -b, --binary[=24|1] Display (any filetype) binary files contents as they were raw 24 or 1 bits per pixel pixelmaps. Will arrange the image by rows long as specified by the _preferred_rendering_width variable for the image width (unless a narrower image suffices). Regard this as an easter bunny option. --as-text Display (any filetype) files contents as they were text. Will only show printable characters. Regard this as an easter bunny option. --cd-and-readdir Step into the first loaded file directory and push other files. -c {commands}, --execute-commands {commands} The commands string will be executed before entering the interactive loop. Please note that if your commands are more complicated than a simple ’next’ or ’pornview’ command, they must be quoted and escaped in a manner suitable for your shell! For example, -c ’*2;2pan_up;display;while(1){bottom_align;sleep "1" ; top_align}’ (with the single quotes) will tell fim to first double the displayed image size, then pan two times up, then display the image ; and then do an endless loop consisting of bottom and top aligning, alternated. -C {commands}, --execute-commands-early {commands} Just as the --execute-commands option, but commands will be executed before the loading of any config file. For example, -C ’_scale_style=" "’ will make fim start with no auto-scaling. -d {framebuffer device}, --device {framebuffer device} Framebuffer device to use. Default is the one your vc is mapped to (as in fbi). --dump-reference-help[=man]. Will dump to stdout the language reference help. -D, --dump-default-fimrc The default configuration (the one hardcoded in the fim executable) is dumped on standard output and fim exits. -E {scriptfile}, --execute-script {scriptfile} The scriptfile will be executed right after the default initialization file is executed. -f {fimrc}, --etc-fimrc {fimrc} Specify an alternative system wide initialization file (default: /usr/local/etc/fimrc), which will be executed prior to any other configuration file. -F {commands}, --final-commands {commands} The commands string will be executed after exiting the interactive loop of the program (right before terminating the program). -h, --help[=s|d|l|m] Print (short, descriptive, long, or complete man) program invocation help, and terminate. --load-image-descriptions-file {filename} Load image descriptions from {filename}. In {filename} each line is the name of an image file (its basename will be taken), then a Tab character (unless --image-descriptions-file-separator specifies otherwise), then the description text. Each description will be put in the _comment variable of the image at load time. Will override the comment eventually loaded from the file (e.g. JPEG, PNG or TIFF comment). Special comment lines like "#!fim:var=val" will lead i:var to be assigned value val (unquoted) at image loading time. Special description lines begin with markers: with "#!fim:=" the last description line to be used; with "#!fim:+" what follows + will be appended to the last description line; with "#!fim:^" what follows ^ will be prepended to the last description line; with "#!fim:s/f/t" the last description line will be used, but occurrences of string f will be substituted with string t (f and t can contain anything but not a /). If val is empty that variable will be unset. These variables are stored also in an internal index used by the limit command. This option sets _caption_over_image=2, so that a caption will be displayed over the image. --image-descriptions-file-separator {sepchar} A character to be used as a separator between the filename and the description part of lines specified just before a --load-image-descriptions-file. -i, --image-from-stdin Will read one single image from the standard input (the image data, not the filename). May not work with all supported file formats. In the image list, this image will be displayed as "<STDIN>". -m {vmode}, --mode {vmode} Name of the video mode to use video mode (must be listed in /etc/fb.modes). Default is not to change the video mode. In the past, the XF86 config file (/etc/X11/XF86Config) used to contain Modeline information, which could be fed to the modeline2fb perl script (distributed with fbset). On many modern xorg based systems, there is no direct way to obtain a fb.modes file from the xorg.conf file. So instead one could obtain useful fb.modes info by using the (fbmodes (no man page AFAIK)) tool, written by bisqwit. An unsupported mode should make fim exit with failure. But it is possible the kernel could trick fim and set a supported mode automatically, thus ignoring the user set mode. -N, --no-rc-file No personal initialization file will be read (default is ~/.fimrc) at startup. --no-etc-rc-file No system wide initialization file will be read (default is /usr/local/etc/fimrc) at startup. --no-internal-config No internal default configuration at startup (uses internal variable _no_default_configuration). Will only provide a minimal working configuration. --no-commandline With internal command line mode disabled. --no-history-save Do not save execution history at finalization (uses internal variable _save_fim_history). --no-history-load Do not load execution history at startup. --no-history Do not load or save execution history at startup. -p, --script-from-stdin Will read commands from stdin prior to entering in interactive mode. -o [fb|sdl|aa|dumb|imlib2], --output-device [fb|sdl|aa|dumb|imlib2] Will use the specified device as fim video output device, overriding automatic checks.The available devices depend on the original configuration/compilation options, so you should get the list of available output devices issuing fim --version. The aa option may be specified as aa={[’w’]} ; the ’w’ character allows windowed mode in case of aalib running under X (otherwise, the DISPLAY environment variable will be unset for the current instance of fim). The sdl option may be specified as sdl={[’w’][’m’][’r’][’W’][’M’][’R’]width:height} , where width is and height are integer numbers specifying the desired resolution; the ’w’ character requests windowed mode; the ’m’ character requests mouse pointer display; the ’r’ character requests support for window resize; the same letters uppercase request explicit negation of the mentioned features. --offset {bytes-offset[[:upper-offset]|+offset-range]} Will use the specified offset (in bytes) for opening the specified files. If upper-offset is specified, further bytes will be probed, until upper-offset. If +offset-range is specified, so many further bytes will be probed. This is useful for viewing images on damaged file systems; however, since the internal variables representation is sizeof(int) bytes based, you have a limited offset range. -P, --text-reading Enable textreading mode. This has the effect that fim will display images scaled to the width of the screen, and aligned to the top. Useful if the images you are watching text pages, all you have to do to get the next piece of text is to press space (in the default key configuration, of course). -s {value}, --scroll {value} Set scroll steps for internal variable _steps (default is 20%). --slideshow {number} Interruptible slideshow mode; will wait for {number} of seconds (assigned to the _want_sleep_seconds variable after each loading; implemented by executing while(_fileindex<_filelistlen){sleep _want_sleep_seconds; next;} as a first command. -S, --sanity-check A quick sanity check before starting the interactive fim execution, but after the initialization. -t, --no-framebuffer Fim will not use the framebuffer but the aalib (ASCII art) driver instead (if you are curious, see (info aalib)). If aalib was not enabled at tompile time, fim will work without displaying images at all. -T {terminal}, --vt {terminal} The terminal will be used as virtual terminal device file (as in fbi). See (chvt (1)), (openvt (1)) for more info about this. Use (con2fb (1)) to map a terminal to a framebuffer device.
--sort-basename Sort files list before browsing according to file basename’s. -u, --random Randomly shuffle the files list before browsing (seed depending on time() function). --random-no-seed Randomly shuffle the files list before browsing (no seeding). -v, --verbose Be verbose: show status bar. -V, --version Display program version, compile flags, enabled features, linked libraries information, supported filetypes/file loaders, and then terminate. -w, --autowidth Scale the image according to the screen width. --no-auto-scale Do not scale the images after loading (will set ’_scale_style=" "’;). --autowindow Will resize the window size (if supported) to the image size. Don’t use this with other image scaling options. --no-stat-push Sets _push_checks=0 before initialization, thus disabling file/dir existence checks with stat(2) at push push time (and speeding up startup). -H, --autoheight Scale the image according to the screen height. -W {scriptfile}, --write-scriptout {scriptfile} All the characters that you type are recorded in the file {scriptout}, until you exit Fim. This is useful if you want to create a script file to be used with "fim -c" or ":exec" (analogous to Vim’s -s and ":source!"). If the {scriptout} file exists, it will be not touched (as in Vim’s -w). -, --read-from-stdin Read file list from stdin: each line one file. Note that these the three standard input reading functionalities (-i,-p and -) conflict : if two or more of them occur in fim invocation, fim will exit with an error and warn about the ambiguity. See the section INVOCATION EXAMPLES below to read some useful (and unique) ways of employing fim. --read-from-stdin-elds <arg> Specify an endline delimiter string for breaking lines read via -/--read-from-stdin. Line text before the delimiter will be treated as names of files to load; the text after will be ignored until a newline. This is useful e.g. to description files as filename list files. -A, --autotop Align images to the top (UNFINISHED). -q, --quiet Quiet mode. Sets _display_status=0;_display_busy=0;. -r {resolution}, --resolution {resolution} Set resolution (UNFINISHED). -R, --recursive Push files/directories to the files list recursively. PROGRAM RETURN STATUSThe program
return status is 0 on correct operation; 252 on unsupported
device specification; 248 on bad input; 255 on a generic
error; 42 on a signal-triggered program exit; or a
different value in case of an another error. COMMON KEYS AND COMMANDSThe following keys and commands are hardcoded in the minimal configuration. These are working by default before any config loading, and before the hardcoded config loading (see variable _fim_default_config_file_contents). n goto
’+1f’ : enter command
line mode
:*{factor} scale the image by
{factor}
You can
visualize all of the default bindings invoking fim
--dump-default-fimrc | grep bind .
The Return vs. Space key thing can be used to create a file list while reviewing the images and use the list for batch processing later on. All of the key bindings are reconfigurable; see the default fimrc file for examples on this, or read the complete manual: the FIM.TXT file distributed with fim. AFFECTING ENVIRONMENT VARIABLES
If using a gzipped font, the
zcat program will be used to uncompress it (via
execvp(3)). /usr/share/consolefonts/Uni3-TerminusBoldVGA14.psf.gz
If the special fim:// string is specified, a hardcoded font will be used.
If unset, fim will probe for /dev/fb0.
COMMON PROBLEMSfim needs read-write access to the framebuffer devices (/dev/fbN or /dev/fb/N), i.e you (our your admin) have to make sure fim can open the devices in rw mode. The IMHO most elegant way is to use pam_console (see /etc/security/console.perms) to chown the devices to the user logged in on the console. Another way is to create some group, chown the special files to that group and put the users which are allowed to use the framebuffer device into the group. You can also make the special files world writable, but be aware of the security implications this has. On a private box it might be fine to handle it this way through. If using udev,
you can edit :
/etc/udev/permissions.d/50-udev.permissions and set
these lines like here : fim also needs access to the linux console (i.e. /dev/ttyN) for sane console switch handling. That is obviously no problem for console logins, but any kind of a pseudo tty (xterm, ssh, screen, ...) will not work. INVOCATION EXAMPLESfim
media/ fim -R
media/ --sort find
/mnt/media/ -name *.jpg | fim - find
/mnt/media/ -name *.jpg | shuf | fim - cat
script.fim | fim -p images/* scanimage
... | tee scan.ppm | fim -i fim * >
selection.txt fim * | fim
- fim
-c ’pread "vgrabbj -d /dev/video0
-o png";reload’ fim
-o aa -c ’pread "vgrabbj -d
/dev/video0 -o png";reload;system
"fbgrab" "asciime.png"’ fim
-c ’while(1){pread "vgrabbj -d
/dev/video0 -o png";reload;sleep 1;};’ NOTESThis manual page is neither accurate nor complete. In particular, issues related to driver selection shall be described more accurately. Also the accurate sequence of autocommands execution, variables application is critical to understanding fim, and should be documented. The filename "<STDIN>" is reserved for images read from standard input (view this as a limitation), and thus handling files with such name may incur in limitations. The SDL driver is quite inefficient, for a variety of reasons. In particular, its interaction with the readline library can be problematic (e.g.: when running in sdl mode without a terminal). This shall be fixed. BUGSfim has bugs. Please read the BUGS file shipped in the documentation directory to discover the known ones. FILES/usr/local/share/doc/fim The directory with Fim documentation files. /usr/local/etc/fimrc The system wide Fim initialization file (executed at startup, after executing the hardcoded configuration).
SEE ALSOOther
Fim man pages: fimgs(1), fimrc(1). AUTHORMichele Martone <dezperado _CUT_ autistici _CUT_ org> is the author of fim, "fbi improved". COPYRIGHTCopyright (C)
2007-2017 Michele Martone <dezperado _CUT_
autistici _CUT_ org> (author of fim) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
man fimrc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fimrcNAMESYNOPSIS DESCRIPTION FIM LANGUAGE GRAMMAR COMMANDS REFERENCE AUTOCOMMANDS REFERENCE VARIABLES REFERENCE COMMAND LINE USAGE EXAMPLES CONFIGURATION FILE EXAMPLES NOTES BUGS SEE ALSO AUTHOR COPYRIGHT NAMEfimrc - fim configuration file and language reference SYNOPSIS~/.fimrc
DESCRIPTIONThis page explains the fim language, which is used for the fimrc configuration files, {scriptfile}s, or {commands} passed via command line {options}. This language can be used to issue commands (or programs) from the internal program command line accessed interactively through the ":" key (or rather, the key code specified by the "_console_key" variable). One may exit from command line mode by pressing the Enter key on an empty line (a non empty command line would be submitted for execution), or the Esc key (only in SDL mode). The general form of a fim command/program is shown in the next section. FIM LANGUAGE GRAMMARThis section specifies the grammar of the fim language. Language elements surrounded by a single quote ("’") are literals. Warning: at the present state, this grammar has conflicts. A future release shall fix them. program: %empty
statement_list:
statement non_atomic_statements_block:
’{’ statement_list ’}’ statements_block:
atomic_statements_block conditional_statement:
if_statement if_statement:
’if’ ’(’ expression ’)’
statements_block loop_statement:
’while’ ’(’ expression
’)’ statements_block atomic_statements_block:
statement ’;’ statement:
’!’ arguments arguments:
expression expression:
’(’ expression ’)’ A STRING can be either a single quoted string or a double quoted string. A FLOAT is a floating point number. A QUOTED_FLOAT is a floating point number, either single ("’") or double (""") quoted. An INTEGER shall be an unsigned integer number. An IDENTIFIER shall be one of the valid fim commands (see COMMANDS REFERENCE ) or a valid alias. A VARIABLE shall be an already declared or undeclared variable identifier (see VARIABLES REFERENCE ) or a valid alias, created using the alias command. The "=~" operator treats the right expression as a STRING, and uses is as a regular expression for matching purposes. The SLASH_AND_REGEXP is a slash ("/") followed by a STRING, interpreted as a regular expression. See regex(1) for regular expression syntax. The way some one-line statements are evaluated: : enter command
line mode
:*{factor} scale the image by
{factor}
COMMANDS REFERENCEalias
align
autocmd
autocmd_del
basename
bind
cd clear
commands
desaturate
desc
display
dump_key_codes
echo
else
eval
exec
getenv
goto
help
if info
limit
list
load
negate
pan popen
pread
prefetch
pwd quit
recording
redisplay
reload
rotate
scale
scrolldown
scrollforward
set set_commandline_mode
set_interactive_mode
sleep
status
stdout
system
variables
unalias
unbind
while
window
AUTOCOMMANDS REFERENCEAvailable autocommands are: PostScale, PreScale, PrePan, PostPan, PreRedisplay, PostRedisplay, PreDisplay, PostDisplay, PrePrefetch, PostPrefetch, PostReload, PreReload, PostLoad, PreLoad, PostGoto, PreGoto, PreConfigLoading, PostConfigLoading, PreHardcodedConfigLoading, PostHardcodedConfigLoading, PreUserConfigLoading, PostUserConfigLoading, PreGlobalConfigLoading, PostGlobalConfigLoading, PreInteractiveCommand, PostInteractiveCommand, PreExecutionCycle, PreExecutionCycleArgs, PostExecutionCycle, PreWindow, PostWindow, and they are triggered on actions as indicated by their name. VARIABLES REFERENCEIf undeclared, a variable will evaluate to 0. There namespaces in which variables may exist are: current image, global. A namespace is specified by a prefix, which is one of: ’i:’, which shall be prepended to the variable name. The global namespace is equivalent to the empty one:’’. The special variable i:* expands to the collation of all the name-value pairs for the current image. In the following, the [internal] variables are the ones referenced in the source code (not including the hardcoded configuration, which may be inspected and/or invalidated by the user at runtime). _TERM
[out,g:] the environment TERM variable COMMAND LINE USAGE EXAMPLES# jump to the
third image: CONFIGURATION FILE EXAMPLESThis is the default configuration, as contained in the _fim_default_config_file_contents variable. #
$LastChangedDate: 2016-01-17 22:14:48 +0100
(Sun, 17 Jan 2016) $ autocmd
"PostReload" "" "i:fresh=1" ;
alias
"next10"
"i=0;while(i<10){i=i+1;next;display;sleep
’1’;};" "goes forward 10 images";
# window
related aliases and commands alias
’cache’ ’echo _cache_status;’
"displays cached images status"; NOTESThis manual page is incomplete: a number of topics, as type conversions, or operator precedence, or exact command usage is left unspecified. The conditions for autocommands triggering are not specified as they should. A formal description of the various one-line commands, as well a more extensive example list is needed. Many of the listed variables are only valid within a namespace, and this shall be documented clearly. BUGSThe fim language has a number of problems that shall be first documented, then fixed. SEE ALSOfim(1), fimgs(1), regex(1). AUTHORMichele Martone <dezperado _CUT_ autistici _CUT_ org> COPYRIGHTSee copyright notice in fim(1). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
man fimgs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fimgsNAMESYNOPSIS DESCRIPTION OPTIONS SEE ALSO AUTHOR NAMEfimgs - poor man’s [http://]PostScript/pdf/dvi/cbr/rar/cbz/zip viewer for the linux framebuffer console SYNOPSISfimgs [ {fimgs-options} ] file [-- [{fim-options}]] DESCRIPTIONfimgs is a simple wrapper script which takes a PostScript or pdf or .cbr or .rar or .cbz or .zip or .dvi or any of the above prefixed with http:// or https:// or ssh:// as input, renders the pages using ghostscript into a temporary directory and finally calls fim to display them. In case of compressed archives (in zip or rar formats), the images are decompressed into a directory and displayed using fim. In this latter case, only images contained in the archive will be displayed (no nested archives or pdf’s or ps’s or dvi’s). The temporary directory name is taken from the $TMPDIR environment variable. OPTIONSTo pass through options to fim, you may specify them after "--". -r {resolution} Specify resolution for the ’gs’ -r option (e.g.: 96x96; default 120x120).
-p {password} Specify password for the ’gs’ -p (password) option.
SEE ALSOfim(1), fimrc(1), gs(1), fbi(1), fbgs(1), bash(1) AUTHORMichele Martone <dezperado _ GUESS _ autistici.org>. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright and Thanks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FIM is copyright (C) 2007-2015 Michele Martone
and derives from the Fbi image viewer by Gerd Hoffmann.
See the README.TXT file for more licensing info.
|
Thanks go to (in temporal order, newer to older): Mohammed Isam, for having provided PCX reading support Matthieu Crapet, for enabling out-of-tree builds Marco Barbàra, for testing and critiques Vitaly Minko, for testing and debugging on ARM Damiano Biagioli, for early testing Marta Carbone, for early testing and debugging |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
License | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FIM is free software, licensed under the terms of the GNU Public License version 2 (GPLv2) or later.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bugs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There are notes about documented bugs in the
BUGS.html
(BUGS) file.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sections: top tutorials news screenshots documentation download man fim man fimrc man fimgs copyright license bugs |