2
0

doublecmd.ext.example 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. # Double Commander extension file
  2. # Based on Midnight Commander 3.0 extension file
  3. #
  4. # All lines starting with # or empty lines are thrown away.
  5. # All actions for file is showed in "Actions" submenu of file context popup menu
  6. #
  7. # File format:
  8. #
  9. # [extension1|extension2|...|extensionX]
  10. # Name=Category name
  11. # Icon=Path to icon
  12. # action1=command1
  13. # action2=command2
  14. # actionX=commandX
  15. #
  16. # Where:
  17. #
  18. # [extension] or [extension1|extension2 ...] - list of extensions (case insensitive !!no regular expression!!)
  19. # Also you can use "default" keyword as extension. In this case, if command had not found for sought file type,
  20. # then will be used command from this section.
  21. #
  22. # Name - Name of this category (showed in file association manager)
  23. #
  24. # Icon - Path to icon that displays for this file types in file panel
  25. #
  26. # Action can be:
  27. # Open - used with tap on Enter or DblClick
  28. # View - used with tap on F3
  29. # Edit - used with tap on F4
  30. # other actions only is showed in "Actions" submenu of file context popup menu
  31. #
  32. # Command is any one-line shell command, with the simple macro substitution.
  33. #
  34. # Macros should be (case sensitive):
  35. # {!VFS} - for archives - use virtual file system
  36. # {!EDITOR} - call editor (internal or external by configuration}
  37. # {!VIEWER} - call viewer (the same)
  38. # {!SHELL} - use shell from configuration to execute program (see mplayer)
  39. # <?command?> - execute 'command' in system shell and save stdout output to file and transfer it as parameter to previous command (see rpm for example...)
  40. # %f - filename
  41. # %d - directory
  42. # %p - path(directory+filename)
  43. # Default commands
  44. [default]
  45. Open=xdg-open %p
  46. ### Sources ###
  47. # C
  48. [c]
  49. Open={!EDITOR} %p
  50. Compile={!SHELL} cc -O -c %f
  51. #Link={!SHELL} cc -O -o %d/`basename %f .c` %f
  52. # Fortran
  53. [f]
  54. Open={!EDITOR} %p
  55. Compile={!SHELL} f77 -O -c %f
  56. Compile and Link={!SHELL} f77 -O %f
  57. # Pascal and Object Pascal :)
  58. [dpr|pas|pp]
  59. Open={!EDITOR} %p
  60. #Compile={!SHELL} fpc %p
  61. # Asm
  62. [s]
  63. Open={!EDITOR} %p
  64. Assemble={!SHELL} cc -O -c %f
  65. #Link={!SHELL} cc -O -o %d/`basename %f .s` %f
  66. # C++
  67. [C|c|cc]
  68. Open={!EDITOR} %p
  69. Compile={!SHELL} c++ -O -c %f
  70. #Link={!SHELL} c++ -O -o %d/`basename %f .c` %f
  71. ### Documentation ###
  72. # GNU Info page
  73. [info]
  74. Open={!SHELL} info -f %f
  75. # Manual page
  76. [man]
  77. Open={!SHELL} nroff -Tlatin2 -mandoc %f | less
  78. View={!SHELL} nroff -Tlatin2 -mandoc %f
  79. ### Sound files ###
  80. [wav|WAV|Wav|snd|SND|Snd|voc|VOC|Voc|au|AU|Au]
  81. Open={!SHELL} play %f
  82. [mod|s3m|xm]
  83. Open=xmms %f
  84. #Open=mikmod %f
  85. #Open=tracker %f
  86. [mp3]
  87. Open=xmms %p
  88. View=mpg123 -tn1 %f 2>&1|grep -E '^(Title|Album|Comment|MPEG|$)'
  89. ### Multimedia ###
  90. [mpg|mpeg|avi|asf|mov]
  91. Open=totem %p
  92. #Open=xanim %f
  93. #Open=aviplay %f
  94. #Open=mtv %f 2>/dev/null&
  95. #Open=gtv %f 2>/dev/null&
  96. #Open=plaympeg %f 2>/dev/null&
  97. #Open=mpeg_play %f &
  98. #Open(big)=mpeg_play -dither 2x2 %f &
  99. #Open(gray)=mpeg_play -dither gray %f &
  100. [rm|ram]
  101. Open={!SHELL} mplayer %f
  102. #Open=realplay %f&
  103. ### Documents ###
  104. # Postscript
  105. [ps]
  106. Open=gv %f
  107. View=ps2ascii %f
  108. View with GhostView=gv %f
  109. # PDF
  110. [pdf]
  111. Open=xpdf %f
  112. #Open=acroread %f
  113. #Open=ghostview %f
  114. View=pdftotext %f
  115. # html
  116. [html|htm|mht]
  117. Open=opera %p
  118. #Open=mozilla %p
  119. View=lynx -dump -force_html %p
  120. #txt
  121. [txt]
  122. Open={!EDITOR} %p
  123. # StarOffice and OpenOffice
  124. [sdw]
  125. Open=soffice %f
  126. # Open Document Format
  127. [odt|ods|odp]
  128. Name=Open Document Format
  129. View={!VIEWER} <?odt2txt %p?>
  130. # AbiWord
  131. [abw]
  132. Open=abiword %f
  133. # Microsoft Word Document
  134. [doc|dot|wri]
  135. Open=soffice %f
  136. #Open=koffice %f
  137. View={!SHELL} catdoc -w %f || word2x -f text %f - || strings %f
  138. # Microsoft Excel Worksheet
  139. [xls|xlw]
  140. Open=soffice %f
  141. #Open=koffice %f
  142. View=xls2csv %f || strings %f
  143. # DVI
  144. [dvi]
  145. Open=xdvi %f &
  146. View=dvi2tty %f
  147. Convert file to Postscript=dvips %f
  148. # TeX
  149. [tex]
  150. Open={!EDITOR} %p
  151. TeX this file={!SHELL} tex %f
  152. LaTeX this file={!SHELL} latex %f
  153. csTeX this file={!SHELL} csplain %f
  154. csLaTeX this file={!SHELL} cslatex %f
  155. ### Miscellaneous ###
  156. # dbf
  157. [dbf]
  158. #Open={!VIEWER} <?dbview %f?>
  159. View=dbview -b %f
  160. # BitTorrent
  161. [torrent]
  162. View={!VIEWER} <?aria2c -S %p?>
  163. ### Archives ###
  164. [tar]
  165. Open={!VFS}
  166. View={!VIEWER} <?tar tvvf %p?>
  167. Extract={!SHELL} tar xf %f
  168. [tgz]
  169. Open={!VFS}
  170. View={!VIEWER} <?gzip -dc %f 2>/dev/null | tar tvvf -?>
  171. Extract={!SHELL} gzip -dc %f 2>/dev/null | tar xzf -
  172. [bz]
  173. Open={!VFS}
  174. View={!VIEWER} <?bzip -dc %f 2>/dev/null?>
  175. Extract={!SHELL} bzip -dc %f 2>/dev/null
  176. [bz2]
  177. Open={!VFS}
  178. View={!VIEWER} <?bzip2 -dc %f 2>/dev/null?>
  179. Extract={!SHELL} bzip2 -dc %f 2>/dev/null
  180. # zip
  181. [zip|jar]
  182. Open={!VFS}
  183. View={!VIEWER} <?unzip -v %f?>
  184. Extract={!SHELL} unzip %f
  185. #Extract (with flags)=I=%{Enter any Unzip flags:}; if test -n "$I"; then unzip $I %f; fi
  186. Unzip={!SHELL} unzip %f '*'
  187. # zoo
  188. [zoo]
  189. Open={!VFS}
  190. View={!VIEWER} <?zoo l %f?>
  191. Extract={!SHELL} zoo x %f '*'
  192. # lha
  193. [lha]
  194. Open={!VFS}
  195. View={!VIEWER} <?lharc l %f?>
  196. Extract={!SHELL} lharc x %f '*'
  197. #Extract (with flags)=I=%{Enter any LHarc flags:}; if test -n "$I"; then lharc x $I %f; fi
  198. # arj
  199. [arj]
  200. Open={!VFS}
  201. View={!VIEWER} <?unarj l %p?>
  202. Extract={!SHELL} unarj x %f '*'
  203. #Extract (with flags)=I=%{Enter any Unarj flags:}; if test -n "$I"; then unarj x $I %f; fi
  204. # ha
  205. [ha]
  206. Open={!VFS}
  207. View={!VIEWER} <?ha lf %p?>
  208. Extract={!SHELL} ha xy %f '*'
  209. # Extract (with flags)=I=%{Enter any HA flags:}; if test -n "$I"; then ha xy $I %f; fi
  210. # rar
  211. [rar|r00|r02|r02|r03|r04|r05|r06|r07|r08|r09]
  212. Open={!VFS}
  213. View={!VIEWER} <?rar v -c- %p?>
  214. Extract={!SHELL} rar x -c- %f '*'
  215. # Extract (with flags)=I=%{Enter any RAR flags:}; if test -n "$I";then rar x $I %f; fi
  216. #compress
  217. [Z]
  218. Open={!VFS}
  219. View={!SHELL} compress -dc %f
  220. Extract={!SHELL} compress -dc %f
  221. # cpio
  222. [cpio]
  223. Open={!VFS}
  224. View={!SHELL} cat %f | cpio -ictv
  225. Extract={!SHELL} cat %f | cpio -ic
  226. # gzip
  227. [gz]
  228. Open={!VFS}
  229. View={!VIEWER} <?gzip -dc %f 2>/dev/null?>
  230. Uncompress={!SHELL} gunzip %f
  231. # bzip2
  232. [bz2|bzip2]
  233. Open={!VFS}
  234. View={!VIEWER} <?bzip2 -dc %f 2>/dev/null?>
  235. Uncompress={!SHELL} bunzip2 %f
  236. # bzip
  237. [bz|bzip]
  238. Open={!VFS}
  239. View={!VIEWER} <?bzip -dc %f 2>/dev/null?>
  240. Uncompress={!SHELL} bunzip %f
  241. # ace
  242. [ace]
  243. Open={!VFS}
  244. Uncompress={!SHELL} unace e %p
  245. # Source RPMs (SuSE uses *.spm, others use *.src.rpm)
  246. [spm|srcm]
  247. Open={!VFS}
  248. View={!VIEWER} <?rpm -qivlp --scripts %p?>
  249. Install this RPM={!SHELL} rpm -i %f
  250. Rebuild this RPM={!SHELL} rpm --rebuild %f
  251. Check signature={!SHELL} rpm --checksig %f
  252. # Compiled RPMs
  253. [rpm]
  254. Open={!VFS}
  255. View={!VIEWER}<?rpm -qivlp --scripts %p?>
  256. Install this RPM={!SHELL} rpm -i %p
  257. Upgrade this RPM={!SHELL} rpm -U %p
  258. Check signature={!SHELL} rpm --checksig %f
  259. # deb
  260. [deb]
  261. Open={!VFS}
  262. View={!VIEWER} <?dpkg-deb -c %p?>