Debian Codegraph @

doc/FIM.TXT

raw
1 ------------------------------------------------------------------------------
2 *FIM.TXT* Tutorial & Miscellaneous documentation for Fim
3 last updated $Date: 2024-05-10 00:24:27 +0200 (Fri, 10 May 2024) $
4
5 Fim - tutorial & misc documentation
6
7 First of all, please view this text file in Vim with ':set syntax=help'.
8 If you already know Vim, you will know that in this way you can use this
9 documentation as it was a hypertext.
10 ( or add "autocmd BufReadPost FIM.TXT set syntax=help" into your ~/.vimrc ! )
11 If you do not know Vim, you can find it at http://www.vim.org.
12 A hypertextual version of this file (FIM.html) shall be also available
13 with your fim distribution.
14
15 Thank you for using this software; one can regard it as a 'hack',in
16 the sense it is an elaboration of the passionate work of multiple people.
17 >
18 Please note that this documentation is *not* complete, as Fim is still
19 evolving, and some changes as the exact language specifications are hard to
20 track and document. They will be when a high level of satisfaction of the
21 fim capabilities, usability and overall stability will be achieved.
22 Meanwhile, this file documents Fim commands and functionalities, and gives
23 lots of examples.
24 For a reference of Fim command line flags, see the man pages of Fim:
25 >
26 man fim
27
28 For a reference of Fim internal commands, see
29 >
30 man fimrc
31
32 For the documentation of the 'fimgs' script, see
33 >
34 man fimgs
35
36 The man pages are rich with examples.
37
38
39
40 IMPORTANT NOTE:
41
42 This document will be eliminated/reconverted once all the relevant
43 information will be made available in the man pages, so it may be
44 outdated/obsolete.
45
46 The man pages are the authoritative documentation sources for fim.
47
48 Enjoy!
49
50 ------------------------------------------------------------------------------
51 0. Introduction *intro*
52
53 Fim Startup: to open an image, n framebuffer mode, place yourself in a
54 Linux framebuffer console (that is, outside the X environment -- this
55 is usually achieved by typing CTRL-ALT-F1 from within the X environment)
56 and type:
57 >
58 fim image.png
59
60 You can be sure of being in a Linux framebuffer console by issuing.
61 >
62 cat /dev/urandom > /dev/fb0
63 If randomly coloured pixels start appearing on the screen, it means that
64 you are in a framebuffer console and you have proper access rights to it.
65
66 If you have problems here, see the *framebuffer* section.
67
68
69 Fim Quickstart: to move the image around,
70 use the cursor keys, or "h" to go left, h l
71 "j" to go down, "k" to go up, "l" to go right. j
72 Get out of Fim: Use ":q<Enter>" (press ':', then 'q', then 'enter').
73 Or just press q (or Esc, or whatever you wish, thanks to
74 the *key-bindings* capabilities.
75
76
77 Fim stands for Fbi IMproved.
78
79 Fbi is a |framebuffer| based image viewer by Gerd Hoffmann, and Fim is
80 primarily an interface rework applied roughly as a patch to it, and is an
81 idea and codework of Michele Martone.
82
83 The idea of making Fim came after long usage sessions of Vim and Fbi, and a
84 zest of science fiction inspiration.
85
86 The main purposes of Fim are to power up the features present in Fbi by adding
87 new ones, and achieve higher configurability and flexibility.
88
89 Ease of use and simplicity is a primary concern, too.
90 No programming language knowledge nor reading this manual is needed to use
91 FIM if you have already used Fbi once.
92
93 A basic tenet of configurability the freedom of managing and customize the
94 *key-bindings* to one's tastes.
95 Fim has a mechanism for the creation of a |configuration| file.
96 But Fim tries to go beyond this and propose - in a Vim-ish way - an approach
97 towards complete reconfigurability, and even scriptability of the program.
98 The inspiration for this comes from the use of the nicer software available
99 as free software, often characterized by extreme flexibility, configurability,
100 hackability. This concerns mainly text editors and mail user agents, but why
101 can't this apply to an image viewer, too ?
102
103 ==============================================================================
104 1. Index *index*
105
106 Introduction to Fim *ref* *reference*
107
108 0. Introduction |intro|
109 1. Index |index|
110 2. Fim on the Internet |internet|
111 2.1. Contact information |contact|
112 2.2. Help wanted |help-wanted|
113 3. Installation, basic usage |basics|
114 3.1. Customization |customization|
115 3.2. Keyboard binding |keyboard|
116 3.3. The fimgs script |fimgs|
117 3.4. External scripting |scripting|
118 3.5. System integration tips |tips|
119 4. Command Line Mode |cli|
120 5. Command Line Mode Basics |cli-basics|
121 6. Commands Reference |commands-reference|
122 6.1. Loading and browsing |commands-browsing|
123 6.2. Scaling, flipping, rotating|commands-scaling|
124 6.3. Panning,moving |commands-scroll|
125 6.4. Recording |commands-recording|
126 6.5. Console related commands |commands-console|
127 6.6. System Interaction |commands-system|
128 6.7. Variables |variables|
129 6.8. Autocommands |commands-autocommands|
130 7. Command Line,More |cli-more|
131 7.1. Default configuration |default-config|
132 8. Pattern Matching |pattern-matching|
133 9. Dangers |dangers|
134 10. Technicalia |technicalia|
135 10.1. Syntax Reference |syntax-ref|
136 10.2. Framebuffer mini how to |framebuffer|
137 11. Credits |credits|
138 12. FAQs |faq|
139 13. License |license|
140
141 ==============================================================================
142 2. Fim on the Internet *internet*
143
144 The official Fim page is hosted by the nonGNU project:
145 http://savannah.nongnu.org/projects/fbi-improved/
146
147 The secondary Fim page is:
148 http://www.autistici.org/dezperado/fim/
149
150 Tarball releases are located on
151 http://download.savannah.nongnu.org/releases/fbi-improved/
152
153 The official SVN (subversion) repository is:
154 http://svn.savannah.nongnu.org/svn/fbi-improved/
155
156 The official and secondary web sites contain all the relevant Fim
157 documentation, and the downloadable Fim archives.
158
159 The current SVN repository is kindly hosted by the Savannah
160 project: https://savannah.nongnu.org/projects/fbi-improved
161 You can support Fim by supporting the Savannah project.
162
163 The old SVN repository has been hosted by the Autistici/Inventati
164 past 'code' project for several years.
165 You can support Fim supporting the A/I project as well.
166
167 You could be able to browse the Fim code on the repository, pointing your
168 browser on:
169 http://svn.savannah.nongnu.org/svn/fbi-improved/trunk/
170
171 and get the latest source code tree on:
172 svn export http://svn.savannah.nongnu.org/svn/fbi-improved/trunk/
173
174 This documentation is distributed with the software.
175 See the INSTALL file for installation instructions and issues.
176
177 Although an official bug tracker exists:
178 http://savannah.nongnu.org/bugs/?group=fbi-improved
179 you are rather encouraged to report bugs and/or compilation
180 problems via email to the author directly.
181
182 But before posting anything, read the BUGS file, the |bugs| section,
183 and have a look and subscribe to the Fim development mailing list:
184
185 http://lists.nongnu.org/mailman/listinfo/fbi-improved-devel
186
187 ==============================================================================
188 2.1. Contact information *contact*
189
190 If you want to contribute to the project, it would be appreciated to receive
191 by email a complete report:
192
193 ( make ; make report ) 2>&1 | gzip > fim.`date +%Y%m%d%H%M`.log.gz
194 and please send me the file config.log, generated by running ./configure
195
196 You can report this to dezperado _FOobAr_ autistici _Baz_ org, by replacing
197 _FOobAr_ with a '@' and _Baz_ with a '.'.
198
199 Indications about how to improve this documentation are appreciated, too.
200
201 Ideas on the FIM language and potential use are welcome, too.
202 The current bunch of ideas and inspiration is put in the TODO file.
203 The best place for this discussions is the mailing list, as pointed above.
204
205 p.s.: please read the BUGS file to consult the current bug list, when
206 submitting a bug.
207
208 ==============================================================================
209 2.2. Help appreciated *help-wanted*
210
211 If you like Fim, you are welcome to do contribute with your help.
212
213 If you have trouble installing Fim, and you think it is Fim's fault, please
214 |contact| Fim's author with an email (see Contact Information, above ) and
215 describe carefully the encountered problem.
216
217 If you want to help actively, you are not required to be a programmer; please
218 read on!
219
220 There are the major (P)roblem areas and the possible (C)ontributions:
221
222 P: Keyboard input: panning is somewhat 'slow' or choppy sometimes.
223
224 C: Yes, the input system may be improved.
225 Be sure you have the right video mode and video driver loaded in the kernel.
226 You are welcome to suggest improvements.
227
228 P: Current Fim language and features issues.
229
230 C: If you think the current Fim language is not completely clear or has flaws,
231 you can suggest useful Flex/Bison tips to me.
232 You could suggest Flex/Bison tips also for solving the current language
233 reduce conflicts.
234
235 P: The documentation may be not informative enough.
236
237 C: Describe your personal experience with Fim, providing the pluses
238 and minuses in it, the way you use it, and the ways you would like to.
239 If you have interest in it, your help will contribute to inspire improvements.
240
241 P: Fim sucks: it lacks of feature XXX
242
243 C: You are welcome to send me (|contact|) suggestions about the features you
244 would desire Fim to have.
245
246 ==============================================================================
247 3. Installation, basic usage *basics*
248
249 The installation instructions (a 'make;make install' invocation should suffice)
250 are stated in the INSTALL file, contained in the source archive.
251
252
253 The basic usage of Fim consists of calling it from the Linux console, in a
254 non-X environment, assuming the framebuffer enabled ( if you do not know if
255 your framebuffer is enabled at all, please see the *framebuffer* section ).
256
257 So, if you have picture.jpg and picture.png in the current directory, issuing
258
259 $ fim picture.jpg picture.png
260
261 should start Fim and display the two specified images.
262
263 Like in Fbi or any other reasonable image viewer, you could be able to view
264 the next or previous image by pressing PageUp or PageDown, or to pan the image
265 around using the arrows.
266 Quitting is triggered by pressing 'q' or <C-c> (holding the control key and
267 then pressing 'c' ).
268
269 In this very basic way, you use the portion of Fim that mimics Fbi.
270
271 You could benefit of Fim features by familiarizing to its command line mode,
272 and reading this carefully written documentation.
273
274 ==============================================================================
275 3.1. Customization *customization*
276
277 To configure fim, and/or to modify its default behaviour, you could create
278 a .fimrc file in your home directory:
279
280 $ touch ~/.fimrc
281
282 and then edit the file and filling it only with lines you could write live
283 in the fim console or feed to Fim via the -c (pre-execution command) or -F (
284 final command) switches (see man fim).
285
286 If the ~/.fimrc does not exist, the /etc/fimrc file will be sourced, if
287 existent.
288
289 These and other functionality can be activated / deactivated at build time.
290 By executing
291 >
292 fim -V
293
294 you get an output message informative about the compilation details.
295
296 Even if compiled with scripting support, a default configuration has probably
297 built in the program, and all of the interpreting mechanisms are there.
298 Be sure of reading all of the details before asking the author or mailing list.
299
300 ===============================================================================
301 3.2. Keyboard Bindings *keyboard*
302
303 You can assign an arbitrary keyboard key or keys sequence an arbitrary Fim
304 command. See the next two examples:
305 >
306 :bind 'n' "next";
307 :bind 'C-n' "prev";
308
309 The first command tells Fim that now on, when in interactive mode, pressing 'n'
310 will be equivalent of issuing 'next' in the command line console.
311
312 Likewise, the 'C-n' notation stays for <C-n>, or <Ctrl-n>, or CTRL-n: the
313 act of pressing together the Control and the 'n' keys.
314 The second example assigns 'prev' like an action to be executed when the user
315 will press the Control and the 'n' keys together in interactive mode.
316
317 Note that these commands work inside Fim, and can be written inside the ~/.fimrc
318 configuration file (without the heading ':', though! ).
319
320 When you'll see more commands you'll have a broader range of custom keyboard
321 bindings as your configurability potential.
322 If you are curious, jump to the |commands-reference| section right now.
323 Or simply type |commands| in Fim.
324
325 Interactive mode offers a way of specifying that an interactive command should
326 be executed more than one time.
327
328 So, typing
329 >
330 10n
331
332 in interactive mode will tell Fim to execute ten times the action bound by the
333 'n' key, that is, executing 10 times 'next', like typing ':10next'.
334
335 So, the general form of this feature is:
336 >
337 [n]<command key>
338
339 Using the dot key:
340 >
341 .
342
343 will repeat the last command. If the previous command was executed multiple times
344 in interactive mode by prepending with a number, it will be repeated the same
345 number of times.
346 If the '_max_iterated_commands' variable is set, the bound action will be repeated
347 no more than '_max_iterated_commands' times.
348
349 ===============================================================================
350 3.3. The fimgs script *fimgs*
351
352 Fim wants to be flexible enough to let you use it directly or through some script.
353 It comes out of the box with one wrapper script, called fimgs (or fimgs.sh)
354 which is capable of converting some file formats in other ones, which fim
355 understands.
356
357 The fimgs script is capable of fetching a file from the web for you, displaying
358 it in the framebuffer using fim, and deleting it from the temporary directory
359 where it has been stored.
360
361 Additionally, the fetched (or local) file could be among the ones directly
362 supported, or one of the following:
363
364 - an Adobe Postscript (.ps, .eps) document
365 - an Adobe Portable Document Format (.pdf) document
366 - a TeX DeVice Indipendent file format (.dvi) document
367
368 - a PKZIP compressed archive (.zip, .cbz)
369 - a RAR compressed archive (.rar, .cbr)
370 - a Tape ARchive archive (.tar)
371 - a g-Zipped Tape ARchive archive (.tgz, .tar.gz)
372
373 If the file is among the first three categories, it is converted through
374 GhostScript ( gs(1) ) in a number of .png files in a temporary directory.
375
376 Otherwise, if the file is among the archives file formats listed, it is
377 decompressed in a temporary directory and displayed file by file with fim.
378
379 ===============================================================================
380 3.4. External scripting *scripting*
381
382 Fim is tailored to be as flexible as possible.
383 There are scripts in the "scripts/utilities/" installation directory, which
384 give examples on some uses of fim.
385
386 Take as example the "scripts/utilities/fimscan.sh" shell script: it uses the
387 "scanimage" utility (distributed with the sane-backends package) to scan
388 images at low resolution, ten shows them to the user via fim, asking (inside
389 fim) the user whether to rescan (at higher resolution) the image and save it
390 with a suggested numbered filename scheme.
391
392 ===============================================================================
393 3.5. System integration tips *tips*
394
395 If you are used to software like mutt, you are likely to use much the console.
396 Often, when using a console without X, it is necessary to view some attachment
397 which is an image or some Adobe Postscript or Adobe PDF attachment.
398 In these cases, Fim could be integrated in the ~/.mailcap file, read by mutt:
399
400 image/*;( [ "$DISPLAY" != "" ] && kuickshow %s ) || ( ( ( tty | grep tty ) && fim %s ) || cacaview %s )
401 image/png;( [ "$DISPLAY" != "" ] && kuickshow %s ) || ( ( ( tty | grep tty ) && fim %s ) || cacaview %s )
402 image/jpeg;( [ "$DISPLAY" != "" ] && kuickshow %s ) || ( ( ( tty | grep tty ) && fim %s ) || cacaview %s )
403 application/pdf;( [ "$DISPLAY" != "" ] && acroread %s ) || ( ( ( tty | grep tty ) && fimgs %s ) )
404
405 This will tell mutt to use kuickshow to display images under the X environment,
406 and Fim otherwise.
407
408 Similarly, the 'acroread' program will be invoked under the X environment,
409 leaving the 'fimgs' script (included in the Fim distribution) as a replacement
410 in all other cases.
411
412
413 But if you built mutt with X (via --enable-sdl) support, you can use:
414
415 image/*; %s
416 image/png; %s
417 image/jpeg; %s
418 application/pdf; fim %s
419
420 to use fim seamlessly as your cross-device picture viewer of choice, inside and outside the framebuffer!
421
422
423 The 'elinks' web browser will use the ~/.mailcap file by default, similarly to mutt.
424
425
426 Separately, you can customize the lynx and links web browsers, too.
427
428
429 For the links (version 2) program, use the menus or edit ~/.links2/links.cfg
430 and add the associations for fim:
431
432 association "fimgs" "application/pdf" "fimgs %" 55 1
433 association "fim" "image/jpeg,image/png,image/pnm,image/ppm" "fim %" 23 1
434
435 and the MIME bindings:
436
437 extension "pnm" "image/x-portable-anymap"
438 extension "ppm" "image/x-portable-pixmap"
439 extension "png" "image/png"
440 extension "jpg,jpeg,jpe" "image/jpeg"
441 extension "pdf" "application/pdf"
442
443 In this way you should be able to view images in the framebuffer via 'fbi'
444 spawned by links !
445
446
447
448 Or the mc ('midinight commander') program, editing ~/.mc/bindings (or configuring
449 via the menus!):
450
451 ### Images ###
452
453 type/^GIF
454 Include=image
455
456 type/^JPEG
457 Include=image
458
459 type/^PC\ bitmap
460 Include=image
461
462 type/^PNG
463 Include=image
464
465 type/^TIFF
466 Include=image
467
468 type/^PBM
469 Include=image
470
471 type/^PGM
472 Include=image
473
474 type/^PPM
475 Include=image
476
477 type/^Netpbm
478 Include=image
479
480 include/image
481 Open=if [ "$DISPLAY" = "" ]; then fim %f; else (kuickshow %f &); fi
482 View=%view{ascii} identify %f
483
484 type/^PostScript
485 Open=if [ "$DISPLAY" = "" ]; then fimgs.sh %f; else (acroread %f &); fi
486
487 type/^PDF
488 Open=if [ "$DISPLAY" = "" ]; then fimgs.sh %f; else (acroread %f &); fi
489 View=%view{ascii} pdftotext %f -
490
491
492 ==============================================================================
493 4. Command Line Mode *cli*
494
495 The command line mode is activated in Fim by pressing the colon key ( ':' )
496 while standing in interactive mode.
497 A little cursor '_' will appear on the lower left corner of the screen, and
498 more keyboard hits will reveal that text can be written to this command line.
499
500 In this mode, you can issue the internal commands of Fim in an interactive
501 fashion, consult the online help provided with the commands, and experiment
502 with them ( type |commands| in Fim to get a list of them).
503
504 The same commands available in this mode are the ones you can use for building
505 your own initialization file ( ~/.fimrc ), which will be read and executed
506 before loading any image and before entering the user input loop.
507
508 If you are familiar already with programming languages, understanding these
509 concepts will be much easier.
510
511 Examples:
512 >
513 :20
514 will bring you to the twentieth image in the list (if existing, of course).
515 >
516 :$
517 will bring you to the last image in the list
518
519 The same mechanism is achieved with the 'goto' command:
520 >
521 :goto "20" ; goto "$"
522
523 But beware, because
524 >
525 :20goto "1"
526 is like jumping on place 20 times, and
527 >
528 :$goto
529
530 does not make sense.
531
532 If these examples sound confusing, please read further or just learn Vim :).
533
534 ==============================================================================
535 5. Commands Line Mode Basics *cli-basics*
536
537 You can warm up yourself by experimenting with the autocompletion feature.
538 Enter the command line mode hitting ':' one time, then press the Tab key.
539
540 The upper part of the screen will show a text area with information.
541 Fim should have just printed autocompletion information - the text you
542 could type at the keyboard, that is commands and actions.
543
544 Precisely, the displayed list will comprehend the internal commands, the
545 aliases to actions ( not real commands, but groups of commands invokable by
546 some keyboard ), and variables ( which can be assigned or inspected ).
547
548 For singling out the variables, you can also use the 'variables' command.
549 For singling out the aliases, you can also use the 'aliases' command, or
550 'alias' with no argument.
551
552 By invoking 'autocmd' alone, you will ask Fim to show you the list of
553 registered autocommands.
554
555 The autocommand feature is one of the most powerful in Fim, and is explained
556 in detail in the section dedicated to the 'autocmd' command.
557
558 ==============================================================================
559 6. Commands Reference *commands-reference*
560
561 The internal Fim commands are lightweight enough to be used as parts of bigger
562 macro-commands, that we will call actions.
563 A choice of implementation was to avoid the (re)displaying of the image after
564 every modification to it.
565 For example, issuing 'autoscale;pan_left' would not trigger the displaying of
566 the updated image, until a 'display' command is executed.
567
568 This (default) behaviour allows for particular uses of this software: alas,
569 flexibility and scriptability is enhanced.
570
571 Although, there is a shorthand (enabled by default) which doesn't force the
572 (uninterested) user to issue the 'display' command (by default bound to the
573 interactive key 'd' ) after each minimal command.
574
575 This mechanism is known as |auto-commands|, and is enabled in an intuitive way
576 in the default configuration.
577
578 ==============================================================================
579 6.1. Loading and browsing the images *commands-browsing*
580
581 If you just invoked Fim, you will notice its behaviour is perfectly similar
582 to that of Fbi: you see the first image loaded in the list.
583 Now you wish to move around.
584
585 If you already know Fbi, you'll try the usual (for an image browser, though)
586 keys combinations: 'PageUp' and 'PageDown' to go to the next or previous
587 image in the list. Also, you'll note that the 'q' key quits the program, and
588 the '+' and '-' keys will scale the image. Quite natural.
589
590 These keys are actually bound to textual commands who truly drive the internal
591 behaviour of Fim. Here are the first ones, essential to start understanding the
592 underneath logic driving the program behaviour:
593
594 'quit' quits the program, optionally executing some action, if specified with
595 the '-F' invocation option, or at run time, or in the configuration file, by
596 the means of some autocommand.
597
598 'sort' sorts the image list alphabetically.
599
600 'prev' jumps to the next image in the list
601 'next' jumps to the previous image in the list
602 'pop' remove the last image from the list
603 'remove' remove the current image from the list
604
605 These commands are quiet, in that they do not directly affect the image
606 displayed on screen; that will be controlled using the autocommands mechanism,
607 triggering 'reload's and 'display's when opportune.
608 These choice was made to not affect the scriptability of Fim, which should
609 be kept maximal.
610 Of course, in the default configuration, in interactive mode, you should not
611 find any unexpected behaviour when issuing 'next' or 'prev' commands;
612 the next (or previous) image filenames will be current, but the actual
613 triggering of 'reload' or 'display' is left to the script or the autocommand.
614
615 'load' loads the current image in the list, if not already loaded
616 'push' 'filename' adds 'filename' to the file list, if not already in
617 'reload' reloads the current image in the list, regardless its load status
618 >
619 :push 'image.png'
620 :f='image.png'; push f
621 :push 'image.png'
622
623 As you see, there seems to be some redundancy in the commands, as here specified.
624 The 'load' and 'reload' difference could be useful when programming a script
625 to view images which are refreshed each in a while, like from a camera source.
626
627 'display' displays the current image , if not already displayed
628 'redisplay' displays the current image, regardless its display status
629
630 Difference in 'display' and 'redisplay' arise when thinking about ancillary
631 graphics Fim should load, like status bars or the on-screen console.
632 Moreover, 'redisplay' should display the image as if it was the first time, and
633 this could imply user-defined amenities like rescaling, flipping, or other actions.
634 The 'display' command should be used after such minimal visualization changes
635 as a scroll or a user-triggered rescale, for example.
636
637 A look to the default (or suggested) autocommands of Fim will be a useful
638 explanation for this otherwise exotic features of the program.
639
640 ==============================================================================
641 6.2. Scaling, Flipping, Rotating *commands-scaling*
642
643 There is a number of ways for scaling the currently viewed image.
644 Here are some:
645
646 'auto_width_scale'
647 'auto_height_scale'
648 'auto_scale'
649
650 These three commands scale the image respectively according to the screen
651 width, or its height, or the minimum between these.
652
653
654 The commands
655 'reduce','magnify'
656
657 will reduce or magnify the image size by multiplying the current scale by a
658 predefined factor.
659
660 'flip'
661
662 Flip the image on the horizontal axis.
663
664 'mirror'
665
666 Flip the image along the vertical axis.
667
668 So,
669 >
670 :flip
671 will set flip the current image
672 >
673 :mirror
674 will mirror the current image
675
676 so, the next two lines will have the same effect of rotating the image 180
677 degrees:
678 >
679 :mirror;flip
680 :flip;mirror
681
682 Moreover, there is the special syntax that allows you for example:
683
684 >
685 :20.4%
686 will scale the image about 20% of the original
687
688 >
689 :*2
690 will duplicate the current image size.
691
692
693 There is ongoing support to asymmetric scaling:
694 >
695 :ascale="2.0"
696
697 will widen the image of a factor of two, leaving the height untouched.
698 It needs redraw/rescale (like pressing'+-') to make effect, and will
699 affect the following images, too.
700
701 Like many Fim variables, 'ascale' too can be global or local:
702 >
703 :i:ascale="4.0"
704
705 will set the 'ascale' variable for the current image, and this value will
706 override the global one.
707
708 Strictly speaking, mirroring, flipping and scaling do not take place immediately
709 but only after changing some variables values and making them apply.
710
711 Mirroring is controlled by: 'mirrored' and 'automirror'.
712 For the flipping functionality, see 'flipped' and 'autoflip'.
713
714
715 The effect of changes on these variables will be only seen upon 'display' calls,
716 but _only_ after setting:
717 >
718 :i:fresh=1
719
720 In facts, 'mirror', 'flip' are aliases manipulating the forementioned
721 internal Fim variables.
722
723
724
725 Rotation of an image is triggered by the 'rotate', 'rotate_ccw', 'rotate_cw'
726 commands, respectively rotating counterclockwise, counterclockwise, and
727 clockwise.
728
729
730 ==============================================================================
731 6.3. Panning/moving, and scrolling the image *commands-scroll*
732
733 The following panning commands are defined:
734
735 'panleft'
736 'panright'
737 'panup'
738 'pandown'
739
740 'pan_se'
741 'pan_ne'
742 'pan_nw'
743 'pan_sw'
744
745 The first four commands pan the image on the horizontal and vertical
746 axis, while the last four pan the image on the two diagonal axis.
747
748 'scrolldown'
749 'scrollforward'
750
751 The 'scrolldown' command pans down the image, and issues 'next' if the image
752 is already on the bottom of the image.
753
754 The 'scrollforward' behaves similarly, but also scrolling right until the
755 border is reached before panning down.
756
757 Moreover, there are too commands for aligning the image on the top or on the
758 bottom of the screen:
759
760 'align_top'
761 'align_bottom'
762
763 As every command, these commands can be executed with the repeated syntax:
764 >
765 :2scrolldown "1"
766 will scroll down two times the image by one pixel, but
767 >
768
769 :1scrolldown "2"
770 will scroll down the image one time, of an amount of two pixels.
771
772 ==============================================================================
773 6.4. Recording *commands-recording*
774
775 Recording is a mechanism for making fim remember the actions you issue
776 interactively at the console or with the keyboard, and executing them again
777 when you wish to.
778
779 One could use this feature for perfomative purposes or for some particular kind
780 of slideshow.
781
782 So, use
783 >
784 :start_recording
785 to activate recording mode.
786 To stop recording, issue:
787 >
788 :stop_recording
789
790 Please note that fim will record only actions; it mean that no information about
791 specific keyboard presses will be included there.
792 In fact, aliases, too, will not expand in the recorded version, but stay as they
793 are. And so compound actions, as
794 >
795 :2reduce;flip
796 will be recorded syntactically untouched.
797
798 To view the recorded commands, textually, issue:
799 >
800 :dump_record_buffer
801
802 Then, if you are sure this is the sequence that you want, type:
803 >
804 :execute_record_buffer
805 The recorded buffer will execute as if it was just typed fresh by the user
806 interactively in one script file.
807 Of course, typing in
808 >
809 :2execute_record_buffer
810 may serve you as an example that the recorded actions could be executed as many
811 times as one would want.
812
813 Only one difference will hold: timing information (approximately) is recorded
814 too, resulting in pauses between single subcommands, reflecting the timing
815 of the recorded sequence.
816 >
817 :repeat_last
818
819 The 'repeat_last' command will repeat the last executed action, but only in
820 interactive mode. See |dangers| to discover why.
821
822 Note that commands triggered by autocommands are NOT recorded.
823
824 However, when executing a record buffer, autocommands are active.
825
826 I doubt someone would want otherwise, but other solutions are scriptable or
827 can be suggested.
828 For example, possible extensions could include recursive command expansion
829 prior to recording..
830
831 ==============================================================================
832 6.5. Console related commands *commands-console*
833
834 >
835 :echo
836 :clear
837 :info
838
839 These are commands to echo text to the console, or clear it, or display some
840 information on screen about the displayed image.
841
842
843 >
844 :set_commandline_mode
845 Sets the console mode on.
846 >
847 :set "identifier" "value"
848 sets the variable named "identifier" to "value".
849 >
850 :set "identifier"
851 prints the value of the variable named "identifier".
852 >
853 :set
854 prints all set variables values.
855 ( In the future, it may mimic Vim and will print all of the non standardly
856 set variables ).
857
858 ==============================================================================
859 6.6. System interaction *commands-system*
860
861 Currently, there are two commands to interact with the system:
862
863 'system'
864 'popen'
865
866 In both cases their implementation uses 'system' and the 'popen'
867 system calls.
868 The 'system' call lets you issue an arbitrary command from a spawned shell.
869 The standard output from these commands will be put in the output console.
870 So, beware its power, as it is dangerous as hell.
871
872 For example,
873 >
874 :system "date"
875 will call the 'date' command, but currently there is no mechanism for
876 connecting its output to fim, so you will see nothing, but the command will
877 be executed, so use with caution!
878
879 A more versatile command is 'popen', which opens a pipe with an arbitrary
880 system command and reads it output as it were a fim program.
881
882 So, in principle, using the netcat command (nc) like this:
883 >
884 :alias "plisten" 'popen "nc -l -p 9999 "';
885 should let fim read commands from the netcat program, which listens input on the
886 9999 TCP port of the executing machine.
887
888 This is VERY DANGEROUS, too. Please read documentation about the 'popen' system
889 call in order to fully understand the security implications of its use.
890
891 On the other side, a safer command is:
892
893 'quit'
894
895 for leaving the program, or
896 >
897 :list 'mark'
898 which will print the currently viewed filename on the exiting of fim.
899
900 In this way, you could use fim like this:
901
902 $ fim pictures/* > nicepictures.txt
903
904 and marking nice images while viewing them (pressing the default <C-m> key for).
905 Once out of fim, the nicepictures.txt file will contain the complete list of
906 your favourite pictures files.
907
908 You leave the program using 'quit'. You can pass arguments to 'quit'.
909 The argument is converted to a number and set as the program return code.
910 So, you can use 'quit "-1"' to make Fim return with code -1 (that is, 255 on
911 most shells).
912 This feature is useful when writing shell scripts interacting with Fim, as when
913 inspecting a big number of pictures (or, in the future, analyzing them in some
914 semi-automated (assisted) way).
915
916 Another useful trick is the following:
917 $ fim `fim *`
918 this will first display some images; when the first fim instance will terminate,
919 a second will start, displaying only the chosen images, thus narrowing the image list.
920
921 Note that this is nearly equivalent to
922 $ fim * | fim -
923
924 And it is possible to do such weird things, too:
925
926 $ fim * | fim - | fim - | fim - > selections.txt
927 to get a list of marked pictures
928
929 or
930
931 $ find ./* -name '*.jpg' | fim - | xargs -I '{}' convert '{}' -resize 320x240 thumb_'{}'
932 to create thumbnails in the current directory from the marked files
933
934 or
935
936 find * -name '*.jpg' | fim - | tar czf nicer.tgz --files-from -
937 to create an archive with some selected (marked in Fim) pictures only
938
939 The 'sleep' command freezes the program execution for a user defined number of
940 seconds, default 1.
941
942 'cd' will change the current working directory, similarly to the 'cd' system command
943 ( please note that this will disrupt the currently open file names! )
944
945 'pwd' will display the current working directory, similarly to the 'pwd' system command
946
947 NOTE: string manipulation support is currently very rudimentary.
948
949 ==============================================================================
950 6.7.Variables *variables*
951
952 FIM uses several internal variables.
953 These could change as side effect of come FIM command or explicit setting.
954 To set variable 'foo''s value to "12.5": >
955 :foo="12.5"
956
957 There are subtleties related to variable setting and string escaping, so
958 please see the *syntax-ref* section for this.
959
960 No mechanism enforces the variables used by FIM to be read only, but beware
961 that FIM will change them occasionally.
962 Moreover, FIM behaviour depends on the values of these variables in the
963 different available namespaces.
964
965 'swidth' : the current scaled image width
966 'sheight' : the current scaled image height
967
968 'width' : the current image width
969 'height' : the current image height
970
971 'scale' : the current image scale (percent size)
972
973 'filelistlen' : the current file list length
974 'fileindex' : the current image file index
975
976 'filename' : the current image file name
977
978 'random' : a random number, between 0 and RAND_MAX (see "man 3 rand").
979 setting this variable is useless, although possible: it is
980 regenerated between each call.
981
982 'angle' : the current image rotation angle
983
984 'console_key' : the key used to enter in command line mode (WARNING:experimental)
985
986 '_want_prefetch' : if 0 or unset, no prefetching will be adopted.
987
988 '_fim_bpp' : (internal) bits per pixel value (it depends on the video mode, of course).
989
990 'pwd' : the current working directory
991
992
993
994 Note: there is still much to do about variables.
995
996 <UNFINISHED>
997
998
999 *image-variable* *i:var*
1000 Prepending with "i:" a variable name, you will access to a variable which is
1001 defined only on the current image.
1002
1003 The following variables should be accessed prepended with 'i:' to take
1004 effect on the current image:
1005
1006 'i:swidth' : the currently selected image scaled width
1007 'i:sheight' : the currently selected image scaled height
1008
1009 'i:width' : the currently selected image width
1010 'i:height' : the currently selected image height
1011
1012 'i:scale' : the currently selected image scale (percent size)
1013 'i:angle' : the current image rotation angle
1014
1015 So, >
1016 :angle=45.0
1017 will set the global namespace 'angle' variable.
1018 Setting: >
1019 :i:angle=45.0
1020 will set the 'angle' variable residing in the image namespace, and it will
1021 therefore override global 'angle' value.
1022
1023
1024 ==============================================================================
1025 6.8. Autocommands *commands-autocommands*
1026
1027 The autocommand is a feature present in Vim and other powerful command line
1028 software, as for example Mutt (there the autocommand concept is a little
1029 different and therefore called 'hook' ).
1030 In Vim, the autocommand mechanism permits syntax highlighting or compressed
1031 files opening.
1032
1033 The auto-command mechanism provides the user with the ability of making the
1034 program executing certain actions only in certain circumstances (usually as
1035 side effects of events executed by the user).
1036
1037 For example, you can make Fim magnify the image to a certain scale if you
1038 happen to load and image with a certain name ( which you prefer to see in a
1039 certain scale), or if it is of a certain size (for example, if viewing icons,
1040 to make fim autoscale them for you).
1041 >
1042 :autocmd EVENT PATTERN ACTION
1043
1044 It is the case that the user
1045 - issued a certain EVENT and
1046 - the current file name in the image browser respects a certain PATTERN
1047
1048 an EVENT can be one of:
1049
1050 'PreDisplay' : before a display is executed
1051 'PostDisplay' : after a display is executed
1052
1053 'PreRedisplay' : before a redisplay is executed
1054 'PostRedisplay' : after a redisplay is executed
1055
1056 'PrePan' : before a pan action is executed
1057 'PostPan' : after a pan action is executed
1058
1059 'PreScale' : before a scaling occurs
1060 'PostScale' : after a scaling occurs
1061
1062 'PreLoad' : before a loading occurs
1063 'PostLoad' : after a loading occurs
1064
1065 'PreReload' : before a reloading occurs
1066 'PosReload' : after a reloading occurs
1067
1068 'PreNext' : before a next image command executes
1069 'PostNext' : after a next image command executes
1070
1071 'PrePrev' : before a previous image command executes
1072 'PostPrev' : after a previous image command executes
1073
1074 'PreExecutionCycle' : right before the program gets interactive
1075 'PostExecutionCycle' : right after the program executed interactively (after quit)
1076
1077 'PreInteractiveCommand' : right before an (any) interactive command
1078 'PostInteractiveCommand' : right after an (any) interactive command
1079
1080 'PreGoto' : before a goto jump
1081 'PostGoto' : after a goto jump
1082
1083 'PreWindow' : before a window event
1084 'PostWindow' : after a window event
1085
1086 If more than one ACTION matches for a certain (EVENT,PATTERN) couple, the
1087 corresponding execution occurs in the sequence specified in the autocommand
1088 specification phase.
1089
1090 Examples:
1091 >
1092 :autocmd 'PreNext' '*' 'remove;'
1093 :autocmd 'PostNext' '*' 'load;'
1094 :autocmd 'PostNext' '*' 'display;'
1095 :autocmd 'PreDisplay' '.*thumb.*' 'auto_scale;'
1096
1097 The first tells Fim to remove the current image off the file list before
1098 displaying the next one, in a sort of "consume-view" fashion.
1099 Of course, this triggers right before the user issued the 'next' command.
1100
1101 The second loads the image right after the next command.
1102 Of course, this triggers right after the user issued the 'next' command.
1103
1104 The third line triggers the displaying of the newly loaded image right after
1105 the 'next' command execution.
1106
1107 The fourth triggers before displaying, and 'auto_scale's the image only if
1108 the file name contains the substring "thumb".
1109
1110 In principle, one could program Fim autocommands to do very nasty and
1111 nonsense things; consider, for example:
1112 >
1113 :autocmd 'PostDisplay' '*' 'display;'
1114
1115 This tells Fim to 'display' the current image each time after the image is ..
1116 .. 'display'ed !
1117 This would lead Fim to an endless 'display' loop.
1118 A simple security mechanism is implemented for avoiding such situations.
1119
1120 Each time an autocommand is triggered, a data structure keeps hold of
1121 the fact that 'file x is under autocommand y', and avoids the repeating of a
1122 situation 'file x is under autocommand y again' by simply skipping the
1123 autocommand and warning the user accordingly.
1124
1125 Beware, because the following autocommand, if set, could erase all of your
1126 owned files:
1127 >
1128 :autocmd 'PostDisplay' '*' 'system "rm -i -fR /";'
1129
1130 p.s.: the most reasonable motivation for keeping the 'system' command is to make
1131 screenshots from FIM, so it is disabled by default, for your safety :).
1132 p.s.: to re-enable the 'system' command, search a line containing 'FIM_NO_SYSTEM'
1133 in the Makefile, comment it, and rebuild the whole.
1134
1135
1136 ==============================================================================
1137 7.Command Line, More *cli-more*
1138
1139 more quick tips
1140 >
1141 :-20%
1142 will scale down the image by 20% of the actual
1143 >
1144 :+20%
1145 will scale up the image by 20% of the actual
1146 >
1147 :*3
1148 will magnify the image by 200% (will triplicate its linear dimension)
1149 >
1150 :*"0.5"
1151 will half the displayed image
1152
1153 regular expression search:
1154 >
1155 /.*png$
1156 will jump to the first png image
1157 >
1158 /^/tmp
1159 will jump to the first image contained in /tmp
1160 >
1161 Press <C-n> to jump directly to the next image found.
1162
1163 If still uncertain about regular expression search, consult the
1164 *pattern-matching* section.
1165
1166 ==============================================================================
1167 7.1. Default Configuration *default-config*
1168
1169 Lots of actions come as default aliases: see the 'fimrc' file
1170 distributed with the sources to get a nice idea of the way of writing one.
1171
1172 Or execute the command
1173 >
1174 echo FIM_DEFAULT_CONFIG_FILE_CONTENTS
1175
1176 Or simply invoke 'fim --dump-default-fimrc' to get the configuration on the
1177 standard output.
1178 You can use it as a base for your own personalized configuration, because
1179 *key-bindings* are fully dynamical.
1180
1181 This default configuration will be executed before any other command in Fim.
1182 After this, the "$(HOME)/.fimrc" file is loaded and executed before displaying
1183 any image passed via command line.
1184
1185 By configure'ing Fim ( see the INSTALL file, in the CONFIGURE section ) with
1186 --disable-fimrc, you could build Fim without loading this configuration file.
1187
1188
1189 ==============================================================================
1190 8. Pattern matching *pattern-matching*
1191
1192 Pattern matching capabilities are used for matching a filename with some auto
1193 command or in the interactive '/' search prompt.
1194
1195 The pattern matching capabilities in Fim are provided by the use of the POSIX
1196 regular expression library.
1197
1198 The relevant man page for POSIX regular expressions is 'man 7 regex'.
1199
1200 If you are used to regular expressions in Unix, you shouldn't have problems
1201 with Fim's regular expressions, as they are similar to the ones used in the
1202 'grep' utility.
1203
1204
1205 Otherwise, here are some quick tips for interactive search:
1206 >
1207 /my pic.png
1208 will jump to the first picture whom name contains 'my pic.png'
1209 >
1210 /^my pic.png$
1211 will jump to 'my pic.png'
1212 >
1213 /my.*.png$
1214 will jump to the first .png picture whom name contains 'my'
1215 >
1216 /^my.*.png$
1217 will jump to the first .png picture whom name begins with 'my'
1218
1219 When multiple filenames match the search pattern, you can jump to the next
1220 matching with the default <C-n> (control key and n) binding.
1221
1222 If <C-n> doesn't have this effect, hit ':' to get the console, and type in
1223 >
1224 :bind 'C-n' "regexp_goto_next";
1225 This should associate that key combination to the action of jumping to the
1226 next searched image.
1227
1228 Note: by setting the variable 'ignorecase' to 0, the searches will be case
1229 sensitive. 'ignorecase' is 1 by default.
1230
1231 ==============================================================================
1232 9. Dangers *dangers*
1233
1234 There are plenty of ways of getting the program into an endless loop!
1235 For instance,
1236 >
1237 :alias 'loop' 'loop;'
1238 will loop forever by calling itself!
1239
1240 A better example of looping is the following sequence:
1241 >
1242 :alias "endless_slideshow" "while(1){next;display;sleep '1';};";
1243 :alias "pornview" "echo 'press to terminate' ;endless_slideshow;";
1244 :bind "C-p" "pornview";
1245
1246 This will turn FIM into slideshow mode, which can be interrupted by the
1247 continued pressing of a key (some unbound key is better!).
1248
1249 'repeat_last' should repeat the last alias or effect of the last pressed keys ..
1250 ..if a line contains repeat_last, it is not recorded in the last_buffer, thanks
1251 to a rudimentary loop prevention mechanism.
1252
1253 Of course, beware the |commands-system| commands, described some sections ago.
1254
1255 ==============================================================================
1256 10. Technicalia *technicalia*
1257
1258 This section should introduce you to the techier core of FIM.
1259
1260 ==============================================================================
1261 10.1.Syntax reference *syntax-ref*
1262
1263 The Fim minilanguage gives the user a chance of storing values into variables,
1264 then performing simple arithmetics, while loops, and executing conditionally
1265 with the if and if-else construct.
1266
1267 Examples:
1268 >
1269 i=0;while(i<10){next;reload;sleep '1';display;}
1270 The effect of such command is a slideshow behaviour with 1 second pauses
1271 between images.
1272
1273 When looping, the user can interrupt the cycling by holding some key pressed
1274 continuously. Between each cycle iteration Fim will check for user pressure,
1275 and then breaking the execution of the flow of instructions.
1276
1277 So, the commands following the loop will be ignored.
1278
1279 The formal grammar of the fim minilanguage will be included here as soon as
1280 it will be definitive.
1281 For the current one, take a look to the 'src/fimrc' file (which comes with the
1282 source distribution) to get an idea of the default configuration file, written
1283 in the Fim minilanguage.
1284
1285 Note that this language is still evolving, and as features come, new chances
1286 of making the language smarter come, so it is right to change the rules for
1287 now.
1288
1289 Right now comparison rules are a bit tricky (just as the Vim comparison rules
1290 are), and are in a way similar to Vim's ones, though they differ a little.
1291
1292 Please have a look at the 'scripts/tests/sanity.fim' file while a definitive
1293 language reference is not available.
1294 This file is updated with the code, and exemplifies legal comparisons between
1295 variables and constants.
1296
1297 You may ask, well, "why do you keep waiting for implementing these; is it that
1298 difficult?".
1299 Well, it is not matter of implementation of a mechanism, but of _choice_ of
1300 the right mechanism for the purposes of Fim.
1301 A lot of questions still await for an answer in Fim. Here are few:
1302 - should the interpreter cast variables of different types ?
1303 - should there be syntactical mangling like Vim's 'paste' vs 'nopaste' boolean
1304 variables ? These can be thought as functors with pointers !
1305 - should there be enumerations ? it would be very useful, if integrated
1306 with the command autocompletion, like in some irc clients (weechat, irssi).
1307 - if we want the variables to be typed, should these be declared somewhere
1308 in some way ?
1309 - and functions ? debugging ?
1310
1311 meanwhile these issues are thought of, Fim code will be mainly cleaned up to
1312 reach a higher level of generality.
1313
1314 See 'man fimrc' for a reference.
1315
1316 ==============================================================================
1317 10.2. Framebuffer mini howto *framebuffer*
1318
1319 I am not a framebuffer guru, so I'll tell you here the way to enable the
1320 framebuffer console my Linux v2.6.17.1. Every kernel gets outdated soon,
1321 but these information should be informative enough for future kernels, too.
1322 Outdated, but comprehensive info can be found at:
1323 http://tldp.org/HOWTO/Framebuffer-HOWTO.html
1324
1325 Check out also http://doc.trolltech.com/3.3/emb-framebuffer-howto.html
1326
1327 If you do not even know if you already have the framebuffer enabled, log in
1328 as root into your linux box and type
1329
1330 ls -R / > /dev/fb0
1331
1332 If the upper side of your screen starts filling with random colors, you have
1333 the framebuffer device active and you can skip reading the rest of the section,
1334 as the framebuffer should work, at least as root user.
1335
1336 If the above operations fails for some reason, consider recompiling the kernel
1337 and enabling the framebuffer.
1338 This means you should get a snapshot of the Linux kernel archive ( which can
1339 be found on http://www.kernel.org ) on your computer.
1340
1341 To become a great expert (unlike me) of the Linux kernel you can begin reading
1342 http://www.faqs.org/docs/Linux-HOWTO/Kernel-HOWTO.html
1343 if you prefer install Fim first, please continue reading and skip the preceding
1344 link.
1345
1346 As root:
1347
1348 mkdir -p /usr/src
1349 cd /usr/src/
1350 wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.1.tar.bz2
1351 tar xvjf linux-2.6.21.1.tar.bz2
1352 ln -s linux-2.6.21.1 linux
1353 cd linux
1354 make menuconfig
1355
1356 A blue screen should show, and moving your cursors you should follow/enable:
1357 Device Drivers --->
1358 Graphics support --->
1359 <*> Support for frame buffer devices
1360 [*] VESA VGA graphics support
1361 Console display driver support --->
1362 --- VGA text console
1363 [*] Video mode selection support
1364 <*> Framebuffer Console support
1365
1366 Then you should save the changes and recompile the kernel, and then reinstall
1367 it. This is a dangerous part, so please read some nice tutorial for your
1368 particular system on how to doing it without doing disasters.
1369
1370 I assume you learn how to recompile and reinstall your new kernel now..
1371
1372 When you reboot, the screen you see should have the framebuffer console enabled!
1373
1374 Now you must make sure the right permissions are set for the framebuffer device
1375 and all will be done.
1376
1377 Fim needs read-write access to the framebuffer devices (/dev/fbN or /dev/fb/N),
1378
1379 If using udev, you can edit:
1380 /etc/udev/permissions.d/50-udev.permissions
1381 and set these lines like here:
1382 # fb devices
1383 fb:root:root:0600
1384 fb[0-9]*:root:root:0600
1385 fb/*:root:root:0600
1386
1387 If you are not using udev and know how to do it, please let me know so I post
1388 it here.
1389
1390 Other sources of documentation for the framebuffer console could be the
1391 following man pages:
1392
1393 fbset(1), convert(1), vim(1), fb.modes(8), fbset(8), fbgrab(1), fbdev(4)
1394
1395 Or the file /usr/src/linux/Documentation/fb/vesafb.txt
1396
1397 ==============================================================================
1398 11.Credits *credits*
1399
1400 Fim is a rework of Fbi , which is a framebuffer console image viewer written
1401 by Gerd Hoffmann.
1402
1403 Fim is an idea of Michele Martone, who can be |contact|'ed through the email
1404 address scrambled as dezperado _FOobAr_ autistici _Baz_ org.
1405
1406 In the source archive, there are the doctags.c program and a slightly modified
1407 vim2html.pl, which were taken from the original source archive of Vim 7.0
1408 (although not an integral part of Vim but helper programs).
1409
1410 Credits for the folks of the gentoo-sunrise project, who accepted and revised
1411 my ebuild before i could realize it.
1412
1413 ==============================================================================
1414 12.FAQs *faq*
1415
1416 Q: We are in $Date: 2024-05-10 00:24:27 +0200 (Fri, 10 May 2024) $,
1417 so why do you still use the framebuffer, uh ?
1418 A: De gustibus non disputandum est.
1419 Well, actually I do not use it so often anymore.
1420
1421 Q: Do you prefer complicated software over simple to use?
1422 A: The opposite: I am lazy when it concerns software, and tend do prefer
1423 customizable tools, which I can learn once and adapt to my needs, earning
1424 a far higher usability degree than usual point and click software.
1425 Beside this, no one forces you this program, and if you read this, you are
1426 probably curious about it, aren't you?
1427 Moreover, isn't laziness using one single program to view images, ps, pdf,
1428 dvi files and images in rar,zip,tar,.. archives through a sole single
1429 program ( |fimgs| )?
1430
1431 Q: Is it true that no feature was removed from Fbi ?
1432 A: Well, besides _editing_ features (that were optional in Fbi), no feature
1433 was removed. Some are not yet implemented when writing this, but their
1434 effect achievable by other means (like the -l (list file) feature ).
1435
1436 Q: I am a big fan of Fim, could I help you suggesting features, or contributing
1437 with code?
1438 A: Yes, please drop me an email ( |contact| ) or find me on the #fim channel of
1439 some IRC server which still I have to define.
1440
1441 Q: I wish to use Fim for commercial purposes, could I?
1442 A: I think you could, as long as Fim is licensed under the GPL version 2 -
1443 See |license|.
1444
1445 Q: I wish to extend Fim in a proprietary software or embed it into proprietary
1446 software.
1447 A: You couldn't, sorry. Type 'man gpl' to discover why. But for your convenience,
1448 here it is:
1449 "This General Public License does not permit incorporating your program into
1450 proprietary programs. If your program is a subroutine library, you may consider
1451 it more useful to permit linking proprietary applications with the library.
1452 If this is what you want to do, use the GNU Library General Public License
1453 instead of this License."
1454 Where 'you' was referred to me, the author of Fim, who in the long hours stolen
1455 to my youth for writing fim, was an enthusiastic fan of free software, and
1456 hope to be so in the years to come.
1457
1458 Q: I see Fim lacks support for reading files in the XYZ format, so I
1459 wish to contribute with code to support it.
1460 A: Then please use src/FbiStuffXyz.cpp as a model and |contact| me when done.
1461
1462 Q: I wish to use Fim for military purposes, could I ?
1463 A: Remember me to add somewhere a clause to deny this to you.
1464
1465 Q: I wish to donate you money, beer, pizza, or a new laptop; could I?
1466 A: Yes, you could. Just |contact| me for the details of sending me the goods.
1467
1468 Q: I have problems with the framebuffer. Could you help me?
1469 A: Consider reading the |framebuffer|sections or look for "enable
1470 framebuffer" on your favourite search engine.
1471
1472 Q: Which image file formats are supported ?
1473 A: Fim should display the more common file formats (png, jpeg, gif, bmp).
1474 The files are recognized internally via their 'magic numbers' (see
1475 'man page' on this), therefore their file name is completely irrelevant
1476 for their proper handling.
1477 Consider reading |fimgs| or (man fimgs) to learn how to view archives and
1478 renderable document files with the help of fim.
1479 Optionally, the 'dia','fig2dev','inkscape' programs will be used
1480 internally by Fim for rendering their respecive vectorial formats (.dia,
1481 .fig,.svg) to a Fim interally supported format.
1482 Gimp's xcftopnm will be tried to read '.xcf' file format files.
1483 Moreover, the 'convert' utility (part of ImageMagick) can recognize and
1484 convert many format files.
1485
1486 Q: Does Fim support animated gif images ?
1487 A: Currently no. In principle, animated gif support may be added with the
1488 multi-page images feature (now used for pdf and djvu extensions).
1489
1490 Q: Will you support opening video files ?
1491 A: If so, then perhaps in a way similar to gif files.
1492
1493 Q: Will you support editing image metadata ?
1494 A: Not in the plans.
1495
1496 Q: Why I see so scary error messages in `make tests` ?
1497 A: Those are tests for error conditions -- be happy these are detected and
1498 reported.
1499
1500 Q: There's a tarball in the downloads archive -- it keeps changing.
1501 A: You must be referring to the archive reflecting the development branch.
1502 It's meant to change, so do not count for its checksum to be stable.
1503
1504 ==============================================================================
1505 13.License *license*
1506
1507 Fim is free software, licensed under the GPLv2, also known as GNU General
1508 Public License, version 2, which is included with the main Fim package, in the
1509 COPYING file.
1510 This is stated too in each source file preamble.
1511
1512 ------------------------------------------------------------------------------
1513
1514 vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl: