3 # This is necessary to overcome a bug in mc - without this
4 # mc makes default wrong item
8 @ Do something on all of the file(s) at once
13 @ Do something on the tagged files one by one
20 p View the file in a pager
21 exec ${PAGER:-more} %f
24 g Edit the file in gvim
28 b View the file in a browser
29 exec webbrowser file://%d/%f
32 w View the file in a new browser window
33 exec webbrowser -n file://%d/%f
37 t View the file in a new browser tab
38 exec webbrowser -t file://%d/%f
40 += f \.fb2(\.bz2|\.gz|\.zip)?$ | f \.(chm|epub|htm(l?)|txt|rtf)$ & t r
41 f View fb2/chm/epub with fbreader
44 + t r & f \.fb2(\.bz2|\.gz|\.zip)$
47 *.fb2.bz2) A="bunzip2 -c" ;;
48 *.fb2.gz) A="gunzip -c" ;;
49 *.fb2.zip) A="unzip -p" ;;
52 $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_html_ru.xsl - | webstdin -t
54 + t r & f \.fb2(\.bz2|\.gz|\.zip)$
57 *.fb2.bz2) A="bunzip2 -c" ;;
58 *.fb2.gz) A="gunzip -c" ;;
59 *.fb2.zip) A="unzip -p" ;;
62 $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl - | webstdin -e txt -t
64 += t r & f \.(pdf|PDF|ps|PS)(\.bz2|\.gz)?$
68 += t r & f \.djvu(\.bz2|\.gz)?$
72 += t r & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
73 o View OpenDoc with odt2txt
74 odt2txt %f | ${PAGER:-more}
76 + t r & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
77 e Edit OpenDoc with libreoffice
80 += t r & f \.(doc|DOC|rtf)$
81 d View doc with catdoc
82 catdoc %f | ${PAGER:-more}
84 + t r & f \.(doc|DOC|rtf)$
85 e Edit doc with libreoffice
88 += t r & f \.(docx|DOCX)$
89 d View docx with docx2txt
90 docx2txt %f - | iconv.py -f utf-8 | ${PAGER:-more}
92 + t r & f \.(docx|DOCX)$
93 e Edit docx with libreoffice
96 += t r & f \.(xls|XLS)$
97 x View xls with xls2csv
98 xls2csv %f | ${PAGER:-more}
100 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
101 = t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
102 i View image(s) scaled
103 xli -title "`echo %s | sed 's/ /_/g'`" -zoom auto %s &
105 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
106 I View image(s) full size
107 xli -title "`echo %s | sed 's/ /_/g'`" %s &
109 + t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$ | t t
110 = t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$
111 I View icon, JPEG-2000 or TIFF image
114 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
115 a Add the audiofile(s) or playlist(s)
116 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
118 # audtool --playlist-addurl "$f"
120 #smplayer -add-to-playlist %s &
121 deadbeef --queue %s &
123 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
124 = t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$
125 p Load the audiofile(s) or playlist(s)
126 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
127 #audtool --playlist-clear
129 # audtool --playlist-addurl "$f"
131 #smplayer -send-action pl_remove_all
132 #smplayer -add-to-playlist %s &
133 deadbeef --queue %s &
135 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
136 P Play the audiofile(s) or playlist(s)
137 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
138 #audtool --playlist-clear
140 # audtool --playlist-addurl "$f"
142 #exec audtool --playback-play
143 #mplayer -playlist %f &
146 #exec mediaplayer_open %f
149 R Play the playlist in random order
150 "$HOME"/admin/prog/audio-cdr-video/audio/shuffle-playlist.py %f random-playlist-tmp.m3u
151 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
152 #audtool --playlist-clear
153 #audtool --playlist-addurl random-playlist-tmp.m3u
154 #audtool --playback-play
155 #mplayer -playlist random-playlist-tmp.m3u &
156 #smplayer random-playlist-tmp.m3u &
157 #smplayer -actions pl_shuffle %f &
158 deadbeef --queue random-playlist-tmp.m3u & deadbeef --play
159 #mediaplayer_open random-playlist-tmp.m3u
160 (sleep 5; exec rm random-playlist-tmp.m3u) &
162 + f \.(aac|ac3|ape|cue|dts|flac|m3u|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t
163 s Play audio/video file(s) or directory with smplayer
166 + t d & f (video_ts|VIDEO_TS)$
167 c Play the current directory with smplayer
170 + t r & f \.(m3u|mp3|MP3|cue|aac|ac3|ape|dts|flac|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$
172 exec "$HOME"/.config/mpv/mpv_identify.sh %f
174 + t d & f (video_ts|VIDEO_TS)$
176 exec "$HOME"/.config/mpv/mpv_identify.sh .
178 + f \.(aac|ac3|ape|cue|dts|flac|m3u|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t
179 = f \.(aac|ac3|ape|cue|dts|flac|m3u|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$
180 m Play video file(s) with mplayer
183 + f \.(m3u|mp3|MP3|cue|aac|ac3|ape|dts|flac|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t t
184 M Play audio/video with gmplayer
187 += t d & f (video_ts|VIDEO_TS)$
188 d Play DVD directory with mplayer
189 mplayer -dvd-device . dvd:// &
191 + t d & f (video_ts|VIDEO_TS)$
192 D Play DVD directory with gmplayer
193 gmplayer -dvd-device . dvd:// &
195 + t d & f (video_ts|VIDEO_TS)$
196 t Play DVD title with mplayer
198 mplayer -dvd-device . dvd://"$title" &
200 + t d & f (video_ts|VIDEO_TS)$
201 T Play DVD title with gmplayer
203 gmplayer -dvd-device . dvd://"$title" &
206 p Play directory with mplayer
210 P Play directory with gmplayer
214 b Compress the current subdirectory to tar.bz2
215 Pwd="`basename %d /`"
216 echo -n "Name of the distribution file (without extension) [$Pwd]: "
218 if [ "$tar"x = x ]; then tar="$Pwd"; fi
219 cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 &&
220 echo ../"$tar".tar.bz2 created.
223 g Compress the current subdirectory to tar.gz
224 Pwd="`basename %d /`"
225 echo -n "Name of the distribution file (without extension) [$Pwd]: "
227 if [ "$tar"x = x ]; then tar="$Pwd"; fi
228 cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz &&
229 echo ../"$tar".tar.gz created.
232 l Compress the current subdirectory to tar.lzma
233 Pwd="`basename %d /`"
234 echo -n "Name of the distribution file (without extension) [$Pwd]: "
236 if [ "$tar"x = x ]; then tar="$Pwd"; fi
237 cd .. && tar cvf - "$Pwd" | lzma -f9 > "$tar".tar.lzma &&
238 echo ../"$tar".tar.lzma created.
241 x Compress the current subdirectory to tar.xz
242 Pwd="`basename %d /`"
243 echo -n "Name of the distribution file (without extension) [$Pwd]: "
245 if [ "$tar"x = x ]; then tar="$Pwd"; fi
246 cd .. && tar cvf - "$Pwd" | xz -f9 > "$tar".tar.xz &&
247 echo ../"$tar".tar.xz created.
250 t Compress the current subdirectory to tar
251 Pwd="`basename %d /`"
252 echo -n "Name of the distribution file (without extension) [$Pwd]: "
254 if [ "$tar"x = x ]; then tar="$Pwd"; fi
255 cd .. && tar cvf - "$Pwd" > "$tar".tar &&
256 echo ../"$tar".tar created.
259 z Compress the current subdirectory to zip
260 Pwd="`basename %d /`"
261 echo -n "Name of the distribution file (without extension) [$Pwd]: "
263 if [ "$zip"x = x ]; then zip="$Pwd"; fi
264 cd .. && zip -r9 "$zip".zip "$Pwd" &&
265 echo ../"$zip".zip created.
268 y Compress the current subdirectory to zip with recoded filenames
269 Pwd="`basename %d /`"
270 echo -n "Name of the distribution file (without extension) [$Pwd]: "
272 if [ "$zip"x = x ]; then zip="$Pwd"; fi
273 cd .. && zip.py "$zip".zip "$Pwd" &&
274 echo ../"$zip".zip created.
277 7 Compress the current subdirectory to 7z
278 Pwd="`basename %d /`"
279 echo -n "Name of the distribution file (without extension) [$Pwd]: "
281 if [ "$ar"x = x ]; then ar="$Pwd"; fi
282 cd .. && 7zr a "$ar".7z "$Pwd" &&
283 echo ../"$ar".7z created.
285 + ! f \.(bz2|gz|lz|lzma|7z|xz|zip|ZIP)$ & t r
289 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
293 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
297 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
301 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
302 z 7z the file/directory
305 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
309 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
310 z zip the file/directory
311 exec zip -r9 %f.zip %f
313 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
314 y zip the file/directory with recoded filename(s)
315 exec zip.py %f.zip %f
318 Z zip these files/directories
319 ZIP=%{Enter zip name}
320 exec zip -r9 "$ZIP" %s
323 Y zip these files/directories with recoded filenames
324 ZIP=%{Enter zip name}
325 exec zip.py "$ZIP" %s
327 + f \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
328 n Create a directory for this archive
330 *.tar.Z) D="`basename %f .tar.Z`";;
331 *.tar.bz2) D="`basename %f .tar.bz2`";;
332 *.tar.gz) D="`basename %f .tar.gz`";;
333 *.tbz2) D="`basename %f .tbz2`";;
334 *.tgz) D="`basename %f .tgz`";;
335 *.tz) D="`basename %f .tz`";;
336 *.tar.lz) D="`basename %f .tar.lz`";;
337 *.tar.lzma) D="`basename %f .tar.lzma`";;
338 *.tar.7z) D="`basename %f .tar.7z`";;
339 *.zip) D="`basename %f .zip`";;
340 *.ZIP) D="`basename %f .ZIP`";;
341 *.rar) D="`basename %f .rar`";;
342 *.RAR) D="`basename %f .RAR`";;
343 *.xz) D="`basename %f .xz`";;
344 *.7z) D="`basename %f .7z`";;
348 + F \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & T r
349 N Create a directory for the other archive
351 *.tar.Z) D="`basename %F .tar.Z`";;
352 *.tar.bz2) D="`basename %F .tar.bz2`";;
353 *.tar.gz) D="`basename %F .tar.gz`";;
354 *.tbz2) D="`basename %F .tbz2`";;
355 *.tgz) D="`basename %F .tgz`";;
356 *.tz) D="`basename %F .tz`";;
357 *.tar.lz) D="`basename %F .tar.lz`";;
358 *.tar.lzma) D="`basename %F .tar.lzma`";;
359 *.tar.7z) D="`basename %F .tar.7z`";;
360 *.zip) D="`basename %F .zip`";;
361 *.ZIP) D="`basename %F .ZIP`";;
362 *.rar) D="`basename %F .rar`";;
363 *.RAR) D="`basename %F .RAR`";;
364 *.xz) D="`basename %F .xz`";;
365 *.7z) D="`basename %F .7z`";;
369 + f \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & t r
370 x Extract the contents of a compressed tar file
376 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
397 + F \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & T r
398 X Extract the contents of an other compressed tar file
404 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
423 $PRG %D/%F | tar xvpf -
425 + f \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & t r
426 x Extract a compressed file
428 *.bz2) P="bzip2 -d";;
431 *.lzma) P="lzma -d";;
434 *.tar) P="tar xvpf";;
435 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
436 *.rar|*.RAR) P="unrar x -y";;
440 + F \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & T r
441 X Extract another compressed file
443 *.bz2) P="bzip2 -d";;
446 *.lzma) P="lzma -d";;
449 *.tar) P="tar xvpf";;
450 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
451 *.rar|*.RAR) P="unrar x -y";;
455 + t r & f \.(zip|ZIP)$
456 y Extract from zip with recoded filenames
459 + T r & F \.(zip|ZIP)$
460 Y Extract from other zip with recoded filenames
472 C Compare these files
477 exec diff -u --speed-large-files %D/%f %f
481 exec diff -u --speed-large-files %D/%F %f
488 V vimdiff these files
493 exec diff -ru --speed-large-files \
494 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%f %f
496 + t d & T d & ! F ^\.\.$
497 D Diff these directories
498 exec diff -ru --speed-large-files \
499 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%F %f
501 += f \.(asc|sig(n)?)$ & t r
505 += f \.[1-8]$ | f \.man$ & t r
506 1 Display the file with roff -man
510 MAN=%{Enter manual name}
511 %view man -P cat $MAN
514 r rsync the file(s) there
515 rsync -ahPv --del %s %D