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
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|doc|DOC|rtf|docx|DOCX|xls|XLS|xlsx|XLSX)$
77 e Edit (Open)Docs with libreoffice
80 += t r & f \.(doc|DOC|rtf)$
81 d View doc with catdoc
82 catdoc %f | ${PAGER:-more}
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 \.(xls|XLS)$
89 x View xls with xls2csv
90 xls2csv %f | ${PAGER:-more}
92 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
93 = t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
94 i View image(s) scaled
95 xli -title "`echo %s | sed 's/ /_/g'`" -zoom auto %s &
97 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t
98 I View image(s) full size
99 xli -title "`echo %s | sed 's/ /_/g'`" %s &
101 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
105 + t r & f \.(ico|jp2|tif|TIF|tiff|TIFF|webp)$ | t t
106 = t r & f \.(ico|jp2|tif|TIF|tiff|TIFF|webp)$
107 I View icon, JPEG-2000, TIFF, WebP 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 #smplay -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 #smplay -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 #mplay -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 #mplay -playlist random-playlist-tmp.m3u &
152 #smplay random-playlist-tmp.m3u &
153 #smplay -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 mpv
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 asking audio volume
182 AUDIO_VOLUME=%{Enter volume}
183 AUDIO_VOLUME=$AUDIO_VOLUME mplay %s &
185 + 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
186 M Play audio/video with mpv GUI
189 += t d & f (video_ts|VIDEO_TS)$
190 d Play DVD directory with mpv
191 mplay -dvd-device . dvd:// &
193 + t d & f (video_ts|VIDEO_TS)$
194 D Play DVD directory with mpv GUI
195 gmplay -dvd-device . dvd:// &
197 + t d & f (video_ts|VIDEO_TS)$
198 t Play DVD title with mpv
200 mplay -dvd-device . dvd://"$title" &
202 + t d & f (video_ts|VIDEO_TS)$
203 T Play DVD title with mpv GUI
205 gmplay -dvd-device . dvd://"$title" &
208 p Play directory with mpv
212 P Play directory with mpv GUI
216 b Compress the current subdirectory to tar.bz2
217 Pwd="`basename %d /`"
218 echo -n "Name of the distribution file (without extension) [$Pwd]: "
220 if [ "$tar"x = x ]; then tar="$Pwd"; fi
221 cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 &&
222 echo ../"$tar".tar.bz2 created.
225 g Compress the current subdirectory to tar.gz
226 Pwd="`basename %d /`"
227 echo -n "Name of the distribution file (without extension) [$Pwd]: "
229 if [ "$tar"x = x ]; then tar="$Pwd"; fi
230 cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz &&
231 echo ../"$tar".tar.gz created.
234 l Compress the current subdirectory to tar.lzma
235 Pwd="`basename %d /`"
236 echo -n "Name of the distribution file (without extension) [$Pwd]: "
238 if [ "$tar"x = x ]; then tar="$Pwd"; fi
239 cd .. && tar cvf - "$Pwd" | lzma -f9 > "$tar".tar.lzma &&
240 echo ../"$tar".tar.lzma created.
243 x Compress the current subdirectory to tar.xz
244 Pwd="`basename %d /`"
245 echo -n "Name of the distribution file (without extension) [$Pwd]: "
247 if [ "$tar"x = x ]; then tar="$Pwd"; fi
248 cd .. && tar cvf - "$Pwd" | xz -f9 > "$tar".tar.xz &&
249 echo ../"$tar".tar.xz created.
252 t Compress the current subdirectory to tar
253 Pwd="`basename %d /`"
254 echo -n "Name of the distribution file (without extension) [$Pwd]: "
256 if [ "$tar"x = x ]; then tar="$Pwd"; fi
257 cd .. && tar cvf - "$Pwd" > "$tar".tar &&
258 echo ../"$tar".tar created.
261 z Compress the current subdirectory to zip
262 Pwd="`basename %d /`"
263 echo -n "Name of the distribution file (without extension) [$Pwd]: "
265 if [ "$zip"x = x ]; then zip="$Pwd"; fi
266 cd .. && zip -r9 "$zip".zip "$Pwd" &&
267 echo ../"$zip".zip created.
270 y Compress the current subdirectory to zip recoding filenames
271 Pwd="`basename %d /`"
272 echo -n "Name of the distribution file (without extension) [$Pwd]: "
274 if [ "$zip"x = x ]; then zip="$Pwd"; fi
275 cd .. && zip.py "$zip".zip "$Pwd" &&
276 echo ../"$zip".zip created.
279 7 Compress the current subdirectory to 7z
280 Pwd="`basename %d /`"
281 echo -n "Name of the distribution file (without extension) [$Pwd]: "
283 if [ "$ar"x = x ]; then ar="$Pwd"; fi
284 cd .. && 7zr a "$ar".7z "$Pwd" &&
285 echo ../"$ar".7z created.
287 + ! f \.(bz2|gz|lz|lzma|7z|xz|zip|ZIP)$ & t r
291 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
295 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
299 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
303 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
304 z 7z the file/directory
307 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
311 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
312 z zip the file/directory
313 exec zip -r9 %f.zip %f
315 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
316 y zip the file/directory recoding filename(s)
317 exec zip.py %f.zip %f
320 Z zip selected files/directories
321 ZIP=%{Enter zip name}
322 exec zip -r9 "$ZIP" %s
325 Y zip selected files/directories recoding filenames
326 ZIP=%{Enter zip name}
327 exec zip.py "$ZIP" %s
329 + f \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
330 n Create a directory for this archive
332 *.tar.Z) D="`basename %f .tar.Z`";;
333 *.tar.bz2) D="`basename %f .tar.bz2`";;
334 *.tar.gz) D="`basename %f .tar.gz`";;
335 *.tbz2) D="`basename %f .tbz2`";;
336 *.tgz) D="`basename %f .tgz`";;
337 *.tz) D="`basename %f .tz`";;
338 *.tar.lz) D="`basename %f .tar.lz`";;
339 *.tar.lzma) D="`basename %f .tar.lzma`";;
340 *.tar.7z) D="`basename %f .tar.7z`";;
341 *.zip) D="`basename %f .zip`";;
342 *.ZIP) D="`basename %f .ZIP`";;
343 *.rar) D="`basename %f .rar`";;
344 *.RAR) D="`basename %f .RAR`";;
345 *.xz) D="`basename %f .xz`";;
346 *.7z) D="`basename %f .7z`";;
350 + F \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & T r
351 N Create a directory for the other archive
353 *.tar.Z) D="`basename %F .tar.Z`";;
354 *.tar.bz2) D="`basename %F .tar.bz2`";;
355 *.tar.gz) D="`basename %F .tar.gz`";;
356 *.tbz2) D="`basename %F .tbz2`";;
357 *.tgz) D="`basename %F .tgz`";;
358 *.tz) D="`basename %F .tz`";;
359 *.tar.lz) D="`basename %F .tar.lz`";;
360 *.tar.lzma) D="`basename %F .tar.lzma`";;
361 *.tar.7z) D="`basename %F .tar.7z`";;
362 *.zip) D="`basename %F .zip`";;
363 *.ZIP) D="`basename %F .ZIP`";;
364 *.rar) D="`basename %F .rar`";;
365 *.RAR) D="`basename %F .RAR`";;
366 *.xz) D="`basename %F .xz`";;
367 *.7z) D="`basename %F .7z`";;
371 + f \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & t r
372 x Extract the contents of a compressed tar file
378 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
399 + F \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & T r
400 X Extract the contents of an other compressed tar file
406 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
425 $PRG %D/%F | tar xvpf -
427 + f \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & t r
428 x Extract a compressed file
430 *.bz2) P="bzip2 -d";;
433 *.lzma) P="lzma -d";;
436 *.tar) P="tar xvpf";;
437 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
438 *.rar|*.RAR) P="unrar x -y";;
442 + F \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & T r
443 X Extract another compressed file
445 *.bz2) P="bzip2 -d";;
448 *.lzma) P="lzma -d";;
451 *.tar) P="tar xvpf";;
452 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
453 *.rar|*.RAR) P="unrar x -y";;
457 + t r & f \.(zip|ZIP)$
458 y Extract from zip recoding filenames
461 + T r & F \.(zip|ZIP)$
462 Y Extract from other zip recoding filenames
474 C Compare these files
479 exec diff -u --speed-large-files %D/%f %f
483 exec diff -u --speed-large-files %D/%F %f
490 V vimdiff these files
495 exec diff -ru --speed-large-files \
496 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%f %f
498 + t d & T d & ! F ^\.\.$
499 D Diff these directories
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 += f \.(asc|sig(n)?)$ & t r
507 += f \.[1-8]$ | f \.man$ & t r
508 1 Display the file with roff -man
512 MAN=%{Enter manual name}
513 %view man -P cat $MAN
516 r rsync the file(s) there
517 rsync -ahPv --del %s %D