Debian Codegraph @

doc/fimrc.man.in

raw
1 .\"
2 .\" $Id$
3 .\"
4 .TH fimrc 5 "(c) 2011-2024 Michele Martone"
5 .SH NAME
6 fimrc - \fB fim \fP configuration file and language reference
7
8 .SH SYNOPSIS
9 .B ~/.fimrc
10 .fi
11 .B @sysconfdir@/fimrc
12 .fi
13 .B fim
14 --script-from-stdin [ \fR\fI{options}\fR ] < \fR\fI{scriptfile}\fR
15 .br
16 .B fim
17 --execute-script \fR\fI{scriptfile}\fR [ \fR\fI{options}\fR ]
18 .br
19 .B fim
20 --execute-commands \fR\fI{commands}\fR [ \fR\fI{options}\fR ]
21 .br
22 .B fim
23 --final-commands \fR\fI{commands}\fR [ \fR\fI{options}\fR ]
24 .br
25 .B fim
26 --write-scriptout \fR\fI{scriptfile}\fR [ \fR\fI{options}\fR ]
27 .br
28 .B fim
29 --write-scriptout /dev/stdout [ \fR\fI{options}\fR ]
30 .br
31 .B fim
32 --chars-press :\fR\fI{commands}\fR [ \fR\fI{options}\fR ]
33 .br
34 .B fim
35 --chars-press :\fR\fI{commands}\fR --chars-press '' [ \fR\fI{options}\fR ]
36 .br
37 .B fim
38 --keysym-press \fR\fI{keysym}\fR [ \fR\fI{options}\fR ]
39 .br
40
41 .SH DESCRIPTION
42 This page explains the
43 .B fim
44 scripting language, which is used for the
45 .B fimrc
46 configuration files, \fR\fI{scriptfile}\fRs, or \fR\fI{commands}\fR passed via command line \fR\fI{options}\fR.
47 This language can be used to issue commands (or programs) from the internal program command line accessed interactively by default through the ":" key (which can be customized via the "\fB_console_key\fP" variable).
48 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).
49 The general form of a fim command/program is shown in the next section.
50
51
52 .SH FIM LANGUAGE GRAMMAR
53 This section specifies the grammar of the
54 .B fim
55 language.
56
57 Language elements surrounded by a single quote ("'") are literals.
58
59 Warning: at the present state, this grammar has conflicts. A future release shall fix them.
60
61 program: %empty
62 | statement_list
63
64 statement_list: statement
65 | statement ';' statement_list
66 | non_atomic_statements_block statement_list
67 | statements_block
68
69 non_atomic_statements_block: '{' statement_list '}'
70 | INTEGER '{' statement_list '}'
71 | conditional_statement
72
73 statements_block: atomic_statements_block
74 | non_atomic_statements_block
75
76 conditional_statement: if_statement
77 | loop_statement
78
79 if_statement: 'if' '(' expression ')' statements_block
80 | 'if' '(' expression ')' statements_block 'else' statements_block
81
82 loop_statement: 'while' '(' expression ')' statements_block
83 | 'do' statements_block 'while' '(' expression ')'
84
85 atomic_statements_block: statement ';'
86 | statement ';' ';'
87 | statement ';' ';' ';'
88
89 statement: '!' arguments
90 | INTEGER ',' INTEGER IDENTIFIER
91 | INTEGER ',' INTEGER IDENTIFIER arguments
92 | INTEGER IDENTIFIER
93 | SLASH_AND_REGEXP
94 | '+' UNQUOTED_FLOAT '%'
95 | '+' QUOTED_FLOAT '%'
96 | '+' INTEGER '%'
97 | '*' UNQUOTED_FLOAT
98 | '*' QUOTED_FLOAT
99 | '*' INTEGER
100 | UNQUOTED_FLOAT '%'
101 | QUOTED_FLOAT '%'
102 | INTEGER '%'
103 | '-' UNQUOTED_FLOAT '%'
104 | '-' QUOTED_FLOAT '%'
105 | '-' INTEGER '%'
106 | INTEGER
107 | '-' INTEGER
108 | IDENTIFIER
109 | IDENTIFIER FILE_PATH
110 | IDENTIFIER arguments
111 | INTEGER IDENTIFIER arguments
112 | IDENTIFIER '=' expression
113
114 arguments: expression
115 | expression arguments
116
117 expression: '(' expression ')'
118 | expression '.' expression
119 | '!' expression
120 | expression '%' expression
121 | expression '+' expression
122 | expression '-' expression
123 | expression '*' expression
124 | expression '/' expression
125 | expression '<' expression
126 | expression '>' expression
127 | expression '||' expression
128 | expression BOR expression
129 | expression '&&' expression
130 | expression BAND expression
131 | expression '>=' expression
132 | expression '<=' expression
133 | expression '!=' expression
134 | expression '==' expression
135 | expression '=~' expression
136 | '-' expression
137 | IDENTIFIER
138 | INTEGER
139 | QUOTED_FLOAT
140 | UNQUOTED_FLOAT
141 | STRING
142
143 A STRING can be either a single quoted string or a double quoted string.
144 A floating point number can be either unquoted (UNQUOTED_FLOAT) or quoted (QUOTED_FLOAT).
145 A QUOTED_FLOAT is a floating point number, either single ("'") or double (""") quoted.
146 An INTEGER shall be an unsigned integer number.
147 An IDENTIFIER shall be one of the valid fim commands (see
148 .B COMMANDS REFERENCE
149 ) or a valid alias.
150 A VARIABLE shall be an already declared or undeclared variable identifier (see
151 .B VARIABLES REFERENCE
152 ) or a valid alias, created using the
153 .B alias
154 command.
155 The "=~" operator treats the right expression as a STRING, and uses it as a regular expression for matching purposes.
156 The SLASH_AND_REGEXP is a slash ("/") followed by a STRING, interpreted as a regular expression.
157 If 'INTEGER , INTEGER IDENTIFIER arguments' is encountered, command IDENTIFIER will be repeated on each file in the interval between the two INTEGERs, and substituting the given file name to any '{}' found in the commands arguments (which must be quoted in order to be treated as strings).
158 See \fR\fIregex\fR(1) for regular expression syntax.
159
160 The way some one-line statements are evaluated:
161
162 .nf
163 : enter command line mode (here one can use readline bindings as C-r, C-s, M-b, M-f, ...)
164 :\fR\fI{number}\fR jump to \fR\fI{number}\fR^th image in the list
165 :^ jump to first image in the list
166 :$ jump to last image in the list
167 :*\fR\fI{factor}\fR scale the image by \fR\fI{factor}\fR
168 :\fR\fI{scale}\fR% scale the image to the desired \fR\fI{scale}\fR
169 :+\fR\fI{scale}\fR% scale the image up to the desired percentage \fR\fI{scale}\fR (relatively to the original)
170 :-\fR\fI{scale}\fR% scale the image down to the desired percentage \fR\fI{scale}\fR (relatively to the original)
171
172 /\fR\fI{regexp}\fR entering the pattern \fR\fI{regexp}\fR (with '/') makes fim jump to the next image whose filename matches \fR\fI{regexp}\fR
173 /*.png$ entering this pattern (with '/') makes fim jump to the next image whose filename ends with 'png'
174 /png a shortcut for '/.*png.*'
175
176 2,4 stdout '{}' print three filenames to standard output.
177
178
179 !\fR\fI{syscmd}\fR executes the \fR\fI{syscmd}\fR quoted string as an argument to the "system" fim command.
180
181
182 .SH COMMANDS REFERENCE
183
184 .na
185 .B
186 alias
187 .fi
188 alias [\fR\fI{identifier}\fR [\fR\fI{commands}\fR [\fR\fI{description}\fR]]]
189 .fi
190 Without arguments, lists the current aliases.
191 .fi
192 With one, shows an identifier's assigned command.
193 .fi
194 With two, assigns to an identifier a user defined command or sequence of commands.
195 .fi
196 With three, also assigns a help string.
197 .fi
198
199 .na
200 .B
201 align
202 .fi
203 align ['bottom'|'top'|'left'|right']: if image larger than drawing area, align one side of the image to the border.
204 .fi
205 align 'center': align equally far from all sides.
206 .fi
207 align 'info': print internal alignment information.
208 .fi
209
210 .na
211 .B
212 autocmd
213 .fi
214 autocmd \fR\fI{event}\fR \fR\fI{pattern}\fR \fR\fI{commands}\fR: manipulate autocommands (inspired from Vim autocmd's).
215 .fi
216 Without arguments, list autocommands.
217 .fi
218 With arguments, specifies for which type of event and which current file open, which commands to execute.
219 .fi
220 See the default built-in configuration files for examples.
221 .fi
222
223 .na
224 .B
225 autocmd_del
226 .fi
227 autocmd_del: specify autocommands to delete.
228 .fi
229 Usage: autocmd_del \fR\fI{event}\fR \fR\fI{pattern}\fR \fR\fI{commands}\fR.
230 .fi
231
232 .na
233 .B
234 basename
235 .fi
236 basename \fR\fI{filename}\fR: returns the basename of \fR\fI{filename}\fR in the '_last_cmd_output' variable.
237 .fi
238
239 .na
240 .B
241 bind
242 .fi
243 bind [\fR\fI{keysym}\fR [\fR\fI{commands}\fR [\fR\fI{description}\fR]]]: bind a key \fR\fI{keysym}\fR to \fR\fI{commands}\fR.
244 .fi
245 Optional \fR\fI{description}\fR specifies a documentation string.
246 .fi
247 If \fR\fI{keysym}\fR is at least two characters long and begins with 0 (zero), the integer number after the 0 will be treated as a raw keycode to bind the specified \fR\fI{keysym}\fR to.
248 .fi
249 Use the '_verbose_keys' variable to discover (display device dependent) raw keys.
250 .fi
251 Key binding is dynamical, so you can bind keys even during program's execution.
252 .fi
253 You can get a list of valid symbols (keysyms) by invoking dump_key_codes or in the man page.
254 .fi
255
256 .na
257 .B
258 cd
259 .fi
260 cd \fR\fI{path}\fR: change the current directory to \fR\fI{path}\fR.
261 .fi
262 If \fR\fI{path}\fR is a file, use its base directory name.
263 .fi
264 cd '-' changes to the previous current directory (before the last ':cd \fR\fI{path}\fR' command).
265 .fi
266
267 .na
268 .B
269 clear
270 .fi
271 clear: clear the virtual console.
272 .fi
273
274 .na
275 .B
276 commands
277 .fi
278 commands: display the existing commands.
279 .fi
280
281 .na
282 .B
283 color
284 .fi
285 color ['desaturate']: desaturate the displayed image colors.
286 .fi
287 color ['negate']: negate the displayed image colors.
288 .fi
289 color ['colorblind'|'c'|'deuteranopia'|'d']: simulate a form of the deuteranopia color vision deficiency (cvd).
290 .fi
291 color ['protanopia'|'p']: simulate a form of the protanopia cvd.
292 .fi
293 color ['tritanopia'|'t']: simulate a form of the tritanopia cvd.
294 .fi
295 color ['daltonize'|'D']: if following a cvd specification, attempts correcting it.
296 .fi
297 color ['identity']: populate the image with 'RGB identity' pixels.
298 .fi
299 To get back the original, you have to reload the image.
300 .fi
301
302 .na
303 .B
304 crop
305 .fi
306 crop: crop image to a centered rectangle, half the width and half the height.
307 .fi
308 crop \fR\fI{p}\fR: crop image to the middle \fR\fI{p}\fR horizontal percent and \fR\fI{p}\fR vertical percent of the image.
309 .fi
310 crop \fR\fI{w}\fR \fR\fI{h}\fR: crop image to the middle \fR\fI{w}\fR horizontal percent and \fR\fI{h}\fR vertical percent of the image.
311 .fi
312 crop \fR\fI{x1}\fR \fR\fI{y1}\fR \fR\fI{x2}\fR \fR\fI{y2}\fR: crop image to the area between the upper left (\fR\fI{x1}\fR,\fR\fI{y1}\fR) and lower right (\fR\fI{x2}\fR,\fR\fI{y2}\fR) corner.
313 .fi
314 Units are intended as percentage (0 to 100).
315 .fi
316 Note: still experimental functionality.
317 .fi
318
319 .na
320 .B
321 desc
322 .fi
323 desc 'load' \fR\fI{filename}\fR [\fR\fI{sepchar}\fR]: load description file \fR\fI{filename}\fR, using the optional \fR\fI{sepchar}\fR character as separator.
324 .fi
325 desc 'reload': load once again description files specified at the command line with --load-image-descriptions-file, with respective separators.
326 .fi
327 desc ['-all'] ['-append'] ['-nooverw'] 'save' \fR\fI{filename}\fR [\fR\fI{sepchar}\fR]: save current list descriptions to file \fR\fI{filename}\fR, using the optional \fR\fI{sepchar}\fR character as separator, and if '-all' is present then save the variables, and if '-append' is present then only append, and if '-nooverw' is present then do not overwrite existing files.
328 .fi
329 See documentation of --load-image-descriptions-file for the format of \fR\fI{filename}\fR.
330 .fi
331
332 .na
333 .B
334 display
335 .fi
336 display ['reinit' \fR\fI{string}\fR | 'resize' \fR\fI{w}\fR \fR\fI{h}\fR | ['menuadd' \fR\fI{menuspec}\fR|'menudel'|'v'|'V'] ]: display the current file contents or change display settings.
337 .fi
338 If 'reinit' switch is supplied, the \fR\fI{string}\fR specifier is used to reinitialize the display device parameters like e.g. resolution, window system options; see the --output-device command line switch for allowed values.
339 .fi
340 If 'resize' and no argument, ask the window manager to resize the window like the image.
341 .fi
342 If 'resize' and two arguments, these are used to reset width and height of the current window.
343 .fi
344 In the 'menuadd' case, use \fR\fI{menuspec}\fR as GTK window menu specification. This specification string argument can be repeated. Each argument has form M/S. M is a slash-separated submenu location, with optional '_' (underscore) before a GTK accelerator character (e.g. "File", "_File", "View/Scale", "_View/Scale"). M cannot be empty and must be followed by a '/'. S can specify a simple entry, a toggle entry, or radio buttons. If a simple entry, it consists of one to three sections separated by " " (two spaces). If M begins with two non-alphanumeric symbols, these will be used as separators, instead of the two spaces. The first section is the name of the menu entry (a label), the second is a command specification, the third is a shortcut character. The following labels are special and if followed by '/', they create custom menus: FimMenuLimit (pre-categorized "limit"-based commands based on actual "desc" command data), FimMenuCommands (with commands), FimMenuAliases (with aliases), FimMenuKeyBindings (with bindings), FimMenuVariables (with variables' values), FimMenuCommandsHelp (commands help), FimMenuAliasesHelp (aliases help), FimMenuKeyBindingsHelp (bindings help), FimMenuVariablesHelp (variables' help). A toggle button specification can take the form 'toggle__'\fR\fI{identifier}\fR'__'\fR\fI{value}\fR'__'\fR\fI{value}\fR and starts the toggle button with the second \fR\fI{value}\fR (which has to be different). Actually, between 'toggle' and the second value, instead of '__' you can use any two same punctuation signs or Tab characters consistently. E.g. "menu/label toggle___v__1__2 " or "menu/label toggle::_v::1::2 " are ok, but "menu/label toggle___v__1__1 " or "menu/label toggle___v::1::2 " are not. A radio buttons specification has as many sections as radio buttons, separated internally by double spaces, and consisting each by a string, two spaces, an assignment \fR\fI{identifier}\fR=\fR\fI{value}\fR (notice no quotes are necessary around \fR\fI{value}\fR, and repetitions are illegal), two spaces, and an optional accelerator character (e.g. "m/first: v=1 a second: v=2 b third: v=3 c" is ok, but "m/first: v=1 a second: v=2 b third: v=2 c" is not).
345 .fi
346 Option 'menudel' removes all menus.
347 .fi
348 Note: 'menuadd' and 'menudel' are only valid for the \fBgtk\fP mode and are experimental. In particular, currently there are limitations on which characters are allowed in menu command specifications; the recommended workaround is to use aliases.
349 .fi
350 Experimental option 'v' increases internal verbosity for some graphical outputs; experimental option 'V' decreases it.
351 .fi
352 See also the '_debug_commands' variable.
353 .fi
354
355 .fi
356
357 .na
358 .B
359 dump_key_codes
360 .fi
361 dump_key_codes: dump the active key codes (unescaped, for inspection purposes).
362 .fi
363
364 .na
365 .B
366 echo
367 .fi
368 echo \fR\fI{args}\fR: print the \fR\fI{args}\fR on console.
369 .fi
370
371 .na
372 .B
373 else
374 .fi
375 if(\fR\fIexpression\fR){\fR\fIaction\fR;}['else'{\fR\fIaction\fR;}]: see if.
376 .fi
377
378 .na
379 .B
380 eval
381 .fi
382 eval \fR\fI{args}\fR: evaluate \fR\fI{args}\fR as commands, executing them.
383 .fi
384
385 .na
386 .B
387 exec
388 .fi
389 exec \fR\fI{filename(s)}\fR: execute script \fR\fI{filename(s)}\fR.
390 .fi
391
392 .na
393 .B
394 font
395 .fi
396 font 'scan' [\fR\fI{dirname}\fR]: scan \fR\fI{dirname}\fR or /usr/share/consolefonts looking for fonts in the internal fonts list.
397 .fi
398 font 'load' \fR\fI{filename}\fR: load font \fR\fI{filename}\fR.
399 .fi
400 font {'next'|'prev'}: load next or previous font from the internal fonts list.
401 .fi
402 font 'info': print current font filename.
403 .fi
404
405 .na
406 .B
407 getenv
408 .fi
409 getenv \fR\fI{identifier}\fR: create a variable with the same value as the '\fR\fI{identifier}\fR' environment variable, but with an identifier prefixed by 'ENV_'. So e.g. getenv 'DISPLAY' creates 'ENV_DISPLAY'. Nothing is being printed; no variable is created if \fR\fI{identifier}\fR is empty.
410 .fi
411
412 .na
413 .B
414 goto
415 .fi
416 goto {['+'|'-']\fR\fI{number}\fR['%']['f'|'p'|'F'|'P']}+ | {/\fR\fI{regexp}\fR/} | {?\fR\fI{filename}\fR} | {'+//'} | {'+/'|'-/'}[\fR\fIC\fR] | {{'+'|'-'}\fR\fI{identifier}\fR['+']}: jump to an image.
417 .fi
418 If \fR\fI{number}\fR is given, and not surrounded by any specifier, go to image at index \fR\fI{number}\fR.
419 .fi
420 If followed by '%', the effective index is computed as a percentage to the current available images.
421 .fi
422 If prepended by '-' or '+', the jump is relative to the current index.
423 .fi
424 The 'f' specifier asks for the jump to occur within the files (same for 'F', but accelerates if keep pressing).
425 .fi
426 The 'p' specifier asks for the jump to occur in terms of pages, within the current file (same for 'P', but accelerates if keep pressing).
427 .fi
428 If there's only one file in the list and no 'f' specified, a 'p' will be implied, for a page jump.
429 .fi
430 The above form can be concatenated several times, but only the last occurrence of either file or page goto will be effective.
431 .fi
432 If /\fR\fI{regexp}\fR/ is given, jump to the first image matching the given /\fR\fI{regexp}\fR/ regular expression pattern.
433 .fi
434 If the argument starts with ?, jump to the filename following ?.
435 .fi
436 If given '+//', jump to the first different image matching the last given regular expression pattern.
437 .fi
438 With '+/'\fR\fIC\fR or '-/'\fR\fIC\fR, jump to the next or the previous file according to \fR\fIC\fR: if 's' if same directory, if 'd' if down the directory hierarchy, if 'u' if down the directory hierarchy, if 'b' if same basename, if upper case match is negative, if missing defaults to 'S' (jump to file in different dir).
439 .fi
440 If \fR\fI{identifier|identifier2...}]\fR is encountered after a '+' or '-' sign, jump to the next or the previous image having a different value for any corresponding i:\fR\fI{identifier}\fR (a trailing '+' requires a non empty value).
441 .fi
442 Matching can occur on both file name and description, possibly loaded via desc or --load-image-descriptions-file; see also '_lastgotodirection' and '_re_search_opts'.
443 .fi
444 You can specify multiple arguments to goto: those after the first one triggering a jump are ignored.
445 .fi
446 Executes autocommands for events PreGoto and PostGoto. Keeping pressed shall accelerate images browsing.
447 .fi
448
449 .na
450 .B
451 help
452 .fi
453 help [\fR\fI{identifier}\fR]: provide online help, assuming \fR\fI{identifier}\fR is a variable, alias, or command identifier.
454 .fi
455 If \fR\fI{identifier}\fR begins with '/', search on the help contents, and show a list of matching items.
456 .fi
457 A list of commands can be obtained simply invoking 'commands'; a list of aliases with 'alias'; a list of bindings with 'bind'; a list of variables with 'variables'.
458 .fi
459
460 .na
461 .B
462 if
463 .fi
464 if(\fR\fIexpression\fR){\fR\fIaction\fR;}['else'{\fR\fIaction\fR;}]: see 'else'.
465 .fi
466
467 .na
468 .B
469 info
470 .fi
471 info: display information about the current file.
472 .fi
473
474 .na
475 .B
476 limit
477 .fi
478 limit {'-list'|'-listall'} 'variable'|['-further'|'-merge'|'-subtract'] [{\fR\fIexpression\fR} |{\fR\fIvariable\fR} \fR\fI{value}\fR]: A browsable file list filtering function (like limiting in the 'mutt' program). Uses information loaded via --load-image-descriptions-file.
479 .fi
480 If invoked with '-list'/'-listall' only, will list the current description variable ids.
481 .fi
482 If invoked with '-list'/'-listall' 'id', will list set values for the variable 'id'.
483 .fi
484 If '-further' is present, will start with the current list; if not, with the full list.
485 .fi
486 If '-merge' is present, new matches will be merged in the existing list and sorted.
487 .fi
488 If '-subtract' is present, sort and filter out matches.
489 .fi
490 If {\fR\fIvariable\fR} and {value} are provided, limit to files having property {\fR\fIvariable\fR} set to \fR\fI{value}\fR.
491 .fi
492 If {\fR\fIexpression\fR} is one exclamation point ('!'), will limit to the currently marked files only.
493 .fi
494 If {\fR\fIexpression\fR} is '~!' will limit to files with unique basename.
495 .fi
496 if '~=', to files with duplicate basename.
497 .fi
498 if '~^', to the first of the files with duplicate basename.
499 .fi
500 if '~$\:', to the last of the files with duplicate basename.
501 .fi
502 On '~i' [\fR\fIMINIDX\fR][-][\fR\fIMAXIDX\fR], (each a number possibly followed by a multiplier 'K') will limit on filenames in position \fR\fIMINIDX\fR to \fR\fIMAXIDX\fR.
503 .fi
504 On '~z' will limit to files having the current file's size.
505 .fi
506 on '~z' [\fR\fIMINSIZE\fR][-][\fR\fIMAXSIZE\fR], (each a number possibly followed by a multiplier among 'k','K','m','M') will limit on filesize within these limits.
507 .fi
508 on '~d' will limit to files having the current file's date +- one day.
509 .fi
510 on '~d' [\fR\fIMINTIME\fR][-][\fR\fIMAXTIME\fR], (each the count of seconds since the Epoch (First of Jan. of 1970) or a date as \fR\fIDD\fR/\fR\fIMM\fR/\fR\fIYYYY\fR) will limit on file time (struct stat's 'st_mtime', in seconds) within this interval.
511 .fi
512 For other values of {\fR\fIexpression\fR}, limit to files whose description string matches {\fR\fIexpression\fR}.
513 .fi
514 Invoked with no arguments, the original browsable files list is restored.
515 .fi
516
517 .na
518 .B
519 list
520 .fi
521 list: display the files list.
522 .fi
523 list 'random_shuffle': randomly shuffle the file list.
524 .fi
525 list 'reverse': reverse the file list.
526 .fi
527 list 'clear': clear the file list.
528 .fi
529 list 'sort': sort the file list.
530 .fi
531 list 'sort_basename': sort the file list according to base name.
532 .fi
533 list 'sort_comment': sort the file list according to the value of the _comment variable.
534 .fi
535 list 'sort_var' \fR\fI{var}\fR: sort the file list according to the value of the i:\fR\fI{var}\fR variable.
536 .fi
537 list 'vars'|'variables': list variables in all i:* read from description file.
538 .fi
539 list 'sort_fsize': sort the file list according to file size.
540 .fi
541 list 'sort_mtime': sort the file list according to modification date.
542 .fi
543 list 'pop': remove the current file from the files list, and step back.
544 .fi
545 list 'remove' [\fR\fI{filename(s)}\fR]: remove the current file, or the \fR\fI{filename(s)}\fR, if specified.
546 .fi
547 list 'push' \fR\fI{filename(s)}\fR: push \fR\fI{filename(s)}\fR to the back of the files list.
548 .fi
549 list 'filesnum': display the number of files in the files list.
550 .fi
551 list 'mark' [\fR\fI{args}\fR]: mark image file names for stdout printing at exit, with \fR\fI{args}\fR mark the ones matching according to the rules of the 'limit' command, otherwise the current file.
552 .fi
553 list 'unmark' [\fR\fI{args}\fR]: unmark marked image file names, with \fR\fI{args}\fR unmark the ones matching according to the rules of the 'limit' command, otherwise the current file.
554 .fi
555 list 'marked': show which files have been marked so far.
556 .fi
557 list 'dumpmarked': dump to stdout the marked files (you usually want to 'unmarkall' afterwards).
558 .fi
559 list 'markall': mark all the current list files.
560 .fi
561 list 'unmarkall': unmark all the marked files.
562 .fi
563 list 'pushdir' \fR\fI{dirname}\fR: push all the files in \fR\fI{dirname}\fR, when matching the regular expression in variable _pushdir_re or, if empty, from constant regular expression '\.(JPG|PNG|GIF|BMP|TIFF|TIF|JPEG|JFIF|PPM|PGM|PBM|PCX|QOI|AVIF|WEBP)$\:'.
564 .fi
565 list 'pushdirr' \fR\fI{dirname}\fR: like pushdir, but also push encountered directory entries recursively.
566 .fi
567 list 'swap': move the current image filename to the first in the list (you'll have to invoke reload to see the effect).
568 .fi
569 Of the above commands, several are temporarily not available for the duration of a background load (enabled by --background-recursive), which lasts until _loading_in_background is 0.
570 .fi
571
572 .na
573 .B
574 load
575 .fi
576 load: load the image, if not yet loaded (see also 'reload').
577 .fi
578 Executes autocommands for events PreLoad and PostLoad.
579 .fi
580
581 .na
582 .B
583 pan
584 .fi
585 pan \fR\fI{vsteps}\fR% \fR\fI{hsteps}\fR%: pan the image to \fR\fI{vsteps}\fR percentage steps from the top and \fR\fI{hsteps}\fR percentage steps from left.
586 .fi
587 pan \fR\fI{vsteps}\fR \fR\fI{hsteps}\fR: pan the image to \fR\fI{vsteps}\fR pixels from the top and \fR\fI{hsteps}\fR pixels from left.
588 .fi
589 pan {'down'|'up'|'left'|'right'|'ne'|'nw'|'se'|'sw'}[+-] [\fR\fI{steps}\fR['%']]: pan the image \fR\fI{steps}\fR pixels in the desired direction.
590 .fi
591 If the '%' specifier is present, \fR\fI{steps}\fR is treated as a percentage of current screen dimensions.
592 .fi
593 If \fR\fI{steps}\fR is not specified, the '_steps' variable is used.
594 .fi
595 If present, the '_hsteps' variable is considered for horizontal panning.
596 .fi
597 A '+' (or '-') sign at the end of the first argument jumps to next (or previous) if border is reached.
598 .fi
599 If present, the '_vsteps' variable is considered for vertical panning.
600 .fi
601 The variables may be terminated by the '%' specifier.
602 .fi
603 Executes autocommands for events PrePan and PostPan.
604 .fi
605
606 .na
607 .B
608 popen
609 .fi
610 popen \fR\fI{syscmd}\fR: pipe a command, invoking popen(): spawns a shell, invoking '\fR\fI{syscmd}\fR' and executing as fim commands the output of '\fR\fI{syscmd}\fR'. Can be disabled at configure time with --disable-system.
611 .fi
612
613 .na
614 .B
615 pread
616 .fi
617 pread \fR\fI{args}\fR: execute \fR\fI{args}\fR as a shell command and read the output as an image file (using 'popen'). Can be disabled at configure time with --disable-system.
618 .fi
619
620 .na
621 .B
622 prefetch
623 .fi
624 prefetch: prefetch (read into the cache) the two nearby image files (next and previous), for a faster subsequent opening.
625 .fi
626 Executes autocommands for events PrePrefetch and PostPrefetch.
627 .fi
628 See also the '_want_prefetch' variable.
629 .fi
630
631 .na
632 .B
633 pwd
634 .fi
635 pwd: print the current directory name, and updates the '_pwd' variable.
636 .fi
637
638 .na
639 .B
640 quit
641 .fi
642 quit [\fR\fI{number}\fR]: terminate the program.
643 .fi
644 If \fR\fI{number}\fR is specified, use it as the program return status.
645 .fi
646 Note that autocommand 'PostInteractiveCommand' does not trigger after this command.
647 .fi
648
649 .na
650 .B
651 recording
652 .fi
653 recording 'start': start recording the executed commands.
654 .fi
655 recording 'stop': stop recording the executed commands.
656 .fi
657 recording 'dump': dump in the console the record buffer.
658 .fi
659 recording 'execute': execute the record buffer.
660 .fi
661 recording 'repeat_last': repeat the last performed action.
662 .fi
663
664 .na
665 .B
666 redisplay
667 .fi
668 redisplay: re-display the current file contents.
669 .fi
670
671 .na
672 .B
673 reload
674 .fi
675 reload [\fR\fI{arg}\fR]: load the image into memory.
676 .fi
677 If \fR\fI{arg}\fR is present, force reloading, bypassing the cache (see also 'load').
678 .fi
679 Executes autocommands for events PreReload and PostReload.
680 .fi
681
682 .na
683 .B
684 rotate
685 .fi
686 rotate \fR\fI{number}\fR: rotate the image the specified amount of degrees. If unspecified, by one. If you are interested in orthogonal rotations, see '_orientation' and related aliases.
687 .fi
688 Executes autocommands for events PreScale and PostScale.
689 .fi
690
691 .na
692 .B
693 scale
694 .fi
695 scale {['+'|'-']\fR\fI{value}\fR['%']|'*'\fR\fI{value}\fR|'w'|'h'|'a'|'b'|'+[+-*/]'|['<'|'>']|'shadow'}: scale the image according to a scale \fR\fI{value}\fR (e.g.: 0.5,40%,'w','h','a','b').
696 .fi
697 If given '*' and a value, multiply the current scale by that value.
698 .fi
699 If given 'w', scale according to the screen width.
700 .fi
701 If given 'h', scale to the screen height.
702 .fi
703 If given 'a', to the minimum of 'w' and 'h'.
704 .fi
705 If given 'b', like 'a', provided that the image width exceeds 'w' or 'h'.
706 .fi
707 If \fR\fI{value}\fR is a number, scale relatively to the original image width.
708 .fi
709 If the number is followed by '%', the relative scale is treated as a percentage.
710 .fi
711 If given '++'('+-'), increment (decrement) the '_magnify_factor', '_reduce_factor' variables by '_scale_factor_delta'.
712 .fi
713 If given '+*'('+/'), multiply (divide) the '_magnify_factor', '_reduce_factor' variables by '_scale_factor_multiplier'.
714 .fi
715 If given '<' (or '>'), shrink (or magnify) image using nearest mipmap (cached pre-scaled version). If given 'shadow' as a parameter, search a same-named file in one of the directories specified to --load-shadow-dir.
716 .fi
717 Executes autocommands for events PreScale and PostScale.
718 .fi
719
720 .na
721 .B
722 scroll
723 .fi
724 scroll: scroll down the image, going next when hitting the bottom.
725 .fi
726 scroll 'forward': scroll the image as we were reading left to right (see '_scroll_skip_page_fraction' variable).
727 .fi
728 Executes autocommands for events PrePan and PostPan.
729 .fi
730
731 .na
732 .B
733 set
734 .fi
735 set: returns a list of variables which are set.
736 .fi
737 set \fR\fI{identifier}\fR: returns the value of variable \fR\fI{identifier}\fR.
738 .fi
739 set \fR\fI{identifier}\fR \fR\fI{value}\fR: sets variable \fR\fI{identifier}\fR to value \fR\fI{value}\fR.
740 .fi
741
742 .na
743 .B
744 set_commandline_mode
745 .fi
746 set_commandline_mode: set console mode. Note that the mode will change only after the current block of commands is evaluated.
747 .fi
748
749 .na
750 .B
751 set_interactive_mode
752 .fi
753 set_interactive_mode: set interactive mode. Note that the mode will change only after the current block of commands is evaluated.
754 .fi
755
756 .na
757 .B
758 sleep
759 .fi
760 sleep [\fR\fI{number}\fR]: sleep for the specified number of seconds (or 1, if unspecified).
761 .fi
762
763 .na
764 .B
765 status
766 .fi
767 status: set the status line to the collation of the given arguments.
768 .fi
769
770 .na
771 .B
772 stderr
773 .fi
774 stderr \fR\fI{args}\fR: writes to stderr its arguments \fR\fI{args}\fR.
775 .fi
776
777 .na
778 .B
779 stdout
780 .fi
781 stdout \fR\fI{args}\fR: writes to stdout its arguments \fR\fI{args}\fR.
782 .fi
783
784 .na
785 .B
786 system
787 .fi
788 system \fR\fI{syscmd}\fR: get the output of executing the \fR\fI{syscmd}\fR system command. Uses the popen() system call. Usually popen invokes "/bin/sh -c \fR\fI{syscmd}\fR". This might not handle a multi-word command; in that case you have to put it into a script. See 'man popen' for more. Can be disabled at configure time with --disable-system.
789 .fi
790
791 .na
792 .B
793 variables
794 .fi
795 variables: display the existing variables.
796 .fi
797
798 .na
799 .B
800 unalias
801 .fi
802 unalias \fR\fI{identifier}\fR | '-a': delete the alias \fR\fI{identifier}\fR or all aliases (use '-a', not -a).
803 .fi
804
805 .na
806 .B
807 unbind
808 .fi
809 unbind \fR\fI{keysym}\fR: unbind the action associated to a specified \fR\fI{keysym}\fR
810 .fi
811 If \fR\fI{keysym}\fR is at least two characters long and begins with 0 (zero), the integer number after the 0 will be treated as a raw keycode to bind the specified \fR\fI{keysym}\fR to.
812 .fi
813 Use the '_verbose_keys' variable to discover (display device dependent) raw keys.
814 .fi
815
816 .na
817 .B
818 while
819 .fi
820 while(\fR\fIexpression\fR){\fR\fIaction\fR;}: A conditional cycle construct.
821 .fi
822 May be interrupted by hitting the 'Esc' or the ':' key.
823 .fi
824
825 .na
826 .B
827 window
828 .fi
829 window \fR\fI{args}\fR: this command is disabled.
830 .fi
831
832 .SH KEYSYMS REFERENCE
833
834 " " "!" '"' "#" "$" "%" "&" "'" "(" ")" "*" "+" "," "-" "." "/" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" ":" ";" "<" "=" ">" "?" "@" "A" "Any" "B" "Backspace" "C" "C-a" "C-b" "C-c" "C-d" "C-e" "C-f" "C-g" "C-h" "C-i" "C-j" "C-k" "C-l" "C-m" "C-n" "C-o" "C-p" "C-q" "C-r" "C-s" "C-t" "C-u" "C-v" "C-w" "C-x" "C-y" "C-z" "D" "Del" "Down" "E" "End" "Enter" "Esc" "F" "F1" "F10" "F11" "F12" "F2" "F3" "F4" "F5" "F6" "F7" "F8" "F9" "G" "H" "Home" "I" "Ins" "J" "K" "L" "Left" "M" "N" "O" "P" "PageDown" "PageUp" "Q" "R" "Right" "S" "T" "Tab" "U" "Up" "V" "W" "X" "Y" "Z" "[" "\\" "]" "^" "_" "`" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "{" "|" "}" "~"
835
836 .SH AUTOCOMMANDS REFERENCE
837 Available autocommands are: PreScale, PostScale, PrePan, PostPan, PreRedisplay, PostRedisplay, PreDisplay, PostDisplay, PrePrefetch, PostPrefetch, PreReload, PostReload, PreLoad, PostLoad, PreGoto, PostGoto, PreConfigLoading, PostConfigLoading, PreHardcodedConfigLoading, PostHardcodedConfigLoading, PreUserConfigLoading, PostUserConfigLoading, PreGlobalConfigLoading, PostGlobalConfigLoading, PreInteractiveCommand, PostInteractiveCommand, PreExecutionCycle, PostExecutionCycle, PreExecutionCycleArgs, PreWindow, PostWindow, and they are triggered on actions as suggested by their name.
838 Those associated to actual commands are mentioned in the associated commands reference.
839 .SH VARIABLES REFERENCE
840 If undeclared, a variable will evaluate to 0.
841
842 When assigning a variable to a string, use single or double quoting, otherwise it will be treated as a number.
843
844 The namespaces in which variables may exist are: current image, global. A namespace is specified by a prefix, which can be: 'i:', 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.
845
846 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).
847
848 .na
849 .B
850 _TERM
851 [out,g:] the environment TERM variable.
852 .fi
853 .na
854 .B
855 __exif_flipped
856 [out,i:] flipping information, read from the EXIF tags of a given image.
857 .fi
858 .na
859 .B
860 __exif_mirrored
861 [out,i:] mirroring information, read from the EXIF tags of a given image.
862 .fi
863 .na
864 .B
865 _all_file_loaders
866 [out,g:] space-separated list of hardcoded file loaders usable with _file_loader.
867 .fi
868 .na
869 .B
870 _archive_files
871 [in,g:] If non-empty, a regular expression matching the filenames to be treated as archives (multipage files). If empty, "\.(RAR|ZIP|TAR|TAR.GZ|TGZ|TAR.BZ2|TBZ|TBZ2|CBR|CBZ|LHA|7Z|XAR|ISO)$\:" is used. Within each archive, only filenames matching the regular expression in the _pushdir_re variable are considered for loading.
872 .fi
873 .na
874 .B
875 _autocmd_trace_stack
876 [in,g:] dump to stdout autocommands (autocmd) stack trace during their execution (for debugging purposes).
877 .fi
878 .na
879 .B
880 _autodesaturate
881 [in,g:] if 1, desaturate all images.
882 .fi
883 .na
884 .B
885 _autoflip
886 [in,g:] if 1, flip all images.
887 .fi
888 .na
889 .B
890 _automirror
891 [in,g:] if 1, mirror all images.
892 .fi
893 .na
894 .B
895 _autonegate
896 [in,g:] if 1, negate all images.
897 .fi
898 .na
899 .B
900 _autotop
901 [in,g:] if 1, align to the top freshly loaded images.
902 .fi
903 .na
904 .B
905 _buffered_in_tmpfile
906 [out,i:] if an image has been temporarily converted and decoded from a temporary file, its name is here.
907 .fi
908 .na
909 .B
910 _cache_control
911 [in,g:] string for cache control. If it starts with 'm', cache mipmaps; if it starts with 'M' then do not not cache them. Otherwise defaults apply.
912 .fi
913 .na
914 .B
915 _cache_status
916 [out,g:] string with current information on cache status.
917 .fi
918 .na
919 .B
920 _cached_images
921 [out,g:] the number of images currently cached.
922 .fi
923 .na
924 .B
925 _caption_over_image
926 [in,g:] if set to a value different than 0, display a custom comment string specified according to the value of _caption_over_image_fmt; if larger than 1, with black background; if 3, draw above the image, with no overlap. Occupies at most half of the screen.
927 .fi
928 .na
929 .B
930 _caption_over_image_fmt
931 [in,g:] custom info format string, displayed in a caption over the image; if unset: i:_comment; otherwise a custom format string specified just as _info_fmt_str.
932 .fi
933 .na
934 .B
935 _command_expansion
936 [in,g:] if 1, enable autocompletion (on execution) of alias and command strings.
937 .fi
938 .na
939 .B
940 _comment
941 [i:,out] the image comment, extracted from the image file (if any).
942 .fi
943 .na
944 .B
945 _console_buffer_free
946 [out,g:] amount of unused memory in the output console buffer.
947 .fi
948 .na
949 .B
950 _console_buffer_total
951 [out,g:] amount of memory allocated for the output console buffer.
952 .fi
953 .na
954 .B
955 _console_buffer_used
956 [out,g:] amount of used memory in the output console buffer.
957 .fi
958 .na
959 .B
960 _console_key
961 [in,g:] the key bound (an integer variable) to spawn the command line; overrides any other binding. It's set -1 if command line disabled.
962 .fi
963 .na
964 .B
965 _console_lines
966 [out,g:] the number of buffered output console text lines.
967 .fi
968 .na
969 .B
970 _console_offset
971 [in,out,g:] position of the text beginning in the output console, expressed in lines.
972 .fi
973 .na
974 .B
975 _debug_commands
976 [in,g:] debugging option string for printing out . if containing 'a', print out autocmd info; if containing 'c', print out each command; if containing 'k', print out each pressed key in command line mode; if containing 'i', print interpreter internal steps; if containing 'B', clear screen and print background loading files; if containing 'C', print cache activity; if containing 'm', gtk mode menus tooltips will contain also specification strings; if containing 'mm', gtk mode menu building will also be very verbose.
977 .fi
978 .na
979 .B
980 _device_string
981 [out,g:] the current display device string, in the form [fb|sdl|gtk|ca|aa|dumb][=\fR\fI{gfxopts}\fR]. See option --output-device for a description.
982 .fi
983 .na
984 .B
985 _display_as_binary
986 [in,g:] force loading files as pixelmaps (no image decoding is performed); if 1, using one bit per pixel; if 24, using 24 bits per pixel. If empty, load and decode the files as usual.
987 .fi
988 .na
989 .B
990 _display_as_rendered_text
991 [in,g:] if 1, force loading specified files as text files (no image decoding is performed); otherwise load and decode the files as usual.
992 .fi
993 .na
994 .B
995 _display_busy
996 [in,g:] if 1, display a message on the status bar when processing.
997 .fi
998 .na
999 .B
1000 _display_console
1001 [in,g:] if 1, display the output console.
1002 .fi
1003 .na
1004 .B
1005 _display_status
1006 [in,g:] if 1, display the status bar.
1007 .fi
1008 .na
1009 .B
1010 _display_status_bar
1011 [in,g:] if 1, display the status bar.
1012 .fi
1013 .na
1014 .B
1015 _display_status_fmt
1016 [in,g:] custom info format string, displayed in the lower left corner of the status bar; if unset: full pathname; otherwise a custom format string specified just as _info_fmt_str.
1017 .fi
1018 .na
1019 .B
1020 _do_sanity_check
1021 [in,experimental,g:] if 1, execute a sanity check on startup.
1022 .fi
1023 .na
1024 .B
1025 _downscale_huge_at_load
1026 [in,g:] if 1, downscale at load time huge images (that is, ones exceeding by 1.5 times the screen size).
1027 .fi
1028 .na
1029 .B
1030 _exif_orientation
1031 [out,i:] orientation information in the same format of _orientation, read from the orientation EXIF tags (i:EXIF_Orientation).
1032 .fi
1033 .na
1034 .B
1035 _exiftool_comment
1036 [out,g:] comment extracted via the exiftool interface; see _use_exiftool.
1037 .fi
1038 .na
1039 .B
1040 _external_decoder_program
1041 [out,i:] if an image has been decoded via an external program, its name is here.
1042 .fi
1043 .na
1044 .B
1045 _fbfont
1046 [out,g:] The current console font file string. If the internal hardcoded font has been used, then its value is "fim://".
1047 .fi
1048 .na
1049 .B
1050 _fbfont_as_screen_fraction
1051 [in,g:] Scale the rendered text to at least this (integer) fraction of the screen. Disable font autoscaling with -1. (Only enabled if configured with --with-font-magnifying-factor=FACTOR, with FACTOR<1).
1052 .fi
1053 .na
1054 .B
1055 _fbfont_magnify_factor
1056 [in,g:] For the rendered text use a font magnified by this (integer) factor. Maximal value is "16". (Only enabled if configured with --with-font-magnifying-factor=FACTOR, with FACTOR<1).
1057 .fi
1058 .na
1059 .B
1060 _fbfont_verbosity
1061 [in,g:] if > 0, verbose font loading
1062 .fi
1063 .na
1064 .B
1065 _file_load_time
1066 [out,i:] time taken to load the file and decode the image, in seconds.
1067 .fi
1068 .na
1069 .B
1070 _file_loader
1071 [in,i:,g:] specify a file loader to use (among the ones listed in the -V switch output); [out] i:_file_loader stores the loader of the current image.
1072 .fi
1073 .na
1074 .B
1075 _fileindex
1076 [out,g:] the current image numeric index.
1077 .fi
1078 .na
1079 .B
1080 _filelistlen
1081 [out,g:] current image list length (number of visible images).
1082 .fi
1083 .na
1084 .B
1085 _filename
1086 [out,i:] the current file name string.
1087 .fi
1088 .na
1089 .B
1090 _fim_bpp
1091 [out,g:] the bits per pixel count.
1092 .fi
1093 .na
1094 .B
1095 _fim_default_config_file_contents
1096 [out,g:] the contents of the default (hardcoded) configuration file (executed after the minimal hardcoded config).
1097 .fi
1098 .na
1099 .B
1100 _fim_default_grammar_file_contents
1101 [out,g:] the contents of the default (hardcoded) grammar file.
1102 .fi
1103 .na
1104 .B
1105 _fim_scriptout_file
1106 [in,g:] the name of the file to write to when recording sessions.
1107 .fi
1108 .na
1109 .B
1110 _fim_version
1111 [out,g:] fim version number; may be used for keeping compatibility of fim scripts across evolving versions.
1112 .fi
1113 .na
1114 .B
1115 _hide_gtk_menus
1116 [out,g:] internal
1117 .fi
1118 .na
1119 .B
1120 _hsteps
1121 [in,g:] the default steps, in pixels, when panning images horizontally (overrides steps).
1122 .fi
1123 .na
1124 .B
1125 _ignorecase
1126 [in,g:] if 1, allow for case-insensitive regexp-based match in autocommands (autocmd).
1127 .fi
1128 .na
1129 .B
1130 _info_fmt_str
1131 [in,g:] custom info format string, displayed in the lower right corner of the status bar; may contain ordinary text and special 'expando' sequences. These are: %p for current scale, in percentage; %w for width; %h for height; %i for image index in list; %k for the value of i:_comment (comment description) variable in square brackets (if non empty); %l for current image list length; %L for flip/mirror/orientation information; %P for page information; %F for file size; %M for screen image memory size; %m for memory used by mipmap; %C for memory used by cache; %T for total memory used (approximation); %R for total max memory used (as detected by getrusage()); %n for the current file path name; %N for the current file path name basename; ; %c for centering information; %v for the fim program/version identifier string; %% for an ordinary %. A sequence like %?VAR?EXP? expands to EXP if i:VAR is set (or, otherwise, if VAR); EXP is copied verbatim except for contained sequences of the form %:VAR:, which expand to the value of variable i:VAR (or, if unset, VAR); this is meant to be used like in e.g. '%?EXIF_DateTimeOriginal?[%:EXIF_DateTimeOriginal:]?', where the EXIF-set variable EXIF_DateTimeOriginal (make sure you have libexif for this) are used only if present.
1132 .fi
1133 .na
1134 .B
1135 _inhibit_display
1136 [internal,g:] if 1, inhibit display.
1137 .fi
1138 .na
1139 .B
1140 _last_cmd_output
1141 [out,experimental,g:] the last command output.
1142 .fi
1143 .na
1144 .B
1145 _last_file_loader
1146 [out,g:] set to the name of the last file loader used.
1147 .fi
1148 .na
1149 .B
1150 _last_system_output
1151 [out,experimental,g:] the standard output of the last call to the system command.
1152 .fi
1153 .na
1154 .B
1155 _lastfileindex
1156 [out,g:] the last visited image numeric index (different than _fileindex). Useful for jumping back and forth easily between two images with 'goto _lastfileindex'.
1157 .fi
1158 .na
1159 .B
1160 _lastgotodirection
1161 [out,g:] the last file goto direction (either string '+1' or string '-1').
1162 .fi
1163 .na
1164 .B
1165 _lastpageindex
1166 [out,g:] the last visited file page index.
1167 .fi
1168 .na
1169 .B
1170 _load_default_etc_fimrc
1171 [in,g:] if 1 at startup, load the system wide initialization file.
1172 .fi
1173 .na
1174 .B
1175 _load_fim_history
1176 [in,g:] if 1 on startup, load the ~/.fim_history file on startup.
1177 .fi
1178 .na
1179 .B
1180 _load_hidden_dirs
1181 [in,g:] if not 1, when pushing directories/files, those with name beginning with a dot (.) are skipped.
1182 .fi
1183 .na
1184 .B
1185 _loading_in_background
1186 [out,g:] 1 if program has been invoked with --background-recursive and still loading in background.
1187 .fi
1188 .na
1189 .B
1190 _loop_only_once
1191 [internal,g:] if 1 and doing a --slideshow, do it once.
1192 .fi
1193 .na
1194 .B
1195 _lwidth
1196 [in,g:] if>0, force the output console text width.
1197 .fi
1198 .na
1199 .B
1200 _magnify_factor
1201 [in,g:] the image scale multiplier used when magnifying images size.
1202 .fi
1203 .na
1204 .B
1205 _max_cached_images
1206 [in,g:] the maximum number of images after which forcing evictions. Setting this to 0 (no limits) is ok provided _max_cached_memory is set meaningfully.
1207 .fi
1208 .na
1209 .B
1210 _max_cached_memory
1211 [in,g:] the maximum amount of memory (in KiB) at which images continue being added to the cache. Setting this to 0 (no limit) leads to a crash (there is no protection currently).
1212 .fi
1213 .na
1214 .B
1215 _max_iterated_commands
1216 [g:] the iteration limit for N in "N[commandname]" iterated command invocations.
1217 .fi
1218 .na
1219 .B
1220 _min_cached_images
1221 [in,g:] the minimum number of images to keep from eviction; if less than four can lead to inefficiencies: e.g. when jumping between two images, each time an erase and a prefetch of neighboring images would trigger. default value is 4.
1222 .fi
1223 .na
1224 .B
1225 _no_default_configuration
1226 [in,g:] if 0, a default, hardcoded configuration is loaded at startup, after the minimal hardcoded one.
1227 .fi
1228 .na
1229 .B
1230 _no_external_loader_programs
1231 [in,g:] if 1, do not attempt using external programs to decode a file of an unknown format.
1232 .fi
1233 .na
1234 .B
1235 _no_rc_file
1236 [in,g:] if 1, do not load the ~/.fimrc configuration file at startup.
1237 .fi
1238 .na
1239 .B
1240 _open_offset
1241 [in,optional,g:,i:] offset (specified in bytes) used when opening a file; [out] i:_open_offset is assigned to images opened at a nonzero offset.
1242 .fi
1243 .na
1244 .B
1245 _open_offset_retry
1246 [in,optional,g:] number of adjacent bytes to probe in opening the file.
1247 .fi
1248 .na
1249 .B
1250 _orientation
1251 [internal,i:] Orthogonal clockwise rotation (orientation) is controlled by: 'i:_orientation', 'g:_orientation' and applied on a per-image basis. In particular, the values of the three variables are summed up and the sum is interpreted as the image orientation. If the sum is 0, no rotation applies; if it is 1, a single ( 90') rotation applies; if it is 2, a double (180') rotation applies; if it is 3, a triple (270') rotation applies. If the sum is not one of 0,1,2,3, the value of the sum modulo 4 is considered. Therefore, ":i:_orientation=1" and ":i:_orientation=5" are equivalent: they rotate the image one time by 90'.
1252 .fi
1253 .na
1254 .B
1255 _pread_cmd
1256 [in,g:] a user-specified shell command emitting an image on stdout, in a format readable by the convert utility. If the current filename matches "^[/A-Za-z0-9_.][/A-Za-z0-9_.-]*$\:", substitute it to any occurrence of '{}'.
1257 .fi
1258 .na
1259 .B
1260 _preferred_rendering_dpi
1261 [in,optional,g:] if >0, rendering of pdf, ps, djvu use this value for a default document dpi; if unset, use an internal default value.
1262 .fi
1263 .na
1264 .B
1265 _preferred_rendering_width
1266 [in,optional,g:] if >0, bit-based (see _display_as_binary) rendering uses this value for a default document width (instead of a default value).
1267 .fi
1268 .na
1269 .B
1270 _push_checks
1271 [in,experimental,g:] if 1 (default), check with stat() the existence of input files before push'ing them (set this to 0 to speed up loading very long file lists; in these cases a trailing slash (/) must be used to tell fim a pathname is a directory). This only works after initialization (thus, after command line files have been push'ed); use --no-stat-push if you wish to set this to 0 at command line files specification.
1272 .fi
1273 .na
1274 .B
1275 _push_pushes_dirs
1276 [in,g:] if 1, the push command also accepts and pushes directories (using pushdir). if 2, also push hidden files/directories, that is, ones whose names begin with a dot (.).
1277 .fi
1278 .na
1279 .B
1280 _pushdir_re
1281 [in] regular expression to match against when pushing files from a directory or an archive. By default this is "\.(JPG|PNG|GIF|BMP|TIFF|TIF|JPEG|JFIF|PPM|PGM|PBM|PCX|QOI|AVIF|WEBP)$\:".
1282 .fi
1283 .na
1284 .B
1285 _pwd
1286 [out,g:] the current working directory; variable updated at startup and whenever the working directory changes.
1287 .fi
1288 .na
1289 .B
1290 _re_search_opts
1291 [in,g:] affects regexp-based searches; if an empty string, defaults apply; if it contains 'i' ('I'), case insensitive (sensitive) searches occur; if it contains 'b', match on basename, if contains 'f' on full pathname; if it contains 'D', match on description.
1292 .fi
1293 .na
1294 .B
1295 _reduce_factor
1296 [in,g:] the image scale multiplier used when reducing images size.
1297 .fi
1298 .na
1299 .B
1300 _retry_loader_probe
1301 [in,g:] if set to 1 and a user-specified file loader fails, probe for a different loader.
1302 .fi
1303 .na
1304 .B
1305 _rows
1306 [in,g:] if >0, set the number of text lines in the console to be displayed .
1307 .fi
1308 .na
1309 .B
1310 _save_fim_history
1311 [in,g:] if 1 on exit, save the ~/.fim_history file on exit.
1312 .fi
1313 .na
1314 .B
1315 _scale_factor_delta
1316 [in,g:] value used for incrementing/decrementing the scaling factors.
1317 .fi
1318 .na
1319 .B
1320 _scale_factor_multiplier
1321 [in,g:] value used for scaling up/down the scaling factors.
1322 .fi
1323 .na
1324 .B
1325 _scale_style
1326 [in,g:] if non empty, pass it to the scale command; see its documentation for possible values.
1327 .fi
1328 .na
1329 .B
1330 _screen_height
1331 [out] the screen height.
1332 .fi
1333 .na
1334 .B
1335 _screen_width
1336 [out,g:] the screen width.
1337 .fi
1338 .na
1339 .B
1340 _scroll_skip_page_fraction
1341 [int,g:] if >1, fraction of page to skip when scrolling (e.g. 'scrollforward'); if 1, auto chosen; if <1, disabled.
1342 .fi
1343 .na
1344 .B
1345 _seek_magic
1346 [optional,g:] seek a 'magic' signature in the file after opening it, and try decoding it starting within the range of that signature (use like this: fim -C '_seek_magic=MAGIC_STRING;push filename').
1347 .fi
1348 .na
1349 .B
1350 _slideshow_sleep_time
1351 [in,g:] number of seconds of sleep during slideshow mode.
1352 .fi
1353 .na
1354 .B
1355 _status_line
1356 [in,g:] if 1, display the status bar.
1357 .fi
1358 .na
1359 .B
1360 _steps
1361 [in,g:] the default steps, in pixels, when panning images.
1362 .fi
1363 .na
1364 .B
1365 _stop_slideshow
1366 [internal,g:] if it becomes 1 during a slideshow, stop it; gets unset before each 'while'.
1367 .fi
1368 .na
1369 .B
1370 _sys_rc_file
1371 [in,g:] string with the global configuration file name.
1372 .fi
1373 .na
1374 .B
1375 _use_exiftool
1376 [in,g:] if >0 and supported, use exiftool to get additional information. If 1, append this information to _comment; if 2, to _exiftool_comment.
1377 .fi
1378 .na
1379 .B
1380 _use_mipmaps
1381 [in,g:] if >0, use mipmaps to speed up downscaling of images (this has a memory overhead equivalent to one image copy); mipmaps are not cached. If 2, use every fourth source pixel instead of averaging (good for photos, not for graphs).
1382 .fi
1383 .na
1384 .B
1385 _verbose_errors
1386 [in,g:] if 1, display on stdout internal errors, while parsing commands.
1387 .fi
1388 .na
1389 .B
1390 _verbose_keys
1391 [in,g:] if 1, display on the console the raw keycode of each key hit interactively.
1392 .fi
1393 .na
1394 .B
1395 _verbosity
1396 [in,experimental,g:] program verbosity.
1397 .fi
1398 .na
1399 .B
1400 _vsteps
1401 [in,g:] the default steps, in pixels, when panning images vertically (overrides steps).
1402 .fi
1403 .na
1404 .B
1405 _want_autocenter
1406 [in,g:] if 1, center the image when displayed.
1407 .fi
1408 .na
1409 .B
1410 _want_exif_orientation
1411 [in,g:] if 1, reorient images using information from EXIF metadata (and stored in in _exif_orientation, __exif_mirrored, __exif_flipped ).
1412 .fi
1413 .na
1414 .B
1415 _want_prefetch
1416 [in,g:] if 1, prefetch further files just after displaying the first file; if 2 (and configured with --enable-cxx11) load in the background.
1417 .fi
1418 .na
1419 .B
1420 _want_wm_caption_status
1421 [in,g:] this works only if supported by the display device. If set to a number that is not 0, show the status (or command) line in the window manager caption; if set to a non-empty string, interpret it just as a file info format string (see _info_fmt_str); if empty, show the program version.
1422 .fi
1423 .na
1424 .B
1425 _want_wm_mouse_ctrl
1426 [in,g:] if at least 9 chars long, enable mouse click/movement behaviour when in GTK, SDL or libcaca mode; the 9 chars correspond to a 3x3 screen clickable grid and the equivalent command keys; clicking middle or right button toggle on-screen usage info.
1427 .fi
1428 .na
1429 .B
1430 angle
1431 [in,out,i:] a floating point number specifying the rotation angle, in degrees.
1432 .fi
1433 .na
1434 .B
1435 ascale
1436 [in,out,i:] the asymmetric scaling of the current image.
1437 .fi
1438 .na
1439 .B
1440 desaturated
1441 [out,i:] 1, if the image is desaturated.
1442 .fi
1443 .na
1444 .B
1445 flipped
1446 [out,i:] 1, if the image is flipped.
1447 .fi
1448 .na
1449 .B
1450 fresh
1451 [in,out,i:,experimental] 1 if the image was loaded, before all autocommands (autocmd) execution.
1452 .fi
1453 .na
1454 .B
1455 height
1456 [out,i:] the current image original height.
1457 .fi
1458 .na
1459 .B
1460 mirrored
1461 [out,i:] 1, if the image is mirrored.
1462 .fi
1463 .na
1464 .B
1465 negated
1466 [out,i:] 1, if the image is negated.
1467 .fi
1468 .na
1469 .B
1470 page
1471 [out,experimental,g:] the current page.
1472 .fi
1473 .na
1474 .B
1475 pages
1476 [out,experimental,i:] the current number of pages of an image.
1477 .fi
1478 .na
1479 .B
1480 random
1481 [out] a pseudorandom number.
1482 .fi
1483 .na
1484 .B
1485 scale
1486 [in,i:] the scale of the current image.
1487 .fi
1488 .na
1489 .B
1490 sheight
1491 [out,i:] the current image scaled height.
1492 .fi
1493 .na
1494 .B
1495 swidth
1496 [out,i:] the current image scaled width.
1497 .fi
1498 .na
1499 .B
1500 width
1501 [out,i:] the current image original width.
1502 .fi
1503 .SH DEFAULT ALIASES REFERENCE
1504 Hardcoded aliases are:
1505
1506 .fi
1507 alias
1508 .B
1509 "A"
1510 "_autotop=1-_autotop;"
1511 .fi
1512 alias
1513 .B
1514 "magnify"
1515 "scale '+'" # magnify the displayed image by the _magnify_factor variable or \fR\fI{args}\fR
1516 .fi
1517 alias
1518 .B
1519 "next"
1520 "goto '+1'" # go to the next page or file
1521 .fi
1522 alias
1523 .B
1524 "next_file"
1525 "goto '+1f'" # go to the next file in the list
1526 .fi
1527 alias
1528 .B
1529 "next_page"
1530 "goto '+1p'" # go to the next page in the file
1531 .fi
1532 alias
1533 .B
1534 "prev"
1535 "goto '-1'" # go to the previous page or file
1536 .fi
1537 alias
1538 .B
1539 "prev_file"
1540 "goto '-1f'" # go to the previous file in the list
1541 .fi
1542 alias
1543 .B
1544 "prev_page"
1545 "goto '-1p'" # go to the previous page in the file
1546 .fi
1547 alias
1548 .B
1549 "reduce"
1550 "scale '-'" # reduce the displayed image by _reduce_factor or \fR\fI{args}\fR
1551 .fi
1552 alias
1553 .B
1554 "scale_factor_decrease"
1555 "scale '+-'" # subtract _scale_factor_delta to the scale factors _reduce_factor and _magnify_factor
1556 .fi
1557 alias
1558 .B
1559 "scale_factor_grow"
1560 "scale '+*'" # multiply the scale factors _reduce_factor and _magnify_factor by _scale_factor_multiplier
1561 .fi
1562 alias
1563 .B
1564 "scale_factor_increase"
1565 "scale '++'" # add _scale_factor_delta to the scale factors _reduce_factor and _magnify_factor
1566 .fi
1567 alias
1568 .B
1569 "scale_factor_shrink"
1570 "scale '+/'" # divide the scale factors _reduce_factor and _magnify_factor by _scale_factor_multiplier
1571 .fi
1572
1573 .fi
1574 They can be redefined with
1575 .B alias
1576 or deleted with the
1577 .B unalias
1578 command.
1579 .fi
1580 Further default aliases are usually loaded at startup -- see the CONFIGURATION FILE EXAMPLE section below.
1581 .SH COMMAND LINE USAGE EXAMPLES
1582 .nf
1583 # jump to the third image:
1584 3;
1585 # jump to first image:
1586 ^;
1587 # jump to last image:
1588 $;
1589 # magnify the image two times:
1590 *2;
1591 # scale the image to the 30% of the original:
1592 30%;
1593 # scale the image up by 30%:
1594 +30%;
1595 # scale the image down by 30%:
1596 -30%;
1597 # jump to the next image whose filename matches the ".*jpg" regular expression:
1598 /.*jpg;
1599 # execute the "date" system command
1600 !"date";
1601
1602 .SH CONFIGURATION FILE EXAMPLE
1603 Part of the default configuration comes from the \fB_fim_default_config_file_contents\fP variable, shown here.
1604 .nf
1605 One can skip its loading by using the \fB_no_default_configuration\fP variable.
1606
1607 .nf
1608 # $LastChangedDate: 2024-05-15 01:34:42 +0200 (Wed, 15 May 2024) $
1609 # Contents of the default 'fimrc' file, hardcoded in the fim executable.
1610 # Read the documentation (man fimrc) to discover how to change this default hardcoded file and how to make your own.
1611 # Note that usually a ~/.fimrc file is read after these options take effect, so you could reset all of this with ease.
1612 # Lines beginning with a pound (#) are ignored by fim (they are treated as comments).
1613 #
1614 # Internal variables.
1615 # Some of these variables influence fim's behaviour (input variables), some are set by fim (output variables).
1616 # It is wise the input variables are set at the beginning of the file, so the bottom may issue commands correctly affected by them.
1617 if(_cache_control==''){_cache_control='m';}
1618 if(_debug_commands==''){_debug_commands='';}
1619 if(_command_expansion==''){_command_expansion=1;}
1620 if(_display_status==''){_display_status=0;}
1621 if(_max_cached_images==''){_max_cached_images=5;}
1622 if(_min_cached_images==''){_min_cached_images=4;}
1623 if(_max_cached_memory==''){_max_cached_memory=81920;}
1624 if(_max_iterated_commands==''){_max_iterated_commands=100;}
1625 if(_want_prefetch==''){_want_prefetch=1;}
1626 if(_no_external_loader_programs==''){_no_external_loader_programs=0;}
1627 if(_scale_style==''){_scale_style='b';}
1628 if(_save_fim_history==''){_save_fim_history=1;}
1629 if(_load_fim_history==''){_load_fim_history=1;}
1630 if(_verbose_keys==''){_verbose_keys=0;}
1631 if(_display_busy==''){_display_busy=1;}
1632 if(_ignorecase==''){_ignorecase=1;}
1633 if(_re_search_opts==''){_re_search_opts='biD';}
1634 if(_console_offset==''){_console_offset=0;}
1635 if(_console_key==''){_console_key=58;}
1636 if(_display_as_binary==''){_display_as_binary=0;}
1637 if(_push_checks==''){_push_checks=1;}
1638 #if(_want_wm_caption_status==''){_want_wm_caption_status=0;}
1639 if(_want_exif_orientation==''){_want_exif_orientation=1;}
1640 if(ascale==''){ascale="1.0";}
1641 if(_use_mipmaps==''){_use_mipmaps=1;}
1642 if(_downscale_huge_at_load==''){_downscale_huge_at_load=1;}
1643 if(_scroll_skip_page_fraction==''){_scroll_skip_page_fraction=0;}
1644 if(_want_wm_mouse_ctrl==''){_want_wm_mouse_ctrl="'pP+a-=nN";}
1645 if(_slideshow_sleep_time==''){_slideshow_sleep_time=1;}
1646 #
1647 # External variables (not used internally).
1648 if(allow_round_scroll==''){allow_round_scroll=0;}
1649 if(console_scroll_n==''){console_scroll_n=3;}
1650 #
1651 alias "toggleautoflip" "_autoflip=1-_autoflip" "";
1652 alias "toggleautonegate" "_autonegate=1-_autonegate" "";
1653 alias "toggleflip" "i:flipped=1-i:flipped" "toggles flipped property on the current image";
1654 alias "flip" "toggleflip;redisplay" "flip the current image along the horizontal axis";
1655 alias "fliponce" "flip;toggleflip" "flip, but just for one display";
1656 alias "toggleautomirror" "_automirror=1-_automirror" "";
1657 alias "togglemirror" "i:mirrored=1-i:mirrored" "toggles mirrored property on the current image";
1658 alias "mirror" "togglemirror;redisplay" "mirror the image along the vertical axis" "";
1659 alias "mirroronce" "mirror;togglemirror" "mirror, but just for one display";
1660 alias 'toggleLimitMarked' '__pre_limit_fileindex=_fileindex;_limit_mode=1-_limit_mode; if(_limit_mode==1){limit "!";} else { limit; } if(_filelistlen<1){_limit_mode=0;limit;goto __pre_limit_fileindex;} i:fresh=1;redisplay; ' "toggle between limiting file list to the marked files and the full list";
1661 alias "unlimit" "limit;i:fresh=1;reload;redisplay" "calling limit with no arguments restores the original list";
1662 #alias 'mark_current_file' '_markedfile=i:_filename';
1663 #alias 'goto_marked_file' 'goto "?"._markedfile';
1664 alias 'mark_current_file' '_markedfile=_fileindex'; # Note: temporary; _markedfile undocumented.
1665 alias 'goto_marked_file' 'goto _markedfile'; # Note: temporary.
1666 # Warning : binding to C-s, C-z and C-c won't make effect, as these
1667 # codes are get caught by the console driver and will have no effect in fim.
1668 # Moreover, C-z will crash fim and C-c will terminate it.
1669 # Some other combinations (e.g.:C-l) may have similar problems in your console.
1670 bind 'f' "flip";
1671 bind 'F' "fliponce";
1672 bind 'm' "mirror";
1673 bind 'M' "mirroronce";
1674 bind 'q' "quit";
1675 bind 'Esc' "quit";
1676 #bind 'n' "next_file";
1677 #bind 'n' "next";
1678 bind 'C-h' "help";
1679 #bind '?' "help"; # assigned to back-search
1680 #bind '/' "help"; # assigned to forward-search
1681 bind '=' "scale '100%'";
1682 #bind 'p' "prev_file";
1683 #alias 'list_remove_and_reload' "list 'remove';reload"; # once menus commands can support ;, remove this
1684 bind 'Del' "list 'remove';reload"; # no quit on last file
1685 #bind 'Del' "list_remove_and_reload"; # no quit on last file
1686 #bind 'Del' "if(_filelistlen<2)quit;list 'remove';reload;"; # quit if no files left
1687 #bind 's' "list 'sort'";
1688 bind ' ' "scroll 'forward'";
1689 bind 'S' "toggleDisplayStatus";
1690 bind 'I' "toggleautonegate";
1691 bind 'i' "color 'negate';redisplay";
1692 bind 'g' "color 'desaturate';redisplay";
1693 bind '[' 'font_reduce;redisplay';
1694 bind ']' 'font_magnify;redisplay';
1695 bind '|' 'toggle_font_auto_scale;redisplay';
1696 bind '{' 'font "prev";redisplay';
1697 bind '}' 'font "next";redisplay';
1698 bind 'G' "toggleDesaturate";
1699 bind 'r' "rotate90";
1700 bind 'R' "rotate270";
1701 bind '+' "magnify";
1702 bind 'a' "scale 'a'";
1703 bind 'H' "scale 'H'";
1704 bind 'Tab' "toggleVerbosity";
1705 bind 'Menu' "toggleVerbosity";
1706 bind 'v' "toggleDisplayStatus";
1707 bind 'A' "A";
1708 #bind 'C-m' "list 'mark'";
1709 bind 'C-m' "mark_current_file";
1710 bind 'C-j' "goto_marked_file";
1711 bind 'u' "list 'unmark'";
1712 bind 'Enter' "list 'mark';goto _lastgotodirection";
1713 bind '-' "reduce";
1714 bind "Up" "pan_up";
1715 bind 'k' "pan_up";
1716 bind "Right" "pan_right";
1717 bind 'l' "pan_right";
1718 bind "Down" "pan_down";
1719 bind 'j' "pan_down";
1720 bind "Left" "pan_left";
1721 bind 'h' "pan_left";
1722 bind 't' "align 'top'";
1723 bind 'C-g' "system 'fbgrab' 'fim_'._device_string.'.png'"; # grab a screenshot
1724 #bind 'C-r' "recording 'start'";
1725 bind 'C-r' "reload ''";
1726 bind 'Q' "recording 'stop'";
1727 bind 'D' "recording 'dump'";
1728 bind 'E' "recording 'execute'";
1729 bind 'C-e' "recording 'execute'";
1730 bind 'C-x' "recording 'execute'";
1731 bind '.' "recording 'repeat_last'";
1732 bind '`' "toggleLimitMarked";
1733 alias "toggleVerbosity" "_display_console=1-_display_console;i:fresh=1;redisplay" "";
1734 alias "toggleKeyVerbosity" "_verbose_keys=1-_verbose_keys;redisplay" "";
1735 alias "toggleDesaturate" "_autodesaturate=1-_autodesaturate;redisplay" "";
1736 alias "idempotent_cmd" "goto ''";
1737 #
1738 # Autocommands examples:
1739 #autocmd "PostInteractiveCommand" "fim.png" "echo '\\nmatched an interactive command on fim.png\\n'";
1740 #autocmd "PostDisplay" ".*png" "echo 'this is a png file'";
1741 #autocmd "PostDisplay" ".*jpg" "echo 'this is a jpg file'";
1742 #autocmd "PostDisplay" "" "echo '\\nthis is a file\\n'";
1743 #autocmd "PostGoto" "" "set_interactive_mode";
1744 autocmd "PostGoto" "" "reload";
1745 autocmd "PostWindow" "" "i:fresh=1;redisplay;";
1746 autocmd "PreRedisplay" "" "i:_will_display=1";
1747 autocmd "PreRedisplay" "" "if(_scale_style!='' && i:fresh){i:fresh=0;scale _scale_style ;i:fresh=0;}";
1748 autocmd "PostRedisplay" "" "i:_will_display=0";
1749 # Display device specific config
1750 alias "aalib_fix_do" "{if(aascale==''){ascale='2.0';}else{ascale=aascale;} i:fresh=1;display;if(_TERM=~'screen'){echo 'Detected screen+aalib: key bindings may not work as intended.'}}" "See aalib_fix.";
1751 alias "aalib_fix" "if(_device_string=~'^aa'){aalib_fix_do;scale 'a';}" "When using the aalib (ASCII art) library we face a problem: glyph proportions are seldom square (as pixels are), and are tricky to detect; for this reason, we need to reshape the image with respect to the font ratio, but we have to make a guess in the scaling factor to compensate. If at runtime a better value is known for the terminal font height/with ratio, it may be fed in the 'aascale' variable for an accurate scaling.";
1752 alias "cacalib_fix_do" "{if(cacascale==''){ascale='1.18';}else{scale=cacascale;} i:fresh=1;display;if(_TERM=~'screen'){echo 'Detected screen+cacalib: key bindings may not work as intended.'}}" "See cacalib_fix.";
1753 alias "cacalib_fix" "getenv 'DISPLAY';if(_device_string=~'^ca' && ENV_DISPLAY==''){cacalib_fix_do;scale 'a';}" "When using the libcaca (Coloured ASCII art) library we face a problem: glyph proportions are seldom square (as pixels are), and are tricky to detect; for this reason, we need to reshape the image with respect to the font ratio, but we have to make a guess in the scaling factor to compensate. If at runtime a better value is known for the terminal font height/with ratio, it may be fed in the 'cacascale' variable for an accurate scaling.";
1754 autocmd "PostReload" "" "aalib_fix";
1755 autocmd "PostLoad" "" "aalib_fix";
1756 autocmd "PostReload" "" "cacalib_fix";
1757 autocmd "PostLoad" "" "cacalib_fix";
1758 alias "refresh" "desc 'reload';redisplay;" "reloads and displays image description";
1759 bind "F5" "refresh";
1760 alias "toggle_fullscreen" "if( (_device_string=~'^sdl' || _device_string=~'^gtk' ) && !_fullscreen){_old_sw=_screen_width;_old_sh=_screen_height;display 'reinit' 'mW0:0';_fullscreen=1;}else if( (_device_string=~'^sdl' || _device_string=~'^gtk' ) && _old_sw*_old_sh*_fullscreen){display 'reinit' 'rwm'._old_sw.':'._old_sh;_fullscreen=0;}_gtk_fullscreen=_fullscreen;" "Toggles full screen. Will show mouse cursor in full screen.";
1761 alias "_gtk_check_for_toggle_fullscreen" "if( _device_string=~'^gtk' && _gtk_fullscreen != _fullscreen){toggle_fullscreen;}";
1762 alias "_gtk_check_for_toggle_gtk_menus" "if(_device_string=~'^gtk'){if(_hide_gtk_menus){display 'reinit' 'b';}else{display 'reinit' 'B';}}";
1763 bind "F11" "toggle_fullscreen";
1764
1765 autocmd "PostReload" "" "i:fresh=1" ;
1766 autocmd "PostScale" "" "if(0==i:_will_display){i:fresh=1;display;}" ;
1767 autocmd "PostPan" "" "{i:fresh=1;display;}" ;
1768 #autocmd "PostReload" "pdf|ps|djvu|dvi" "scale 'w';align 'top'";
1769 autocmd "PostReload" "" "if(i:fresh){redisplay;}";
1770 autocmd "PostInteractiveCommand" "" "if(i:fresh){display;i:fresh=0;}";
1771 autocmd "PostInteractiveCommand" "" "if(_want_prefetch>0){prefetch;}";
1772 autocmd "PostInteractiveCommand" "" "if(_display_console==0 && i:fresh){redisplay;i:fresh=0;}";
1773 autocmd "PostInteractiveCommand" "" "idempotent_cmd"; # Bug workaround: without it console scroll is broken.
1774 autocmd "PostInteractiveCommand" "" "_gtk_check_for_toggle_gtk_menus;_gtk_check_for_toggle_fullscreen";
1775
1776 #alias "next10" "i=0;while(i<10){i=i+1;next;display;sleep '1';}" "goes forward 10 images";
1777 #alias "prev10" "i=0;while(i<10){i=i+1;prev;display;sleep '1';}" "goes backward 10 images";
1778 bind 'N' "goto '+1p' '+museum|series|city|category|artist+' '+/S' '+10';" "goto by jump or category or directory or just ahead";
1779 bind 'P' "goto '-1p' '-museum|series|city|category|artist+' '-/S' '-10';" "goto by jump or category or directory or just back ";
1780 bind 'C-n' "goto '+//'";
1781 bind 'C-p' "goto '-//'";
1782 bind 'C-b' "goto '-//'"; # Warning: many configurations cannot detect C-b.
1783 bind 'W' "display 'resize'" "if supported, resizes the window to match the current image pixels size";
1784 #bind 'C-w' "scale '100%';display 'resize'" "if supported, scales the image to 100% and resizes the window to match its size (if fits)";
1785 bind 'C-w' "if(_scale_style!='w'){_scale_style='w';scale 'w';}else{_scale_style='';scale '100%';}" "scale to width";
1786 alias "endless_slideshow" "while(1){display;sleep _slideshow_sleep_time;next;}" "performs an automated slideshow, endlessly";
1787 alias "bookview" "while(1){display;sleep '2';scroll 'down';}" "";
1788 alias "comicview" "while(1){display;sleep '2';scroll 'down';}" "";
1789 alias "read" "while(1){display;sleep '2';scroll 'forward';}" "";
1790 alias "slowread" "while(_fileindex<=_filelistlen-1){display;sleep '2';scroll 'forward';}" "loop once slowly";
1791 alias "fastread" "while(_fileindex<=_filelistlen-1){display;sleep '0.1';scroll 'forward';}" "proceeds like in a book but very fast, once";
1792 alias "pornview" "echo 'press any key repeatedly to terminate' ;endless_slideshow" "enters an endless slideshow (alias name from an actual image viewer)";
1793 autocmd "PreExecutionCycle" "/fbps-" "_display_busy=0;_display_status=0" ;
1794 autocmd "PreExecutionCycle" "" "i:fresh=1;reload";
1795 autocmd "PreExecutionCycle" "/fbps-.*ps001.png" "i:fresh=1;redisplay";
1796 ## Example in imposing a file loader to an extension:
1797 #autocmd "PreReload" ".*mtx.gz" "_file_loader='MatrixMarket'";
1798 #autocmd "PostReload" ".*mtx.gz" "_file_loader=''";
1799 bind '*' "_display_console=0;toggleVerbosity;echo i:*";
1800 bind 'w' "scale 'w'";
1801 bind '<' "rotate10_ccw;display";
1802 bind '>' "rotate10;display";
1803 bind '_' "_scale_style='';scale '100%'";
1804 bind ',' "_display_console=1;echo _last_system_output";
1805 bind 'C-a' "if(_scale_style!='a'){_scale_style='a';scale 'a';}else{_scale_style='';scale '100%';}" "scale to height";
1806 #
1807 alias "pan_nw" "pan 'nw'" "pans the image to the upper left";
1808 alias "pan_ne" "pan 'ne'" "pans the image to the upper right";
1809 alias "pan_se" "pan 'se'" "pans the image to the lower left";
1810 alias "pan_sw" "pan 'sw'" "pans the image to the lower right";
1811 alias "pan_down" "if(_display_console==0){pan 'down';}else{scd;}" "pans the image down / scrolls console down";
1812 alias "pan_up" "if(_display_console==0){pan 'up' ;}else{scu;}" "pans the image up / scrolls console up";
1813 alias "pan_left" "pan 'left'" "pans the image left";
1814 alias "pan_right" "pan 'right'" "pans the image right";
1815 alias "diagonal_nw" "pan_nw" "pans the image to the upper left";
1816 alias "diagonal_ne" "pan_ne" "pans the image to the upper right";
1817 alias "diagonal_se" "pan_se" "pans the image to the lower left";
1818 alias "diagonal_sw" "pan_sw" "pans the image to the lower right";
1819 bind 'd' "diagonal_nw";
1820 bind 'D' "diagonal_se";
1821 bind 'x' "diagonal_ne";
1822 bind 'X' "diagonal_sw";
1823 alias "toggleDisplayStatus" "_display_status=1-_display_status;redisplay" "";
1824 alias "toggleDisplayBusy" "_display_busy=1-_display_busy" "";
1825 alias "sort" "list 'sort'" "sorts the files list ordered";
1826 bind 'o' "sort";
1827 bind 'b' "prev";
1828 bind 'B' "toggleDisplayBusy";
1829 alias "random_slideshow" "while(1){display;sleep _slideshow_sleep_time; eval 'r=random';goto r;}" "performs a shuffled slideshow, endlessly";
1830 alias "rotate90_ccw" "i:_orientation=i:_orientation+3;i:fresh=1;redisplay" "rotate 90 degrees counter clockwise";
1831 alias "rotate90_cw" "i:_orientation=i:_orientation+1;i:fresh=1;redisplay" "rotate 90 degrees clockwise";
1832 alias "rotate180" "i:_orientation=i:_orientation+2;i:fresh=1;redisplay" "rotate 180 degrees";
1833 alias "rotate90" "rotate90_cw;display" "rotate 90 degrees clockwise";
1834 alias "rotate270" "rotate90_ccw;display" "rotate 90 degrees counter clockwise";
1835 alias "rotate10" "rotate '10';display" "rotate 10 degrees counter clockwise";
1836 alias "rotate10_ccw" "rotate -10 ;display" "rotate 10 degrees clockwise";
1837
1838 bind 'K' 'if(_display_console==0){echo i:_filename.": ".i:_comment;toggleVerbosity}else{toggleVerbosity;}';
1839 bind 'C-k' 'crop' # still experimental
1840
1841 alias 'cache' 'echo _cache_status' "displays cached images status";
1842 bind 'c' 'align "center"';
1843 alias 'widen' 'i:ascale=i:ascale*"1.1";*1.0' "widen the current image";
1844 alias 'narrow' 'i:ascale=i:ascale/"1.1";*1.0' "narrow the current image";
1845 bind 'y' "widen" "widen horizontally the image";
1846 bind 'Y' "narrow" "shrink horizontally the image";
1847 alias 'console_scroll_up' 'if(_console_offset<_console_lines+console_scroll_n-_rows){_console_offset=_console_offset+console_scroll_n;}' "scrolls up the virtual console";
1848 alias 'console_scroll_down' 'if(allow_round_scroll || (_console_offset>=console_scroll_n)){_console_offset=_console_offset-console_scroll_n;}' "scrolls down the virtual console";
1849 alias 'console_scroll_reset' '{_console_offset=0;}';
1850 alias 'scu' 'console_scroll_up' "";
1851 alias 'scd' 'console_scroll_down' "";
1852 alias 'scz' 'console_scroll_reset' "";
1853 alias 'center' 'align "center"';
1854 alias 'left' 'align "left"';
1855 alias 'right' 'align "right"';
1856 alias 'top' 'align "top"';
1857 alias 'bottom' 'align "bottom"';
1858 alias "font_magnify_auto" "if(_fbfont_as_screen_fraction>1){_fbfont_as_screen_fraction=_fbfont_as_screen_fraction-1;}else{_fbfont_as_screen_fraction=_screen_width/100+_screen_height/100;}" "";
1859 alias "font_magnify_manual" "_fbfont_magnify_factor=_fbfont_magnify_factor+1" "";
1860 alias "font_reduce_auto" "if(_fbfont_as_screen_fraction>1){_fbfont_as_screen_fraction=_fbfont_as_screen_fraction+1;}" "";
1861 alias "font_reduce_manual" "_fbfont_magnify_factor=_fbfont_magnify_factor-1" "";
1862 alias "toggle_font_auto_scale" "if(_fbfont_as_screen_fraction<0){_fbfont_as_screen_fraction=0;echo 'Auto font scaling on.';}else{_fbfont_as_screen_fraction=-1;echo 'Auto font scaling off.';}" "toggles between manual and auto font scaling control";
1863 alias 'next_file_same_search' "goto '+//';" "go to next file with same search criteria";
1864 alias 'next_file_dir_same' "goto '+/s';" "go to next file in same dir";
1865 alias 'next_file_dir_other' "goto '+/S';" "go to next file in other dir";
1866 alias 'next_file_dir_up' "goto '+/u';" "go to next file up the dir hierarchy";
1867 alias 'next_file_dir_down' "goto '+/d';" "go to next file down the dir hierarchy";
1868 alias 'next_file_same_basename' "goto '+/b';" "go to next file with same basename";
1869 alias 'prev_file_dir_same' "goto '-/s';" "go to prev file in same dir";
1870 alias 'prev_file_dir_other' "goto '-/S';" "go to prev file in other dir";
1871 alias 'prev_file_dir_up' "goto '-/u';" "go to prev file up the dir hierarchy";
1872 alias 'prev_file_dir_down' "goto '-/d';" "go to prev file down the dir hierarchy";
1873 alias 'prev_file_same_basename' "goto '-/b';" "go to prev file with same basename";
1874 #alias "font_magnify" "if(_fbfont_as_screen_fraction<0) {font_magnify_manual;}else{font_magnify_auto;}" "increase font size (either relative or absolute)";
1875 #alias "font_reduce" "if(_fbfont_as_screen_fraction<0) {font_reduce_manual;} else{font_reduce_auto;}" "increase font size (either relative or absolute)";
1876 alias "font_magnify" "_fbfont_as_screen_fraction=-1;font_magnify_manual" "increase absolute font size and set manual font control";
1877 alias "font_reduce" "_fbfont_as_screen_fraction=-1;font_reduce_manual" "decrease absolute font size and set manual font control";
1878 bind "PageUp" "if(_display_console==0){prev;}else{scu;}";
1879 bind "PageDown" "if(_display_console==0){next;}else{scd;}";
1880 bind "Home" "0;";
1881 bind "End" "$;";
1882 bind "^" "0;";
1883 bind "$" "$;";
1884 #bind "Backspace" "prev"; # console code for C-h and Backspace is the same :-)
1885 bind "'" "goto _lastfileindex.'f'.(_lastpageindex+1).'p'";
1886 bind '"' "scale 'shadow';i:fresh=1;redisplay;";
1887 bind '(' "goto '^p'";
1888 bind ')' "goto '$p'";
1889 bind 'Z' "sleep 1";
1890 _display_status=1; # lower status line
1891 _want_wm_caption_status="fim:%N@%p%%%L[%i/%l]";
1892 _caption_over_image_fmt="%?_comment?%:_comment:?";
1893 _info_fmt_str="%p%% %wx%h%L %i/%l%P %F %T %c"; # lower right line part
1894 #_display_status_fmt="%N:%k"; #
1895 _display_status_fmt="%N%?EXIF_DateTimeOriginal?[%:EXIF_DateTimeOriginal:]?%?EXIF_ExposureTime?[%:EXIF_ExposureTime:]?%?EXIF_FNumber?[%:EXIF_FNumber:]?%?EXIF_ApertureValue?[%:EXIF_ApertureValue:]?%?EXIF_ISOSpeedRatings?[ISO%:EXIF_ISOSpeedRatings:]?%?_markedfile?[mark on %:_markedfile:]?:%k"; # lower left line part
1896 # funny aliases:
1897 alias "webcam" "pread 'vgrabbj -d /dev/video0';$" "say cheese";
1898 alias 'espeak' 'system \e'espeak\e' i:_filename." ".i:_comment' 'say something';
1899 #_fbfont_as_screen_fraction=-1; # disable auto font scaling
1900 if( _device_string=~'^gtk[^e]*$' ) {
1901 alias "man_fim" "system 'man' 'fim'; _display_console=0;toggleVerbosity;";
1902 alias "man_fimrc" "system 'man' 'fimrc';_display_console=0;toggleVerbosity;";
1903 alias '_rebuild_menus' 'display "reinit" "f";';
1904 alias '_rebuild_quieter_menus' '_debug_commands=_debug_commands-"m";display "reinit" "fV";'; # remove "m" occurrences from _debug_commands and rebuild
1905 alias '_rebuild_verboser_menus' '_debug_commands=_debug_commands."m";_rebuild_menus;';
1906 alias '_rebuild_verbosest_menus' '_debug_commands=_debug_commands."mm";_rebuild_menus;';
1907 alias 'toggle_gtk_menus' 'if(!_hide_gtk_menus){_hide_gtk_menus=1;}else{_hide_gtk_menus=0;}';
1908 autocmd "PreInteractiveCommand" "" "if(__internal_state_changed){_rebuild_menus;__internal_state_changed=0;}";
1909 autocmd "PostInteractiveCommand" "" "if(__internal_state_changed){_rebuild_menus;__internal_state_changed=0;}";
1910 autocmd "PreExecutionCycle" "" "if(__internal_state_changed){_rebuild_menus;__internal_state_changed=0;}";
1911 display "menuadd"
1912 "_File/"
1913 "_File/_Open file open C-o"
1914 "_File/Open _directory open_dir "
1915 "_File/_Next file or page next "
1916 "_File/_Next file next_file "
1917 "_File/_Next in other directory next_file_dir_other"
1918 "_File/_Next in this directory next_file_dir_same"
1919 # "_File/_Next as last search goto +\/\/ " # Note that slashes are not supported currently.
1920 "_File/_Next as last search next_file_same_search "
1921 "_File/_Go back to last file goto _lastfileindex "
1922 "_File/_Previous in list prev p"
1923 # "_File/Remove from list list 'pop'"
1924 # "_File/Remove from list list_remove_and_reload "
1925 "_File/Remove from list list 'remove';reload "
1926 "_File/Mark list 'mark'"
1927 "_File/Unmark list 'unmark'"
1928 "_File/_Quit quit q"
1929 "_List/Show list"
1930 "_List/_Limit FimMenuLimit/"
1931 "_List/Limit to.../files sized as current one limit '~z'" # TODO: need a test listing effective menu defs
1932 "_List/Limit to.../files dated as current one limit '~d'"
1933 "_List/Limit to.../files with duplicate basename limit '~='"
1934 "_List/_Unlimit list (reset) unlimit u"
1935 "_List/Reverse list 'reverse' "
1936 "_List/Sort by name list 'sort' "
1937 "_List/Sort by size list 'sort_fsize' "
1938 "_List/Sort by time list 'sort_mtime' "
1939 "_List/Shuffle randomly list 'random_shuffle' "
1940 "_List/Mark all list 'markall' "
1941 "_List/Slideshow/Random random_slideshow "
1942 "_List/Slideshow/Endless endless_slideshow "
1943 "_List/Slideshow/Slideshow time: 0 s _slideshow_sleep_time=0 0.5 s _slideshow_sleep_time=0.5 1 s _slideshow_sleep_time=1 2 s _slideshow_sleep_time=2 3 s _slideshow_sleep_time=3 "
1944 "_List/Slideshow/Stop _stop_slideshow=1 "
1945 "_List/Slideshow/Slow read slowread "
1946 "_List/Slideshow/Fast read fastread "
1947 "_View/ Automirror toggle||_automirror||1||0 " # ' ' as external separator, || as internal separator
1948 "_View/||Autoflip||toggle.._autoflip..1..0||" # || as external separator, .. as internal separator
1949 # "_View/Scale: _auto _scale_style=a a Scale: by _hand (manual) _scale_style=m m Scale: by _width _scale_style=w w Scale: by _height _scale_style=h h"
1950 "_View/**Scale: 1x**_scale_style= ** **Scale: _auto**_scale_style=a**a**Scale: _auto (till 100%)**_scale_style=b**b**Scale: by _hand (manual)**_scale_style=m**m**Scale: by window _width**_scale_style=w**w**Scale: by window _height**_scale_style=h**h"
1951 "_View/Orientation: normal _orientation=0 Orientation: 90'right _orientation=1 Orientation: upside down _orientation=2 Orientation: 90' left _orientation=3 "
1952 "_View/Desaturate toggle___autodesaturate__1__0 "
1953 "_View/Autonegate toggle___autonegate__1__0 "
1954 "_View/Vertical scroll/** Default steps: auto**_vsteps=****10%**_vsteps=10%****20%**_vsteps=20%****50%**_vsteps=50%****100%**_vsteps=100%**"
1955 "_View/Vertical scroll/** Skip page fraction if smaller than ...auto**_scroll_skip_page_fraction=****disabled**_scroll_skip_page_fraction=-1****1/8**_scroll_skip_page_fraction=8****1/16**_scroll_skip_page_fraction=16**"
1956 "_View/Refresh description & co refresh "
1957 "_View/||Apply EXIF Orientation||toggle.._want_exif_orientation..1..0||"
1958 "_Image/_Mirror toggle__i:mirrored__1__0 m"
1959 "_Image/_Flip toggle&&i:flipped&&1&&0 f" # && as internal separator
1960 # "_Image Extras/_Let's Flip again toggle&&i:flipped&&1&&0 f" # && as internal separator TODO togli
1961 "_Image/Orientation: normal i:_orientation=0 Orientation: 90'right i:_orientation=1 Orientation: upside down i:_orientation=2 Orientation: 90' left i:_orientation=3 "
1962 "_Image/EXIF Orientation: normal i:_exif_orientation=0 EXIF Orientation: 90'right i:_exif_orientation=1 EXIF Orientation: upside down i:_exif_orientation=2 EXIF Orientation: 90' left i:_exif_orientation=3 " # previously __exif_orientation but renamed for the double-symbol-separator convention
1963 "_Window/_Fullscreen toggle**_gtk_fullscreen**1**0 F11"
1964 "_Window/Hide the menu bar (press mouse button to restore) toggle_gtk_menus"
1965 # "_Window/Hide menu bar (press mouse button to restore) toggle||_hide_gtk_menus||0||1" # not yet ready to replace toggle_gtk_menus
1966 "_Window/Resize window to image size display 'resize'"
1967 "_Window/Text size reduce font_reduce"
1968 "_Window/Text size magnify font_magnify"
1969 "_Window/Text font: next font 'next'"
1970 "_Window/Text font: prev font 'prev'"
1971 "_Window/Show status line toggle||_display_status||1||0 "
1972 "_Window/Caption over image: None _caption_over_image=0 Caption over image: No background _caption_over_image=1 Caption over image: Black background _caption_over_image=2 Caption over image: Above image, no overlap _caption_over_image=3 "
1973 "_Window/Window caption: minimal _want_wm_caption_status=FIM Window caption: reasonable _want_wm_caption_status=fim:[%i/%l] Window caption: rich _want_wm_caption_status=fim:%N@%p%%%L[%i/%l]%?EXIF_DateTimeOriginal?[%:EXIF_DateTimeOriginal:]? "
1974 "_Window/Mouse click help grid: default _want_wm_mouse_ctrl='pP+a-=nN Mouse click help grid: simplified _want_wm_mouse_ctrl=ppp+a-nnn "
1975 "_Advanced/Show output console (then hide with Tab) toggleVerbosity v"
1976 "_Advanced/Verbose keys toggle___verbose_keys__1__0 "
1977 "_Advanced/Low execution verbosity _debug_commands=0 Intermediate execution verbosity _debug_commands=ackCm High execution verbosity _debug_commands=ackCmmi "
1978 "_Advanced/Rebuild menus with no verbosity _rebuild_quieter_menus"
1979 "_Advanced/Rebuild menus with tooltips _rebuild_verboser_menus"
1980 "_Advanced/Rebuild menus very verbosely _rebuild_verbosest_menus"
1981 "_Advanced/Verbose menu toggle||_display_busy||1||0"
1982 "_Advanced/Downscale huge images on load toggle||_downscale_huge_at_load||1||0"
1983 "_Advanced/Background prefetch _want_prefetch=2 Foreground prefetch _want_prefetch=1 No prefetch _want_prefetch=0 "
1984 "_Custom actions/_Mark current file mark_current_file"
1985 "_Custom actions/_Go to marked file goto_marked_file"
1986 "_Custom actions/Webcam shot (needs vgrabbj) webcam"
1987 "_Custom actions/Say something (needs espeak) espeak"
1988 "_Custom actions/Max cached memory: 256MiB _max_cached_memory=262144 unlimited _max_cached_memory=0 very little _max_cached_memory=1 80MiB _max_cached_memory=81920 "
1989 "_Custom actions/Max cached images: unlimited _max_cached_images=0 5 _max_cached_images=5 10 _max_cached_images=10 100 _max_cached_images=100 "
1990 "_All actions/_Commands FimMenuCommands/"
1991 "_All actions/_Aliases FimMenuAliases/"
1992 "_All actions/_Key Bindings FimMenuKeyBindings/"
1993 "_All actions/_Variables FimMenuVariables/"
1994 "_Help/_Commands FimMenuCommandsHelp/"
1995 "_Help/_Aliases FimMenuAliasesHelp/"
1996 "_Help/_Key Bindings FimMenuKeyBindingsHelp/"
1997 "_Help/_Variables FimMenuVariablesHelp/"
1998 "_Help/_man FIM man_fim"
1999 "_Help/_man fimrc man_fimrc";
2000 #"_Custom actions/scaling: _auto _scale_style=a a scaling: _auto to original _scale_style=b b scaling: manual _scale_style=m m scaling: by _width _scale_style=w w" # copy for demo purposes
2001 #"_Custom actions/_Toggle flipped flag toggle__i:flipped__1__0 f"
2002 #"_Custom actions/_Submenu/_Frobnicate unmapped_cmd /"
2003 #"_Custom actions/_Submenu/_Defrobnicate unmapped_cmd u"
2004 #"_Custom actions/_Submenu/FimMenuLimit FimMenuLimit/"
2005 #"_Custom actions/_Submenu/_Do-frobnicate unmapped_cmd *" # bad specification
2006 #"_Custom actions/_Submenu/_Fribnikate frobnicate unmapped_cmd *" # bad specification
2007 #"_Custom actions/_Submenu/_Next next *" # bad specification
2008 #"_Custom actions/_Add menu... menu_dialog"
2009 #"_Custom actions/_Toggle full screen view toggle _gtk_fullscreen 1 0"
2010 if (_last_cmd_output!="") quit -1;
2011 }
2012 help ''; # WELCOME...
2013 # More examples:
2014 #alias "plisten" 'popen "nc -l -p 9999 "' "executes fim commands coming from port 9999 on this computer";
2015 #alias "wlisten" "while(1){sleep;plisten;}" "listen to a pipe, endlessly";
2016 #alias "musicplay" "system 'mpc' 'play'" "";
2017 #alias "musicpause" "system 'mpc' 'pause'" "";
2018 #alias "rdjpgcom" 'system "rdjpgcom" i:_filename';
2019 # offsetscan usage : need a mechanism for popping all images before.
2020 #alias "offsetscan" "while(i:width<1){list 'push' 'blob.jpg';stdout _open_offset ;_open_offset=_open_offset+1;reload;}";
2021 #alias "webcam_cycle" "while(1){webcam;reload;sleep 1;}";
2022 # This is a FIM initialization file.
2023 # Without it FIM cannot work like it should.
2024 # Feel free to modify it, but with caution!
2025
2026 .SH NOTES
2027 This manual page could be improved.
2028 Certain side effects of commands are not documented.
2029 Neither a formal description of the various commands.
2030 Interaction of commands and variables is also not completely documented.
2031 .SH BUGS
2032 The
2033 .B fim
2034 language shall be more liberal with quoting.
2035 .SH SEE ALSO
2036 \fR\fIfim\fR(1), \fR\fIfimgs\fR(1), \fR\fIregex\fR(1).
2037 .SH AUTHOR
2038 Michele Martone <dezperado _CUT_ autistici _CUT_ org>
2039 .SH COPYRIGHT
2040 See copyright notice in \fR\fIfim\fR(1).
2041
2042