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 b View the file in a browser
25 exec webbrowser file://%d/%f
28 w View the file in a new browser window
29 exec webbrowser -n file://%d/%f
33 t View the file in a new browser tab
34 exec webbrowser -t file://%d/%f
36 += f \.fb2(\.bz2|\.gz|\.zip)?$ | f \.(chm|epub|htm(l?)|txt|rtf)$ & t r
37 f View fb2/chm/epub with fbreader
40 + t r & f \.fb2(\.bz2|\.gz|\.zip)$
43 *.fb2.bz2) A="bunzip2 -c" ;;
44 *.fb2.gz) A="gunzip -c" ;;
45 *.fb2.zip) A="unzip -p" ;;
48 $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_html_ru.xsl - | webstdin -t
50 + t r & f \.fb2(\.bz2|\.gz|\.zip)$
53 *.fb2.bz2) A="bunzip2 -c" ;;
54 *.fb2.gz) A="gunzip -c" ;;
55 *.fb2.zip) A="unzip -p" ;;
58 $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl - | webstdin -e txt -t
60 += t r & f \.(pdf|PDF|ps|PS)(\.bz2|\.gz)?$
64 += t r & f \.djvu(\.bz2|\.gz)?$
68 += t r & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
69 o View OpenDoc with odt2txt
70 odt2txt %f | ${PAGER:-more}
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 e Edit OpenDoc with libreoffice
76 += t r & f \.(doc|DOC|rtf)$
77 d View doc with catdoc
78 catdoc %f | ${PAGER:-more}
80 + t r & f \.(doc|DOC|rtf)$
81 e Edit doc with libreoffice
84 += t r & f \.(docx|DOCX)$
85 d View docx with docx2txt
86 docx2txt %f - | iconv.py -f utf-8 | ${PAGER:-more}
88 + t r & f \.(docx|DOCX)$
89 e Edit docx with libreoffice
92 += t r & f \.(xls|XLS)$
93 x View xls with xls2csv
94 xls2csv %f | ${PAGER:-more}
96 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
97 = t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
98 i View image(s) scaled
99 xli -title "`echo %s | sed 's/ /_/g'`" -zoom auto %s &
101 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
102 I View image(s) full size
103 xli -title "`echo %s | sed 's/ /_/g'`" %s &
105 + t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$ | t t
106 = t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$
107 I View icon, JPEG-2000 or TIFF image
110 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
111 a Add the audiofile(s) or playlist(s)
112 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
114 # audtool --playlist-addurl "$f"
116 #smplayer -add-to-playlist %s &
117 deadbeef --queue %s &
119 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
120 = t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$
121 p Load the audiofile(s) or playlist(s)
122 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
123 #audtool --playlist-clear
125 # audtool --playlist-addurl "$f"
127 #smplayer -send-action pl_remove_all
128 #smplayer -add-to-playlist %s &
129 deadbeef --queue %s &
131 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
132 P Play the audiofile(s) or playlist(s)
133 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
134 #audtool --playlist-clear
136 # audtool --playlist-addurl "$f"
138 #exec audtool --playback-play
139 #mplayer -playlist %f &
142 #exec mediaplayer_open %f
145 R Play the playlist in random order
146 "$HOME"/admin/prog/audio-cdr-video/audio/shuffle-playlist.py %f random-playlist-tmp.m3u
147 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
148 #audtool --playlist-clear
149 #audtool --playlist-addurl random-playlist-tmp.m3u
150 #audtool --playback-play
151 #mplayer -playlist random-playlist-tmp.m3u &
152 #smplayer random-playlist-tmp.m3u &
153 #smplayer -actions pl_shuffle %f &
154 deadbeef --queue random-playlist-tmp.m3u & deadbeef --play
155 #mediaplayer_open random-playlist-tmp.m3u
156 (sleep 5; exec rm random-playlist-tmp.m3u) &
158 + 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
159 s Play audio/video file(s) or directory with smplayer
162 + t d & f (video_ts|VIDEO_TS)$
163 c Play the current directory with smplayer
166 + 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)$
168 exec "$HOME"/.config/mpv/mpv_identify.sh %f
170 + t d & f (video_ts|VIDEO_TS)$
172 exec "$HOME"/.config/mpv/mpv_identify.sh .
174 + 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
175 = 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)$
176 m Play video file(s) with mplayer
179 + 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
180 M Play audio/video with gmplayer
183 += t d & f (video_ts|VIDEO_TS)$
184 d Play DVD directory with mplayer
185 mplayer -dvd-device . dvd:// &
187 + t d & f (video_ts|VIDEO_TS)$
188 D Play DVD directory with gmplayer
189 gmplayer -dvd-device . dvd:// &
191 + t d & f (video_ts|VIDEO_TS)$
192 t Play DVD title with mplayer
194 mplayer -dvd-device . dvd://"$title" &
196 + t d & f (video_ts|VIDEO_TS)$
197 T Play DVD title with gmplayer
199 gmplayer -dvd-device . dvd://"$title" &
202 p Play directory with mplayer
206 P Play directory with gmplayer
210 b Compress the current subdirectory to tar.bz2
211 Pwd="`basename %d /`"
212 echo -n "Name of the distribution file (without extension) [$Pwd]: "
214 if [ "$tar"x = x ]; then tar="$Pwd"; fi
215 cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 &&
216 echo ../"$tar".tar.bz2 created.
219 g Compress the current subdirectory to tar.gz
220 Pwd="`basename %d /`"
221 echo -n "Name of the distribution file (without extension) [$Pwd]: "
223 if [ "$tar"x = x ]; then tar="$Pwd"; fi
224 cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz &&
225 echo ../"$tar".tar.gz created.
228 l Compress the current subdirectory to tar.lzma
229 Pwd="`basename %d /`"
230 echo -n "Name of the distribution file (without extension) [$Pwd]: "
232 if [ "$tar"x = x ]; then tar="$Pwd"; fi
233 cd .. && tar cvf - "$Pwd" | lzma -f9 > "$tar".tar.lzma &&
234 echo ../"$tar".tar.lzma created.
237 x Compress the current subdirectory to tar.xz
238 Pwd="`basename %d /`"
239 echo -n "Name of the distribution file (without extension) [$Pwd]: "
241 if [ "$tar"x = x ]; then tar="$Pwd"; fi
242 cd .. && tar cvf - "$Pwd" | xz -f9 > "$tar".tar.xz &&
243 echo ../"$tar".tar.xz created.
246 t Compress the current subdirectory to tar
247 Pwd="`basename %d /`"
248 echo -n "Name of the distribution file (without extension) [$Pwd]: "
250 if [ "$tar"x = x ]; then tar="$Pwd"; fi
251 cd .. && tar cvf - "$Pwd" > "$tar".tar &&
252 echo ../"$tar".tar created.
255 z Compress the current subdirectory to zip
256 Pwd="`basename %d /`"
257 echo -n "Name of the distribution file (without extension) [$Pwd]: "
259 if [ "$zip"x = x ]; then zip="$Pwd"; fi
260 cd .. && zip -r9 "$zip".zip "$Pwd" &&
261 echo ../"$zip".zip created.
264 y Compress the current subdirectory to zip with recoded filenames
265 Pwd="`basename %d /`"
266 echo -n "Name of the distribution file (without extension) [$Pwd]: "
268 if [ "$zip"x = x ]; then zip="$Pwd"; fi
269 cd .. && zip.py "$zip".zip "$Pwd" &&
270 echo ../"$zip".zip created.
273 7 Compress the current subdirectory to 7z
274 Pwd="`basename %d /`"
275 echo -n "Name of the distribution file (without extension) [$Pwd]: "
277 if [ "$ar"x = x ]; then ar="$Pwd"; fi
278 cd .. && 7zr a "$ar".7z "$Pwd" &&
279 echo ../"$ar".7z created.
281 + ! f \.(bz2|gz|lz|lzma|7z|xz|zip|ZIP)$ & t r
285 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & 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
298 z 7z the file/directory
301 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
305 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
306 z zip the file/directory
307 exec zip -r9 %f.zip %f
309 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
310 y zip the file/directory with recoded filename(s)
311 exec zip.py %f.zip %f
314 Z zip these files/directories
315 ZIP=%{Enter zip name}
316 exec zip -r9 "$ZIP" %s
319 Y zip these files/directories with recoded filenames
320 ZIP=%{Enter zip name}
321 exec zip.py "$ZIP" %s
323 + f \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
324 n Create a directory for this archive
326 *.tar.Z) D="`basename %f .tar.Z`";;
327 *.tar.bz2) D="`basename %f .tar.bz2`";;
328 *.tar.gz) D="`basename %f .tar.gz`";;
329 *.tbz2) D="`basename %f .tbz2`";;
330 *.tgz) D="`basename %f .tgz`";;
331 *.tz) D="`basename %f .tz`";;
332 *.tar.lz) D="`basename %f .tar.lz`";;
333 *.tar.lzma) D="`basename %f .tar.lzma`";;
334 *.tar.7z) D="`basename %f .tar.7z`";;
335 *.zip) D="`basename %f .zip`";;
336 *.ZIP) D="`basename %f .ZIP`";;
337 *.rar) D="`basename %f .rar`";;
338 *.RAR) D="`basename %f .RAR`";;
339 *.xz) D="`basename %f .xz`";;
340 *.7z) D="`basename %f .7z`";;
344 + F \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & T r
345 N Create a directory for the other archive
347 *.tar.Z) D="`basename %F .tar.Z`";;
348 *.tar.bz2) D="`basename %F .tar.bz2`";;
349 *.tar.gz) D="`basename %F .tar.gz`";;
350 *.tbz2) D="`basename %F .tbz2`";;
351 *.tgz) D="`basename %F .tgz`";;
352 *.tz) D="`basename %F .tz`";;
353 *.tar.lz) D="`basename %F .tar.lz`";;
354 *.tar.lzma) D="`basename %F .tar.lzma`";;
355 *.tar.7z) D="`basename %F .tar.7z`";;
356 *.zip) D="`basename %F .zip`";;
357 *.ZIP) D="`basename %F .ZIP`";;
358 *.rar) D="`basename %F .rar`";;
359 *.RAR) D="`basename %F .RAR`";;
360 *.xz) D="`basename %F .xz`";;
361 *.7z) D="`basename %F .7z`";;
365 + f \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & t r
366 x Extract the contents of a compressed tar file
372 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
393 + F \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & T r
394 X Extract the contents of an other compressed tar file
400 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
419 $PRG %D/%F | tar xvpf -
421 + f \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & t r
422 x Extract a compressed file
424 *.bz2) P="bzip2 -d";;
427 *.lzma) P="lzma -d";;
430 *.tar) P="tar xvpf";;
431 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
432 *.rar|*.RAR) P="unrar x -y";;
436 + F \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & T r
437 X Extract another compressed file
439 *.bz2) P="bzip2 -d";;
442 *.lzma) P="lzma -d";;
445 *.tar) P="tar xvpf";;
446 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
447 *.rar|*.RAR) P="unrar x -y";;
451 + t r & f \.(zip|ZIP)$
452 y Extract from zip with recoded filenames
455 + T r & F \.(zip|ZIP)$
456 Y Extract from other zip with recoded filenames
468 C Compare these files
473 exec diff -u --speed-large-files %D/%f %f
477 exec diff -u --speed-large-files %D/%F %f
484 V vimdiff these files
489 exec diff -ru --speed-large-files \
490 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%f %f
492 + t d & T d & ! F ^\.\.$
493 D Diff these directories
494 exec diff -ru --speed-large-files \
495 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%F %f
497 += f \.(asc|sig(n)?)$ & t r
501 += f \.[1-8]$ | f \.man$ & t r
502 1 Display the file with roff -man
506 MAN=%{Enter manual name}
507 %view man -P cat $MAN
510 r rsync the file(s) there
511 rsync -ahPv --del %s %D