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 selected 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
33 w View the file in a new browser window
34 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 lr
41 f View fb2/chm/epub with fbreader
44 + t lr & 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 lr & 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 lr & f \.(pdf|PDF|ps|PS)(\.bz2|\.gz)?$
68 += t lr & f \.djvu(\.bz2|\.gz)?$
72 += t lr & 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 lr & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg|doc|DOC|rtf|docx|DOCX|xls|XLS|xlsx|XLSX)$
77 e Edit (Open)Docs with libreoffice
80 += t lr & f \.(doc|DOC|rtf)$
81 d View doc with catdoc
82 catdoc %f | ${PAGER:-more}
84 += t lr & f \.(docx|DOCX)$
85 d View docx with docx2txt
86 docx2txt %f - | iconv.py -f utf-8 | ${PAGER:-more}
88 + t lr & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg|doc|DOC|rtf|docx|DOCX|xls|XLS|xlsx|XLSX)$
89 v View (Open)Docs with libreoffice
90 #libreoffice --headless --convert-to "txt:Text (encoded):UTF8" %f
91 libreoffice --cat %f | ${PAGER:-more}
93 += t lr & f \.(xls|XLS)$
94 x View xls with xls2csv
95 xls2csv %f | ${PAGER:-more}
97 + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
98 = t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
99 i View image(s) scaled
100 xli -title "`echo %s | sed 's/ /_/g'`" -zoom auto %s &
102 + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
103 I View image(s) full size
104 xli -title "`echo %s | sed 's/ /_/g'`" %s &
106 + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
110 + t lr & f \.(ico|jp2|tif|TIF|tiff|TIFF|webp)$ | t t
111 = t lr & f \.(ico|jp2|tif|TIF|tiff|TIFF|webp)$
112 I View icon, JPEG-2000, TIFF, WebP image
115 + t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
116 a Add the audiofile(s) or playlist(s)
117 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
119 # audtool --playlist-addurl "$f"
121 #smplay -add-to-playlist %s &
122 deadbeef --queue %s &
124 + t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
125 = t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$
126 p Load the audiofile(s) or playlist(s)
127 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
128 #audtool --playlist-clear
130 # audtool --playlist-addurl "$f"
132 #smplayer -send-action pl_remove_all
133 #smplay -add-to-playlist %s &
134 deadbeef --queue %s &
136 + t lr & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
137 P Play the audiofile(s) or playlist(s)
138 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
139 #audtool --playlist-clear
141 # audtool --playlist-addurl "$f"
143 #exec audtool --playback-play
144 #mplay -playlist %f &
147 #exec mediaplayer_open %f
150 R Play the playlist in random order
151 "$HOME"/admin/prog/audio-cdr-video/audio/shuffle-playlist.py %f random-playlist-tmp.m3u
152 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
153 #audtool --playlist-clear
154 #audtool --playlist-addurl random-playlist-tmp.m3u
155 #audtool --playback-play
156 #mplay -playlist random-playlist-tmp.m3u &
157 #smplay random-playlist-tmp.m3u &
158 #smplay -actions pl_shuffle %f &
159 deadbeef --queue random-playlist-tmp.m3u & deadbeef --play
160 #mediaplayer_open random-playlist-tmp.m3u
161 (sleep 5; exec rm random-playlist-tmp.m3u) &
163 + 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
164 s Play audio/video file(s) or directory with smplayer
167 + t d & f (video_ts|VIDEO_TS)$
168 c Play the current directory with smplayer
171 + t lr & 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)$
173 exec "$HOME"/.config/mpv/mpv_identify.sh %f
175 + t d & f (video_ts|VIDEO_TS)$
177 exec "$HOME"/.config/mpv/mpv_identify.sh .
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)$ | t d | t t
180 = 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)$
181 m Play video file(s) with mpv
184 + 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
185 = 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)$
186 m Play video file(s) with mpv asking audio volume
187 AUDIO_VOLUME=%{Enter volume}
188 AUDIO_VOLUME=$AUDIO_VOLUME mplay %s &
190 + 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
191 M Play audio/video with mpv GUI
194 += t d & f (video_ts|VIDEO_TS)$
195 d Play DVD directory with mpv
196 mplay -dvd-device . dvd:// &
198 + t d & f (video_ts|VIDEO_TS)$
199 D Play DVD directory with mpv GUI
200 gmplay -dvd-device . dvd:// &
202 + t d & f (video_ts|VIDEO_TS)$
203 t Play DVD title with mpv
205 mplay -dvd-device . dvd://"$title" &
207 + t d & f (video_ts|VIDEO_TS)$
208 T Play DVD title with mpv GUI
210 gmplay -dvd-device . dvd://"$title" &
213 p Play directory with mpv
217 P Play directory with mpv GUI
221 b Compress the current subdirectory to tar.bz2
222 Pwd="`basename %d /`"
223 echo -n "Name of the distribution file (without extension) [$Pwd]: "
225 if [ "$tar"x = x ]; then tar="$Pwd"; fi
226 cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 &&
227 echo ../"$tar".tar.bz2 created.
230 g Compress the current subdirectory to tar.gz
231 Pwd="`basename %d /`"
232 echo -n "Name of the distribution file (without extension) [$Pwd]: "
234 if [ "$tar"x = x ]; then tar="$Pwd"; fi
235 cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz &&
236 echo ../"$tar".tar.gz created.
239 l Compress the current subdirectory to tar.lzma
240 Pwd="`basename %d /`"
241 echo -n "Name of the distribution file (without extension) [$Pwd]: "
243 if [ "$tar"x = x ]; then tar="$Pwd"; fi
244 cd .. && tar cvf - "$Pwd" | lzma -f9 > "$tar".tar.lzma &&
245 echo ../"$tar".tar.lzma created.
248 x Compress the current subdirectory to tar.xz
249 Pwd="`basename %d /`"
250 echo -n "Name of the distribution file (without extension) [$Pwd]: "
252 if [ "$tar"x = x ]; then tar="$Pwd"; fi
253 cd .. && tar cvf - "$Pwd" | xz -f9 > "$tar".tar.xz &&
254 echo ../"$tar".tar.xz created.
257 t Compress the current subdirectory to tar
258 Pwd="`basename %d /`"
259 echo -n "Name of the distribution file (without extension) [$Pwd]: "
261 if [ "$tar"x = x ]; then tar="$Pwd"; fi
262 cd .. && tar cvf - "$Pwd" > "$tar".tar &&
263 echo ../"$tar".tar created.
266 z Compress the current subdirectory to zip
267 Pwd="`basename %d /`"
268 echo -n "Name of the distribution file (without extension) [$Pwd]: "
270 if [ "$zip"x = x ]; then zip="$Pwd"; fi
271 cd .. && zip -r9 "$zip".zip "$Pwd" &&
272 echo ../"$zip".zip created.
275 y Compress the current subdirectory to zip recoding filenames
276 Pwd="`basename %d /`"
277 echo -n "Name of the distribution file (without extension) [$Pwd]: "
279 if [ "$zip"x = x ]; then zip="$Pwd"; fi
280 cd .. && zip.py "$zip".zip "$Pwd" &&
281 echo ../"$zip".zip created.
284 7 Compress the current subdirectory to 7z
285 Pwd="`basename %d /`"
286 echo -n "Name of the distribution file (without extension) [$Pwd]: "
288 if [ "$ar"x = x ]; then ar="$Pwd"; fi
289 cd .. && 7zr a "$ar".7z "$Pwd" &&
290 echo ../"$ar".7z created.
292 + ! f \.(bz2|gz|lz|lzma|7z|xz|zip|ZIP)$ & t lr
296 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
300 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
304 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
308 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
309 z 7z the file/directory
312 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
316 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
317 z zip the file/directory
318 exec zip -r9 %f.zip %f
320 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
321 y zip the file/directory recoding filename(s)
322 exec zip.py %f.zip %f
325 Z zip selected files/directories
326 ZIP=%{Enter zip name}
327 exec zip -r9 "$ZIP" %s
330 Y zip selected files/directories recoding filenames
331 ZIP=%{Enter zip name}
332 exec zip.py "$ZIP" %s
334 + f \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t lr
335 n Create a directory for this archive
337 *.tar.Z) D="`basename %f .tar.Z`";;
338 *.tar.bz2) D="`basename %f .tar.bz2`";;
339 *.tar.gz) D="`basename %f .tar.gz`";;
340 *.tbz2) D="`basename %f .tbz2`";;
341 *.tgz) D="`basename %f .tgz`";;
342 *.tz) D="`basename %f .tz`";;
343 *.tar.lz) D="`basename %f .tar.lz`";;
344 *.tar.lzma) D="`basename %f .tar.lzma`";;
345 *.tar.7z) D="`basename %f .tar.7z`";;
346 *.zip) D="`basename %f .zip`";;
347 *.ZIP) D="`basename %f .ZIP`";;
348 *.rar) D="`basename %f .rar`";;
349 *.RAR) D="`basename %f .RAR`";;
350 *.xz) D="`basename %f .xz`";;
351 *.7z) D="`basename %f .7z`";;
355 + F \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & T r
356 N Create a directory for the other archive
358 *.tar.Z) D="`basename %F .tar.Z`";;
359 *.tar.bz2) D="`basename %F .tar.bz2`";;
360 *.tar.gz) D="`basename %F .tar.gz`";;
361 *.tbz2) D="`basename %F .tbz2`";;
362 *.tgz) D="`basename %F .tgz`";;
363 *.tz) D="`basename %F .tz`";;
364 *.tar.lz) D="`basename %F .tar.lz`";;
365 *.tar.lzma) D="`basename %F .tar.lzma`";;
366 *.tar.7z) D="`basename %F .tar.7z`";;
367 *.zip) D="`basename %F .zip`";;
368 *.ZIP) D="`basename %F .ZIP`";;
369 *.rar) D="`basename %F .rar`";;
370 *.RAR) D="`basename %F .RAR`";;
371 *.xz) D="`basename %F .xz`";;
372 *.7z) D="`basename %F .7z`";;
376 + f \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & t lr
377 x Extract the contents of a compressed tar file
383 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
404 + F \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & T r
405 X Extract the contents of an other compressed tar file
411 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
430 $PRG %D/%F | tar xvpf -
432 + f \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & t lr
433 x Extract a compressed file
435 *.bz2) P="bzip2 -d";;
438 *.lzma) P="lzma -d";;
441 *.tar) P="tar xvpf";;
442 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
443 *.rar|*.RAR) P="unrar x -y";;
447 + F \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & T r
448 X Extract another compressed file
450 *.bz2) P="bzip2 -d";;
453 *.lzma) P="lzma -d";;
456 *.tar) P="tar xvpf";;
457 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
458 *.rar|*.RAR) P="unrar x -y";;
462 + t lr & f \.(zip|ZIP)$
463 y Extract from zip recoding filenames
466 + T r & F \.(zip|ZIP)$
467 Y Extract from other zip recoding filenames
479 C Compare these files
484 exec diff -u --speed-large-files %D/%f %f
488 exec diff -u --speed-large-files %D/%F %f
495 V vimdiff these files
500 exec diff -ru --speed-large-files \
501 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%f %f
503 + t d & T d & ! F ^\.\.$
504 D Diff these directories
505 exec diff -ru --speed-large-files \
506 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%F %f
508 += f \.(asc|gpg|sig(n)?)$ & t lr
512 += f \.[1-8]$ | f \.man$ & t lr
513 1 Display the file with roff -man
517 MAN=%{Enter manual name}
518 %view man -P cat $MAN
521 r rsync the file(s) there
522 rsync -ahPv --del %s %D