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 \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
61 o View OpenDoc with odt2txt
62 odt2txt %f | ${PAGER:-more}
64 + t r & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
65 e Edit OpenDoc with libreoffice
68 += t r & f \.(pdf|PDF|ps|PS|djvu)(\.bz2|\.gz)?$
69 e View pdf/ps/djvu with evince
72 += t r & f \.(doc|DOC|rtf)$
73 d View doc with catdoc
74 catdoc %f | ${PAGER:-more}
76 + t r & f \.(doc|DOC|rtf)$
77 e Edit doc with libreoffice
80 += t r & f \.(docx|DOCX)$
81 d View docx with docx2txt
82 docx2txt %f - | iconv.py -f utf-8 | ${PAGER:-more}
84 + t r & f \.(docx|DOCX)$
85 e Edit docx with libreoffice
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 \.(ico|jp2|tif|TIF|tiff|TIFF)$ | t t
102 = t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$
103 I View icon, JPEG-2000 or TIFF image
106 + t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
107 a Add the audiofile(s) or playlist(s)
108 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
110 # audtool --playlist-addurl "$f"
112 #smplayer -add-to-playlist %s &
113 deadbeef --queue %s &
115 + t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
116 = t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$
117 p Load the audiofile(s) or playlist(s)
118 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
119 #audtool --playlist-clear
121 # audtool --playlist-addurl "$f"
123 #smplayer -send-action pl_remove_all
124 #smplayer -add-to-playlist %s &
125 deadbeef --queue %s &
127 + t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
128 P Play the audiofile(s) or playlist(s)
129 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
130 #audtool --playlist-clear
132 # audtool --playlist-addurl "$f"
134 #exec audtool --playback-play
135 #mplayer -playlist %f &
138 #exec mediaplayer_open %f
141 R Play the playlist in random order
142 "$HOME"/admin/prog/audio-cdr-video/audio/shuffle-playlist.py %f random-playlist-tmp.m3u
143 #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
144 #audtool --playlist-clear
145 #audtool --playlist-addurl random-playlist-tmp.m3u
146 #audtool --playback-play
147 #mplayer -playlist random-playlist-tmp.m3u &
148 #smplayer random-playlist-tmp.m3u &
149 #smplayer -actions pl_shuffle %f &
150 deadbeef --queue random-playlist-tmp.m3u & deadbeef --play
151 #mediaplayer_open random-playlist-tmp.m3u
152 (sleep 5; exec rm random-playlist-tmp.m3u) &
154 + f \.(aac|ac3|ape|cue|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
155 = t r & f \.(aac|ac3|ape|cue|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)$
156 s Play audio/video file(s) or directory with smplayer
159 += t d & f (video_ts|VIDEO_TS)$
160 c Play the current directory with smplayer
163 + t r & f \.(m3u|mp3|MP3|cue|aac|ac3|ape|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
165 exec mplayer -msglevel identify=6 -frames 0 %s
167 + t d & f (video_ts|VIDEO_TS)$
169 exec mplayer -dvd-device . dvd:// -msglevel identify=6 -frames 0
171 + f \.(avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t t
172 m Play video file(s) with mplayer
175 + f \.(m3u|mp3|MP3|cue|aac|ac3|ape|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
176 M Play audio/video with gmplayer
179 + t d & f (video_ts|VIDEO_TS)$
180 d Play DVD directory with mplayer
181 mplayer -dvd-device . dvd:// &
183 + t d & f (video_ts|VIDEO_TS)$
184 D Play DVD directory with gmplayer
185 gmplayer -dvd-device . dvd:// &
187 + t d & f (video_ts|VIDEO_TS)$
188 t Play DVD title with mplayer
190 mplayer -dvd-device . dvd://"$title" &
192 + t d & f (video_ts|VIDEO_TS)$
193 T Play DVD title with gmplayer
195 gmplayer -dvd-device . dvd://"$title" &
198 p Play directory with mplayer
202 P Play directory with gmplayer
206 b Compress the current subdirectory to tar.bz2
207 Pwd="`basename %d /`"
208 echo -n "Name of the distribution file (without extension) [$Pwd]: "
210 if [ "$tar"x = x ]; then tar="$Pwd"; fi
211 cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 &&
212 echo ../"$tar".tar.bz2 created.
215 g Compress the current subdirectory to tar.gz
216 Pwd="`basename %d /`"
217 echo -n "Name of the distribution file (without extension) [$Pwd]: "
219 if [ "$tar"x = x ]; then tar="$Pwd"; fi
220 cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz &&
221 echo ../"$tar".tar.gz created.
224 t Compress the current subdirectory to tar
225 Pwd="`basename %d /`"
226 echo -n "Name of the distribution file (without extension) [$Pwd]: "
228 if [ "$tar"x = x ]; then tar="$Pwd"; fi
229 cd .. && tar cvf - "$Pwd" > "$tar".tar &&
230 echo ../"$tar".tar created.
233 z Compress the current subdirectory to zip
234 Pwd="`basename %d /`"
235 echo -n "Name of the distribution file (without extension) [$Pwd]: "
237 if [ "$zip"x = x ]; then zip="$Pwd"; fi
238 cd .. && zip -r9 "$zip".zip "$Pwd" &&
239 echo ../"$zip".zip created.
242 y Compress the current subdirectory to zip with recoded filenames
243 Pwd="`basename %d /`"
244 echo -n "Name of the distribution file (without extension) [$Pwd]: "
246 if [ "$zip"x = x ]; then zip="$Pwd"; fi
247 cd .. && zip.py "$zip".zip "$Pwd" &&
248 echo ../"$zip".zip created.
250 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
252 exec bzip2 -9 %f.bz2 %f
254 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
258 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
262 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
266 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
267 z 7z the file/directory
270 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
274 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
275 z zip the file/directory
276 exec zip -r9 %f.zip %f
278 + ! f \.bz2$ & ! f \.gz$ & ! f \.lz$ & ! f \.lzma$ & ! f \.7z$ & ! f \.xz$ & ! f \.(zip|ZIP)$
279 y zip the file/directory with recoded filename(s)
280 exec zip.py %f.zip %f
283 Z zip these files/directories
284 ZIP=%{Enter zip name}
285 exec zip -r9 "$ZIP" %s
288 Y zip these files/directories with recoded filenames
289 ZIP=%{Enter zip name}
290 exec zip.py "$ZIP" %s
292 + f \.tar\.bz2$ | f \.tar\.gz$ | f \.tgz$ | f \.tar\.lz$ | f \.tar\.lzma$ | f \.(zip|ZIP)$ | f \.(rar|RAR)$ | f \.7z$ | f \.xz$ & t r
293 n Create a directory for this archive
295 *.tar.bz2) D="`basename %f .tar.bz2`";;
296 *.tar.gz) D="`basename %f .tar.gz`";;
297 *.tgz) D="`basename %f .tgz`";;
298 *.tar.lz) D="`basename %f .tar.lz`";;
299 *.tar.lzma) D="`basename %f .tar.lzma`";;
300 *.zip) D="`basename %f .zip`";;
301 *.ZIP) D="`basename %f .ZIP`";;
302 *.rar) D="`basename %f .rar`";;
303 *.RAR) D="`basename %f .RAR`";;
304 *.7z) D="`basename %f .7z`";;
305 *.xz) D="`basename %f .xz`";;
309 + F \.tar\.bz2$ | F \.tar\.gz$ | F \.tgz$ | F \.tar\.lz$ | F \.tar\.lzma$ | F \.(zip|ZIP)$ | F \.(rar|RAR)$ | F \.7z$ | F \.xz$ & T r
310 N Create a directory for the other archive
312 *.tar.bz2) D="`basename %F .tar.bz2`";;
313 *.tar.gz) D="`basename %F .tar.gz`";;
314 *.tgz) D="`basename %F .tgz`";;
315 *.tar.lz) D="`basename %F .tar.lz`";;
316 *.tar.lzma) D="`basename %F .tar.lzma`";;
317 *.zip) D="`basename %F .zip`";;
318 *.ZIP) D="`basename %F .ZIP`";;
319 *.rar) D="`basename %F .rar`";;
320 *.RAR) D="`basename %F .RAR`";;
321 *.7z) D="`basename %F .7z`";;
322 *.xz) D="`basename %F .xz`";;
326 + f \.(bz2|gz|lz|lzma|7z|xz|tar|zip|ZIP|rar|RAR)$ & t r
327 x Extract a compressed file
329 *.bz2) P="bzip2 -d";;
332 *.lzma) P="lzma -d";;
335 *.tar) P="tar xvpf";;
336 *.zip|*.ZIP) P="uzip";;
337 *.rar|*.RAR) P="rar x -y";;
341 + F \.(bz2|gz|lz|lzma|7z|xz|tar|zip|ZIP|rar|RAR)$ & T r
342 x Extract another compressed file
344 *.bz2) P="bzip2 -cd";;
347 *.lzma) P="lzma -cd";;
350 *.tar) P="tar xvpf";;
351 *.zip|*.ZIP) P="uzip";;
352 *.rar|*.RAR) P="rar x -y";;
356 + f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lzma$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.Z$ | f \.tar\.bz2$ & t r
357 x Extract the contents of a compressed tar file
363 *.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z)
384 + F \.tar\.gz$ | F \.tar\.z$ | F \.tgz$ | F \.tpz$ | F \.tar\.lz$ | F \.tar\.lzma$ | F \.tar\.7z$ | F \.tar\.xz$ | F \.tar\.Z$ | F \.tar\.bz2$ & t r
385 X Extract the contents of an other compressed tar file
391 *.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z)
410 $PRG %D/%F | tar xvf -
412 + t r & f \.(zip|ZIP)$
413 y Extract from zip with recoded filenames
416 + T r & F \.(zip|ZIP)$
417 y Extract from other zip with recoded filenames
429 C Compare these files
434 exec diff -u --speed-large-files %D/%f %f
438 exec diff -u --speed-large-files %D/%F %f
445 V vimdiff these files
450 exec diff -ru --speed-large-files %D/%f %f
452 + t d & T d & ! F ^\.\.$
453 D Diff these directories
454 exec diff -ru --speed-large-files %D/%F %f
456 += f \.(asc|sig(n)?)$ & t r
460 += f \.[1-8]$ | f \.man$ & t r
461 1 Display the file with roff -man
465 MAN=%{Enter manual name}
466 %view man -P cat $MAN
469 r rsync the file(s) there
470 rsync -ahP --del %s %D