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 \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$
113 + t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$ | t t
114 = t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$
115 I View icon, JPEG-2000 or TIFF image
118 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
119 a Add the audiofile(s) or playlist(s)
120 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
122 # audtool --playlist-addurl "$f"
124 #smplayer -add-to-playlist %s &
125 deadbeef --queue %s &
127 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
128 = t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$
129 p Load the audiofile(s) or playlist(s)
130 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
131 #audtool --playlist-clear
133 # audtool --playlist-addurl "$f"
135 #smplayer -send-action pl_remove_all
136 #smplayer -add-to-playlist %s &
137 deadbeef --queue %s &
139 + t r & f \.(aac|ac3|ape|cue|dts|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
140 P Play the audiofile(s) or playlist(s)
141 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
142 #audtool --playlist-clear
144 # audtool --playlist-addurl "$f"
146 #exec audtool --playback-play
147 #mplayer -playlist %f &
150 #exec mediaplayer_open %f
153 R Play the playlist in random order
154 "$HOME"/admin/prog/audio-cdr-video/audio/shuffle-playlist.py %f random-playlist-tmp.m3u
155 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
156 #audtool --playlist-clear
157 #audtool --playlist-addurl random-playlist-tmp.m3u
158 #audtool --playback-play
159 #mplayer -playlist random-playlist-tmp.m3u &
160 #smplayer random-playlist-tmp.m3u &
161 #smplayer -actions pl_shuffle %f &
162 deadbeef --queue random-playlist-tmp.m3u & deadbeef --play
163 #mediaplayer_open random-playlist-tmp.m3u
164 (sleep 5; exec rm random-playlist-tmp.m3u) &
166 + 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
167 s Play audio/video file(s) or directory with smplayer
170 + t d & f (video_ts|VIDEO_TS)$
171 c Play the current directory with smplayer
174 + 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)$
176 exec "$HOME"/.config/mpv/mpv_identify.sh %f
178 + t d & f (video_ts|VIDEO_TS)$
180 exec "$HOME"/.config/mpv/mpv_identify.sh .
182 + 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
183 = 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)$
184 m Play video file(s) with mplayer
187 + 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
188 M Play audio/video with gmplayer
191 += t d & f (video_ts|VIDEO_TS)$
192 d Play DVD directory with mplayer
193 mplayer -dvd-device . dvd:// &
195 + t d & f (video_ts|VIDEO_TS)$
196 D Play DVD directory with gmplayer
197 gmplayer -dvd-device . dvd:// &
199 + t d & f (video_ts|VIDEO_TS)$
200 t Play DVD title with mplayer
202 mplayer -dvd-device . dvd://"$title" &
204 + t d & f (video_ts|VIDEO_TS)$
205 T Play DVD title with gmplayer
207 gmplayer -dvd-device . dvd://"$title" &
210 p Play directory with mplayer
214 P Play directory with gmplayer
218 b Compress the current subdirectory to tar.bz2
219 Pwd="`basename %d /`"
220 echo -n "Name of the distribution file (without extension) [$Pwd]: "
222 if [ "$tar"x = x ]; then tar="$Pwd"; fi
223 cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 &&
224 echo ../"$tar".tar.bz2 created.
227 g Compress the current subdirectory to tar.gz
228 Pwd="`basename %d /`"
229 echo -n "Name of the distribution file (without extension) [$Pwd]: "
231 if [ "$tar"x = x ]; then tar="$Pwd"; fi
232 cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz &&
233 echo ../"$tar".tar.gz created.
236 l Compress the current subdirectory to tar.lzma
237 Pwd="`basename %d /`"
238 echo -n "Name of the distribution file (without extension) [$Pwd]: "
240 if [ "$tar"x = x ]; then tar="$Pwd"; fi
241 cd .. && tar cvf - "$Pwd" | lzma -f9 > "$tar".tar.lzma &&
242 echo ../"$tar".tar.lzma created.
245 x Compress the current subdirectory to tar.xz
246 Pwd="`basename %d /`"
247 echo -n "Name of the distribution file (without extension) [$Pwd]: "
249 if [ "$tar"x = x ]; then tar="$Pwd"; fi
250 cd .. && tar cvf - "$Pwd" | xz -f9 > "$tar".tar.xz &&
251 echo ../"$tar".tar.xz created.
254 t Compress the current subdirectory to tar
255 Pwd="`basename %d /`"
256 echo -n "Name of the distribution file (without extension) [$Pwd]: "
258 if [ "$tar"x = x ]; then tar="$Pwd"; fi
259 cd .. && tar cvf - "$Pwd" > "$tar".tar &&
260 echo ../"$tar".tar created.
263 z Compress the current subdirectory to zip
264 Pwd="`basename %d /`"
265 echo -n "Name of the distribution file (without extension) [$Pwd]: "
267 if [ "$zip"x = x ]; then zip="$Pwd"; fi
268 cd .. && zip -r9 "$zip".zip "$Pwd" &&
269 echo ../"$zip".zip created.
272 y Compress the current subdirectory to zip with recoded filenames
273 Pwd="`basename %d /`"
274 echo -n "Name of the distribution file (without extension) [$Pwd]: "
276 if [ "$zip"x = x ]; then zip="$Pwd"; fi
277 cd .. && zip.py "$zip".zip "$Pwd" &&
278 echo ../"$zip".zip created.
281 7 Compress the current subdirectory to 7z
282 Pwd="`basename %d /`"
283 echo -n "Name of the distribution file (without extension) [$Pwd]: "
285 if [ "$ar"x = x ]; then ar="$Pwd"; fi
286 cd .. && 7zr a "$ar".7z "$Pwd" &&
287 echo ../"$ar".7z created.
289 + ! f \.(bz2|gz|lz|lzma|7z|xz|zip|ZIP)$ & 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
305 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
306 z 7z the file/directory
309 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
313 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
314 z zip the file/directory
315 exec zip -r9 %f.zip %f
317 + ! f \.(z|Z|bz2|gz|lz|lzma)|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
318 y zip the file/directory with recoded filename(s)
319 exec zip.py %f.zip %f
322 Z zip these files/directories
323 ZIP=%{Enter zip name}
324 exec zip -r9 "$ZIP" %s
327 Y zip these files/directories with recoded filenames
328 ZIP=%{Enter zip name}
329 exec zip.py "$ZIP" %s
331 + f \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & t r
332 n Create a directory for this archive
334 *.tar.Z) D="`basename %f .tar.Z`";;
335 *.tar.bz2) D="`basename %f .tar.bz2`";;
336 *.tar.gz) D="`basename %f .tar.gz`";;
337 *.tbz2) D="`basename %f .tbz2`";;
338 *.tgz) D="`basename %f .tgz`";;
339 *.tz) D="`basename %f .tz`";;
340 *.tar.lz) D="`basename %f .tar.lz`";;
341 *.tar.lzma) D="`basename %f .tar.lzma`";;
342 *.tar.7z) D="`basename %f .tar.7z`";;
343 *.zip) D="`basename %f .zip`";;
344 *.ZIP) D="`basename %f .ZIP`";;
345 *.rar) D="`basename %f .rar`";;
346 *.RAR) D="`basename %f .RAR`";;
347 *.xz) D="`basename %f .xz`";;
348 *.7z) D="`basename %f .7z`";;
352 + F \.(tar\.(z|Z|bz2|gz|lz|lzma))|(tbz2|tgz|tz|zip|ZIP|rar|RAR|xz|7z)$ & T r
353 N Create a directory for the other archive
355 *.tar.Z) D="`basename %F .tar.Z`";;
356 *.tar.bz2) D="`basename %F .tar.bz2`";;
357 *.tar.gz) D="`basename %F .tar.gz`";;
358 *.tbz2) D="`basename %F .tbz2`";;
359 *.tgz) D="`basename %F .tgz`";;
360 *.tz) D="`basename %F .tz`";;
361 *.tar.lz) D="`basename %F .tar.lz`";;
362 *.tar.lzma) D="`basename %F .tar.lzma`";;
363 *.tar.7z) D="`basename %F .tar.7z`";;
364 *.zip) D="`basename %F .zip`";;
365 *.ZIP) D="`basename %F .ZIP`";;
366 *.rar) D="`basename %F .rar`";;
367 *.RAR) D="`basename %F .RAR`";;
368 *.xz) D="`basename %F .xz`";;
369 *.7z) D="`basename %F .7z`";;
373 + f \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & t r
374 x Extract the contents of a compressed tar file
380 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
401 + F \.(tar\.(z|Z|bz2|gz|lz|lzma|7z|xz))|(tbz2|tgz|tz)$ & T r
402 X Extract the contents of an other compressed tar file
408 *.tar.gz|*.tar.z|*.tgz|*.tz|*.tar.Z)
427 $PRG %D/%F | tar xvpf -
429 + f \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & t r
430 x Extract a compressed file
432 *.bz2) P="bzip2 -d";;
435 *.lzma) P="lzma -d";;
438 *.tar) P="tar xvpf";;
439 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
440 *.rar|*.RAR) P="unrar x -y";;
444 + F \.(bz2|egg|gz|lz|lzma|7z|xz|tar|whl|zip|ZIP|rar|RAR)$ & T r
445 X Extract another compressed file
447 *.bz2) P="bzip2 -d";;
450 *.lzma) P="lzma -d";;
453 *.tar) P="tar xvpf";;
454 *.egg|*.whl|*.zip|*.ZIP) P="unzip";;
455 *.rar|*.RAR) P="unrar x -y";;
459 + t r & f \.(zip|ZIP)$
460 y Extract from zip with recoded filenames
463 + T r & F \.(zip|ZIP)$
464 Y Extract from other zip with recoded filenames
476 C Compare these files
481 exec diff -u --speed-large-files %D/%f %f
485 exec diff -u --speed-large-files %D/%F %f
492 V vimdiff these files
497 exec diff -ru --speed-large-files \
498 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%f %f
500 + t d & T d & ! F ^\.\.$
501 D Diff these directories
502 exec diff -ru --speed-large-files \
503 -x CVS -x .git -x .hg -x .svn -x '*.py[co]' -x __pycache__ %D/%F %f
505 += f \.(asc|sig(n)?)$ & t r
509 += f \.[1-8]$ | f \.man$ & t r
510 1 Display the file with roff -man
514 MAN=%{Enter manual name}
515 %view man -P cat $MAN
518 r rsync the file(s) there
519 rsync -ahPv --del %s %D