]> git.phdru.name Git - dotfiles.git/blob - .mc/mc.ext
Refactor(.mc/mc.ext): Rename `include/msoffice` to `msoffice-doc`
[dotfiles.git] / .mc / mc.ext
1 # Midnight Commander 3.0 extension file
2 # Warning: Structure of this file has changed completely with version 3.0
3 #
4 # All lines starting with # or empty lines are thrown away.
5 # Lines starting in the first column should have following format:
6 #
7 # keyword/descNL, i.e. everything after keyword/ until new line is desc
8 #
9 # keyword can be:
10 #
11 #    shell (desc is, when starting with a dot, any extension (no wildcars),
12 #          i.e. matches all the files *desc . Example: .tar matches *.tar;
13 #          if it doesn't start with a dot, it matches only a file of that name)
14 #
15 #    regex (desc is an extended regular expression)
16 #          Please note that we are using the GNU regex library and thus
17 #          \| matches the literal | and | has special meaning (or) and
18 #          () have special meaning and \( \) stand for literal ( ).
19 #
20 #    type  (file matches this if `file %f` matches regular expression desc
21 #          (the filename: part from `file %f` is removed))
22 #
23 #    directory (matches any directory matching regular expression desc)
24 #
25 #    include (matches an include directive)
26 #
27 #    default (matches any file no matter what desc is)
28 #
29 # Other lines should start with a space or tab and should be in the format:
30 #
31 # keyword=commandNL (with no spaces around =), where keyword should be:
32 #
33 #    Open (if the user presses Enter or doubleclicks it),
34 #
35 #    View (F3), Edit (F4)
36 #
37 #    Include is the keyword used to add any further entries from an include/
38 #    section
39 #
40 # command is any one-line shell command, with the following substitutions:
41 #
42 # %% -> % character
43 # %p -> name of the current file (without path, but pwd is its path)
44 # %f -> name of the current file. Unlike %p, if file is located on a
45 #       non-local virtual filesystem, i.e. either tarfs or ftpfs,
46 #       then the file will be temporarily copied into a local directory
47 #       and %f will be the full path to this local temporal file.
48 #       If you don't want to get a local copy and want to get the
49 #       virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
50 #       use %d/%p instead of %f.
51 # %d -> name of the current directory (pwd, without trailing slash)
52 # %s -> "selected files", i.e. space separated list of tagged files if any
53 #       or name of the current file
54 # %t -> list of tagged files
55 # %u -> list of tagged files (they'll be untaged after the command)
56 #
57 # (If these 6 letters are in uppercase, they refer to the other panel.
58 # But you shouldn't have to use it in this file.)
59 #
60 #
61 # %cd -> the rest is a path mc should change into (cd won't work, since it's
62 #       a child process).  %cd handles even vfs names.
63 #
64 # %view -> the command you type will be piped into mc's internal file viewer
65 #       if you type only the %view and no command, viewer will load %f file
66 #       instead (i.e. no piping, so it is different to %view cat %f)
67 #       %view may be directly followed by {} with a list of any of
68 #       ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
69 #       text using backspace for bold and underscore) and unform
70 #       (no highlighting for nroff sequences) separated by commas.
71 #
72 # %var -> You use it like this: %var{VAR:default}.  This macro will expand
73 #       to the value of the VAR variable in the environment if it's set
74 #       otherwise the value in default will be used.  This is similar to
75 #       the Bourne shell ${VAR-default} construct.
76 #
77 # Rules are applied from top to bottom, thus the order is important.
78 # If some actions are missing, search continues as if this target didn't
79 # match (i.e. if a file matches the first and second entry and View action
80 # is missing in the first one, then on pressing F3 the View action from
81 # the second entry will be used. default should catch all the actions.
82 #
83 # Any new entries you develop for you are always welcome if they are
84 # useful on more than one system.  You can post your modifications
85 # as tickets at www.midnight-commander.org
86
87
88 ### Changes ###
89 #
90 # Reorganization: 2000-05-01 Michal Svec <rebel@penguin.cz>
91
92
93 ### TODO ###
94 #
95 # Postscript    Open: ps2svga [gs -DEVICE=jpeg|zgv or something]
96 # Images                asciiview
97 #
98 # All X Apps    [Nothing/Warning] if no DISPLAY
99 # Not found     [Default/Warning]
100 # Empty Output  [Default/Warning]
101 # Edit:         CopyOut+EDIT+CopyIn
102 # Security      Check gzip/bzip EDIT (mktemp)
103 #
104 # Maybe:        Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.
105
106
107 ### GIT Repo ###
108 # gitfs changeset
109 regex/^\[git\]
110         Open=%cd %p/changesetfs://
111         View=%cd %p/patchsetfs://
112
113 ### Archives ###
114
115 # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
116 regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk|\.gem$
117         Open=%cd %p/utar://
118         View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
119
120 regex/\.tar\.bz$
121         # Open=%cd %p/utar://
122         View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
123
124 regex/\.t(ar\.bz2|bz2?|b2)$
125         Open=%cd %p/utar://
126         View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
127
128 # .tar.lzma, .tlz
129 regex/\.t(ar\.lzma|lz)$
130         Open=%cd %p/utar://
131         View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
132
133 # .tar.xz, .txz
134 regex/\.t(ar\.xz|xz)$
135         Open=%cd %p/utar://
136         View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -
137
138 # .tar.F - used in QNX
139 regex/\.tar\.F$
140         # Open=%cd %p/utar://
141         View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -
142
143 # .qpr/.qpk - QNX Neutrino package installer files
144 regex/\.(qp[rk])$
145         Open=%cd %p/utar://
146         View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
147
148 # tar
149 regex/\.(tar|TAR)$
150         Open=%cd %p/utar://
151         View=%view{ascii} tar tvvf - < %f
152
153 # lha
154 type/^LHa\ .*archive
155         Open=%cd %p/ulha://
156         View=%view{ascii} lha l %f
157
158 # arj
159 regex/\.[aA]([rR][jJ]|[0-9][0-9])$
160         Open=%cd %p/uarj://
161         View=%view{ascii} unarj l %f
162
163 # cab
164 regex/\.([cC][aA][bB])$
165         Open=%cd %p/ucab://
166         View=%view{ascii} cabextract -l %f
167
168 # ha
169 regex/\.([Hh][Aa])$
170         Open=%cd %p/uha://
171         View=%view{ascii} ha lf %f
172
173 # rar
174 regex/\.[rR]([aA][rR]|[0-9][0-9])$
175         Open=%cd %p/urar://
176         View=%view{ascii} unrar v -c- %f
177
178 # ALZip
179 regex/\.(alz|ALZ)$
180         Open=%cd %p/ualz://
181         View=%view{ascii} unalz -l %f
182
183 # cpio
184 shell/.cpio.Z
185         Open=%cd %p/ucpio://
186         View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
187
188 shell/.cpio.xz
189         Open=%cd %p/ucpio://
190         View=%view{ascii} xz -dc %f | cpio -itv 2>/dev/null
191
192 shell/.cpio.gz
193         Open=%cd %p/ucpio://
194         View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
195
196 shell/.cpio
197         Open=%cd %p/ucpio://
198         View=%view{ascii} cpio -itv < %f 2>/dev/null
199
200 # ls-lR
201 regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
202         Open=%cd %p/lslR://
203
204 # patch
205 regex/\.(diff|patch)(\.bz2)$
206         Open=%cd %p/patchfs://
207         View=%view{ascii} bzip2 -dc %f 2>/dev/null
208
209 regex/\.(diff|patch)(\.(gz|Z))$
210         Open=%cd %p/patchfs://
211         View=%view{ascii} gzip -dc %f 2>/dev/null
212
213 regex/\.(diff|patch)$
214         Open=%cd %p/patchfs://
215         View=%view{ascii} /bin/cat %f 2>/dev/null
216
217 # ar library
218 regex/\.s?a$
219         Open=%cd %p/uar://
220         #Open=%view{ascii} ar tv %f
221         View=%view{ascii} file %f && nm -C %f
222
223 # trpm
224 regex/\.trpm$
225         Open=%cd %p/trpm://
226         View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
227
228 # RPM packages (SuSE uses *.spm for source packages)
229 regex/\.(src\.rpm|spm)$
230         Open=%cd %p/rpm://
231         View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
232
233 regex/\.rpm$
234         Open=%cd %p/rpm://
235         View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
236
237 # deb
238 regex/\.u?deb$
239         Open=%cd %p/deb://
240         View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
241
242 # dpkg
243 shell/.debd
244         Open=%cd %p/debd://
245         View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
246 # apt
247 shell/.deba
248         Open=%cd %p/deba://
249         View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
250
251 # ISO9660
252 regex/\.([iI][sS][oO](\.wv)?)$
253         Open=%cd %p/iso9660://
254         View=%view{ascii} isoinfo -l -i %f
255
256 # 7zip archives (they are not man pages)
257 regex/\.(7z|7Z)$
258         Open=%cd %p/u7z://
259         View=%view{ascii} 7za l %f 2>/dev/null
260
261 # Mailboxes
262 type/^ASCII\ mail\ text
263         Open=%cd %p/mailfs://
264
265
266 ### Sources ###
267
268 # C
269 shell/.c
270         Include=editor
271
272 # Fortran
273 shell/.f
274         Include=editor
275
276 # Header
277 regex/\.(h|hpp)$
278         Include=editor
279
280 # Asm
281 shell/.s
282         Include=editor
283
284 # C++
285 regex/\.(C|cc|cpp)$
286         Include=editor
287
288 include/editor
289         Open=%var{EDITOR:vi} %f
290
291 # .so libraries
292 regex/\.(so|so\.[0-9\.]*)$
293         View=%view{ascii} file %f && nm -C -D %f
294
295 # Object
296 type/^ELF
297         #Open=%var{PAGER:more} %f
298         View=%view{ascii} file %f && nm -C %f
299
300 ### Documentation ###
301
302 # Texinfo
303 #regex/\.(te?xi|texinfo)$
304
305 # GNU Info page
306 type/^Info\ text
307         Open=info -f %f
308
309 shell/.info
310         Open=info -f %f
311
312 # Exception: .3gp are video files not manual pages
313 regex/\.(3[gG][pP])$
314         Include=video
315
316 # Manual page
317 regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
318         Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
319         View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac
320
321 # Perl pod page
322 shell/.pod
323         Open=pod2man %f | nroff -c -Tlatin1 -mandoc | %var{PAGER:more}
324         View=%view{ascii,nroff} pod2man %f | nroff -c -Tlatin1 -mandoc
325
326 # Troff with me macros.
327 # Exception - "read.me" is not a nroff file.
328 shell/read.me
329         Open=
330         View=
331
332 shell/.me
333         Open=nroff -c -Tlatin1 -me %f | %var{PAGER:more}
334         View=%view{ascii,nroff} nroff -c -Tlatin1 -me %f
335
336 # Troff with ms macros.
337 shell/.ms
338         Open=nroff -c -Tlatin1 -ms %f | %var{PAGER:more}
339         View=%view{ascii,nroff} nroff -c -Tlatin1 -ms %f
340
341 # Manual page - compressed
342 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
343         Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
344         View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
345
346 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
347         Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
348         View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
349
350 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
351         Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
352         View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
353
354 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
355         Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
356         View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
357
358 regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
359         Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
360         View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
361
362 # CHM
363 regex/\.(chm|CHM)$
364         Open=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &)
365
366 ### Images ###
367
368 type/^GIF
369         Include=image
370
371 type/^JPEG
372         View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f 2>/dev/null
373         Include=image
374
375 type/^PC\ bitmap
376         Include=image
377
378 type/^PNG
379         Include=image
380
381 type/^TIFF
382         Include=image
383
384 type/^PBM
385         Include=image
386
387 type/^PGM
388         Include=image
389
390 type/^PPM
391         Include=image
392
393 type/^Netpbm
394         Include=image
395
396 shell/.xcf
397         Open=(gimp %f &)
398
399 shell/.xbm
400         Open=bitmap %f
401
402 shell/.xpm
403         Include=image
404         View=sxpm %f
405
406 shell/.ico
407         Include=image
408
409 include/image
410         Open=(see %f &)
411         View=%view{ascii} identify %f
412         #View=%view{ascii} asciiview %f
413
414
415 ### Sound files ###
416
417 #regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
418 #       Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
419 #
420 #regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
421 #       Open=mikmod %f
422 #       #Open=tracker %f
423 #
424 #regex/\.([wW][aA][wW]22)$
425 #       Open=vplay -s 22 %f
426 #
427 #regex/\.([mM][pP]3)$
428 #       Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
429 #       View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
430 #
431 #regex/\.([oO][gG][gG|aA|vV|xX])$
432 #       Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
433 #       View=%view{ascii} ogginfo %s
434 #
435 #regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
436 #       Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
437 #
438 #regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
439 #       Open=timidity %f
440 #
441 #regex/\.([wW][mM][aA])$
442 #       Open=mplayer -vo null %f
443 #       View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
444 #
445 #
446 #### Play lists ###
447 #
448 #regex/\.([mM]3[uU]|[pP][lL][sS])$
449 #       Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
450
451
452 ### Video ###
453
454 regex/\.([aA][vV][iI])$
455         Include=video
456
457 regex/\.([aA][sS][fFxX])$
458         Include=video
459
460 regex/\.([dD][iI][vV][xX])$
461         Include=video
462
463 regex/\.([mM][kK][vV])$
464         Include=video
465
466 regex/\.([mM][oO][vV]|[qQ][tT])$
467         Include=video
468
469 regex/\.([mM][pP]4|[mM]4[vV]|[mM][pP][eE]?[gG])$
470         Include=video
471
472 # MPEG-2 TS container + H.264 codec
473 regex/\.([mM][tT][sS])$
474         Include=video
475
476 regex/\.([tT][sS])$
477         Include=video
478
479 regex/\.([vV][oO][bB])$
480         Include=video
481
482 regex/\.([wW][mM][vV])$
483         Include=video
484
485 regex/\.([fF][lL][iIcCvV])$
486         Include=video
487
488 regex/\.([oO][gG][mM])$
489         Include=video
490
491 regex/\.([rR][aA]?[mM])$
492         Open=(realplay %f >/dev/null 2>&1 &)
493
494 include/oldvideo
495         Open=(mplayer %f >/dev/null 2>&1 &)
496         #Open=(gtv %f >/dev/null 2>&1 &)
497         #Open=(xanim %f >/dev/null 2>&1 &)
498
499
500 ### Documents ###
501
502 # Postscript
503 type/^PostScript
504 #       Open=(gv %f &)
505         View=%view{ascii} ps2ascii %f
506
507 # PDF
508 type/^PDF
509         Edit=libreoffice %f &
510         Open=(see %f &)
511         #Open=(acroread %f &)
512         #Open=(ghostview %f &)
513         View=%view{ascii} pdftotext %f -
514
515 # The following code very ugly and should not be taken as example.
516 # It should be cleaned up when the new format of mc.ext is developed.
517
518 # html
519 regex/\.([hH][tT][mM][lL]?)$
520         Open=(if test -n "" && test -n "$DISPLAY"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
521         View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
522
523 # StarOffice 5.2
524 shell/.sdw
525         Open=(libreoffice %f &)
526
527 # StarOffice 6 and OpenOffice.org formats
528 regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
529         Edit=(libreoffice %f &)
530         Open=(libreoffice %f &)
531         View=%view{ascii} odt2txt %f
532
533 # AbiWord
534 shell/.abw
535         Open=(abiword %f &)
536
537 # Microsoft Word Document
538 #regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
539 #       Open=(abiword %f >/dev/null 2>&1 &)
540 #       View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
541 #type/^Microsoft\ Word
542 #       Open=(abiword %f >/dev/null 2>&1 &)
543 #       View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
544 #
545 ## RTF document
546 #regex/\.([rR][tT][fF])$
547 #       Open=(abiword %f >/dev/null 2>&1 &)
548
549 # Microsoft Excel Worksheet
550 regex/\.([xX][lL][sSwW])$
551         Open=(gnumeric %f >/dev/null 2>&1 &)
552         View=%view{ascii} xls2csv %f || strings %f
553 type/^Microsoft\ Excel
554         Open=(gnumeric %f >/dev/null 2>&1 &)
555         View=%view{ascii} xls2csv %f || strings %f
556
557 # Use OpenOffice.org to open any MS Office documents
558 #type/^Microsoft\ Office\ Document
559 #       Open=(libreoffice %f &)
560
561 # Framemaker
562 type/^FrameMaker
563         Open=fmclient -f %f
564
565 # DVI
566 regex/\.([dD][vV][iI])$
567         Open=run-mailcap %f 2>&1 &
568         View=%view{ascii} catdvi %f
569
570 # TeX
571 regex/\.([Tt][Ee][Xx])$
572         Include=editor
573
574 # DjVu
575 regex/\.(djvu?|DJVU?)$
576         Open=djview %f &
577         View=%view{ascii} djvused -e print-pure-txt %f
578
579 ### Miscellaneous ###
580
581 # Makefile
582 regex/[Mm]akefile$
583         Open=make -f %f %{Enter parameters}
584
585 # Imakefile
586 shell/Imakefile
587         Open=xmkmf -a
588
589 # Makefile.PL (MakeMaker)
590 regex/^Makefile.(PL|pl)$
591         Open=%var{PERL:perl} %f
592
593 # dbf
594 regex/\.([dD][bB][fF])$
595        Open=%view{ascii} dbview %f
596        View=%view{ascii} dbview -b %f
597
598 # REXX script
599 regex/\.(rexx?|cmd)$
600        Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
601
602 # Disk images for Commodore computers (VIC20, C64, C128)
603 regex/\.(d64|D64)$
604         Open=%cd %p/uc1541://
605         View=%view{ascii} c1541 %f -list
606         Extract=c1541 %f -extract
607
608 # Glade, a user interface designer for GTK+ and GNOME
609 regex/\.([Gg][Ll][Aa][Dd][Ee])$
610         Open=if glade-3 --version >/dev/null 2>&1; then (glade-3 %f >/dev/null 2>&1 &); else (glade-2 %f >/dev/null 2>&1 &); fi
611
612 # Gettext Catalogs
613 shell/.mo
614         View=%view{ascii} msgunfmt %f || cat %f
615
616 # lyx
617 regex/\.(lyx|LYX)$
618         Open=lyx %f
619         View=%view{ascii} lyxcat %f
620
621 # torrent
622 #regex/\.([tT][oO][rR][rR][eE][nN][tT])$
623 #       View=%view{ascii} ctorrent -x %f 2>/dev/null
624
625 ### Plain compressed files ###
626
627 # ace
628 regex/\.(ace|ACE)$
629         Open=%cd %p/uace://
630         View=%view{ascii} unace l %f
631         Extract=unace x %f
632
633 # arc
634 regex/\.(arc|ARC)$
635         Open=%cd %p/uarc://
636         View=%view{ascii} arc l %f
637         Extract=arc x %f '*'
638         Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
639
640 # zip
641 type/^([Zz][Ii][Pp])\ archive
642         Open=%cd %p/uzip://
643         View=%view{ascii} unzip -v %f
644
645 # zoo
646 regex/\.([Zz][Oo][Oo])$
647         Open=%cd %p/uzoo://
648         View=%view{ascii} zoo l %f
649
650 # gzip
651 type/^gzip
652         Open=gzip -dc %f | %var{PAGER:more}
653         View=%view{ascii} gzip -dc %f 2>/dev/null
654
655 regex/\.(gz|Z)$
656         View=%view{ascii} gzip -dc %f 2>/dev/null
657
658 # bzip2
659 type/^bzip2
660         Open=bzip2 -dc %f | %var{PAGER:more}
661         View=%view{ascii} bzip2 -dc %f 2>/dev/null
662
663 regex/\.bz2?$
664         View=%view{ascii} bzip2 -dc %f 2>/dev/null
665
666 # bzip
667 type/^bzip
668         Open=bzip -dc %f | %var{PAGER:more}
669         View=%view{ascii} bzip -dc %f 2>/dev/null
670
671 # compress
672 type/^compress
673         Open=gzip -dc %f | %var{PAGER:more}
674         View=%view{ascii} gzip -dc %f 2>/dev/null
675
676 # lzma
677 regex/\.lzma$
678         Open=lzma -dc %f | %var{PAGER:more}
679         View=%view{ascii} lzma -dc %f 2>/dev/null
680
681 # xz
682 regex/\.xz$
683         Open=xz -dc %f | %var{PAGER:more}
684         View=%view{ascii} xz -dc %f 2>/dev/null
685
686 ### phd
687
688 type/^Berkeley\ DB\ 1.85
689    View=%view{ascii} db_dump185 -p %f
690
691 # Compiled HTML
692 shell/.chm
693    Open=fbreader %f &
694
695 # DejaVu
696 shell/.djvu
697    Open=djview %f &
698
699 # EPUB
700 shell/.epub
701    Open=fbreader %f &
702
703 # FB2
704 shell/.fb2
705    Open=fbreader %f &
706    View=%view{ascii} xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl %f
707
708 type/^PostScript
709    Open=libreoffice %f &
710    View=%view{ascii} ps2ascii %f
711
712 # RTF
713 regex/\.([rR][tT][fF])$
714    Open=fbreader %f &
715    View=%view{ascii} catdoc %f
716
717 regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
718    Include=msoffice-doc
719
720 regex/\.([Dd][oO][cC][Xx])$
721    Edit=libreoffice %f &
722    Open=libreoffice %f &
723    View=%view{ascii} docx2txt %f - | iconv.py -f utf-8
724
725 type/^Microsoft\ Word
726    Include=msoffice-doc
727
728 type/^Microsoft\ Office\ Document
729    Include=msoffice-doc
730
731 type/^Composite\ Document\ File
732    Include=msoffice-doc
733
734 # ftplist
735 regex/\.ftplist$
736    Open=%cd %p#ftplist
737
738 # Play list
739 regex/\.([mM]3[uU]|[pP][lL][sS])$
740    Include=audio
741
742 # Lossless audio
743 regex/\.(cue|aac|ac3|ape|flac|wv|mka)$
744    Include=audio
745
746 # Object
747 shell/.o
748    View=%view{ascii} nm %f
749    Disassemble=%view{ascii} objdump -d -r %f
750
751 # Python
752 shell/.py
753    Open=python %f
754    View=%view{ascii}
755    Compile=compyle %s
756    Icon=snake.xpm
757
758 regex/\.(tif|TIF|tiff|TIFF)$
759    Open=xview %f
760
761 shell/.torrent
762    Open=%cd %p/torrent://
763
764 regex/\.([xX][mM][lL])$
765    Include=xml
766
767 type/^XML *(1\.0 *)?document
768    Include=xml
769
770 regex/\.([Zz][Ii][Pp])$
771    Open=%cd %p/uzip://
772    View=%view{ascii} unzip -v %f
773
774 include/audio
775    Open=[ "`audtool --get-volume`" -eq 0 ] && (audacious & sleep 3); audtool --playlist-clear --playlist-addurl %f --playback-play
776    #Open=mplayer %f &
777    #Open=deadbeef %f &
778    View=%view{ascii} %f
779
780 include/msoffice-doc
781    Edit=libreoffice %f &
782    Open=libreoffice %f &
783    View=%view{ascii} catdoc %f
784
785 include/video
786    Open=mplayer %f &
787    View=%view{ascii} %f
788
789 include/xml
790    Open=%cd %p/xml://
791
792 ### Default ###
793
794 # Default target for anything not described above
795 default/*
796         Open=
797         View=
798
799
800 ### EOF ###