]> git.phdru.name Git - dotfiles.git/blob - .mc/menu
View OpenDoc with odt2txt
[dotfiles.git] / .mc / menu
1 shell_patterns=0
2
3 # This is necessary to overcome a bug in mc - without this
4 # mc makes default wrong item
5 :  NOOP
6    :
7
8 @  Do something on all of the file(s) at once
9    CMD=%{Enter command}
10    exec $CMD %s
11
12 + t t
13 @  Do something on the tagged files one by one
14    CMD=%{Enter command}
15    for f in %t; do
16      $CMD "$f"
17    done
18
19 + t r
20 p  View the file in a pager
21    exec ${PAGER:-more} %f
22
23 + t r
24 b  View the file in a browser
25    exec webbrowser file://%d/%f
26
27 + t r
28 w  View the file in a new browser window
29    exec webbrowser -n file://%d/%f
30
31 + t r
32 = f \.(htm(l?)|txt)$
33 t  View the file in a new browser tab
34    exec webbrowser -t file://%d/%f
35
36 += f \.fb2(\.bz2|\.gz|\.zip)?$ | f \.(chm|epub|htm(l?)|txt|rtf)$ & t r
37 f  View fb2/chm/epub with fbreader
38    fbreader %f &
39
40 + t r & f \.fb2(\.bz2|\.gz|\.zip)$
41 H  fb2html
42    case %f in
43      *.fb2.bz2) A="bunzip2 -c" ;;
44      *.fb2.gz) A="gunzip -c" ;;
45      *.fb2.zip) A="unzip -p" ;;
46      *.fb2) A="cat" ;;
47    esac
48    $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_html_ru.xsl - | webstdin -t
49
50 + t r & f \.fb2(\.bz2|\.gz|\.zip)$
51 T  fb2txt
52    case %f in
53      *.fb2.bz2) A="bunzip2 -c" ;;
54      *.fb2.gz) A="gunzip -c" ;;
55      *.fb2.zip) A="unzip -p" ;;
56      *.fb2) A="cat" ;;
57    esac
58    $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl - | webstdin -e txt -t
59
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}
63
64 += t r & f \.(pdf|PDF|djvu)(\.bz2|\.gz)?$
65 e  View pdf/djvu with evince
66    evince %f &
67
68 += t r & f \.(doc|DOC|rtf)$
69 d  View doc with catdoc
70    catdoc %f | ${PAGER:-more}
71
72 += t r & f \.(docx|DOCX)$
73 d  View docx with docx2txt
74    docx2txt %f - | ${PAGER:-more}
75
76 += t r & f \.(xls|XLS)$
77 x  View xls with xls2csv
78    xls2csv %f | ${PAGER:-more}
79
80 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|xpm)$ | t t
81 = t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|xpm)$
82 i  View image(s) scaled
83    xli -title "`echo %s | sed 's/ /_/g'`" -zoom auto %s &
84
85 + t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|xpm)$ | t t
86 I  View image(s) full size
87    xli -title "`echo %s | sed 's/ /_/g'`" %s &
88
89 + t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$ | t t
90 = t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$
91 I  View icon, JPEG-2000 or TIFF image
92    display %s &
93
94 + t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
95 a  Add the audiofile(s) or playlist(s)
96    #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
97    #for f in %s; do
98    #   audtool --playlist-addurl "$f"
99    #done
100    #smplayer -add-to-playlist %s &
101    deadbeef --queue %s &
102
103 + t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
104 = t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$
105 p  Load the audiofile(s) or playlist(s)
106    #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
107    #audtool --playlist-clear
108    #for f in %s; do
109    #   audtool --playlist-addurl "$f"
110    #done
111    #smplayer -send-action pl_remove_all
112    #smplayer -add-to-playlist %s &
113    deadbeef --queue %s &
114
115 + t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|ogg|OGG|pls|WAV|wav|wv)$ | t t
116 P  Play the audiofile(s) or playlist(s)
117    #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
118    #audtool --playlist-clear
119    #for f in %s; do
120    #   audtool --playlist-addurl "$f"
121    #done
122    #exec audtool --playback-play
123    #mplayer -playlist %f &
124    #smplayer %s &
125    deadbeef %s &
126    #exec mediaplayer_open %f
127
128 + t r & f \.m3u
129 R  Play the playlist in random order
130    "$HOME"/admin/prog/audio-cdr-video/audio/shuffle-playlist.py %f random-playlist-tmp.m3u
131    #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi
132    #audtool --playlist-clear
133    #audtool --playlist-addurl random-playlist-tmp.m3u
134    #audtool --playback-play
135    #mplayer -playlist random-playlist-tmp.m3u &
136    #smplayer random-playlist-tmp.m3u &
137    #smplayer -actions pl_shuffle %f &
138    deadbeef --queue random-playlist-tmp.m3u & deadbeef --play
139    #mediaplayer_open random-playlist-tmp.m3u
140    (sleep 5; exec rm random-playlist-tmp.m3u) &
141
142 + 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
143 = 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)$
144 s  Play audio/video file(s) or directory with smplayer
145    smplayer %s &
146
147 += t d & f (video_ts|VIDEO_TS)$
148 c  Play the current directory with smplayer
149    smplayer . &
150
151 + 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
152 i  Audio/video info
153    exec mplayer -msglevel identify=6 -frames 0 %s
154
155 + t d & f (video_ts|VIDEO_TS)$
156 i  DVD info
157    exec mplayer -dvd-device . dvd:// -msglevel identify=6 -frames 0
158
159 + f \.(avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t t
160 m  Play video file(s) with mplayer
161    mplayer %s &
162
163 + 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
164 M  Play audio/video with gmplayer
165    gmplayer %s &
166
167 + t d & f (video_ts|VIDEO_TS)$
168 d  Play DVD directory with mplayer
169    mplayer -dvd-device . dvd:// &
170
171 + t d & f (video_ts|VIDEO_TS)$
172 D  Play DVD directory with gmplayer
173    gmplayer -dvd-device . dvd:// &
174
175 + t d & f (video_ts|VIDEO_TS)$
176 t  Play DVD title with mplayer
177    title=%{Enter title}
178    mplayer -dvd-device . dvd://"$title" &
179
180 + t d & f (video_ts|VIDEO_TS)$
181 T  Play DVD title with gmplayer
182    title=%{Enter title}
183    gmplayer -dvd-device . dvd://"$title" &
184
185 + t d
186 p  Play directory with mplayer
187    mplayer %f/* &
188
189 + t d
190 P  Play directory with gmplayer
191    gmplayer %f/* &
192
193 + t d & f ^\.\.$
194 b  Make a .tar.bz2 release of the current directory
195    Pwd="`basename %d /`"
196    echo -n "Name of the distribution file (without extension) [$Pwd]: "
197    read tar
198    if [ "$tar"x = x ]; then tar="$Pwd"; fi
199    cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2
200    echo ../"$tar".tar.bz2 created.
201
202 + t d & f ^\.\.$
203 g  Make a .tar.gz release of the current directory
204    Pwd="`basename %d /`"
205    echo -n "Name of the distribution file (without extension) [$Pwd]: "
206    read tar
207    if [ "$tar"x = x ]; then tar="$Pwd"; fi
208    cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz
209    echo ../"$tar".tar.gz created.
210
211 + t d & f ^\.\.$
212 t  Make a .tar release of the current directory
213    Pwd="`basename %d /`"
214    echo -n "Name of the distribution file (without extension) [$Pwd]: "
215    read tar
216    if [ "$tar"x = x ]; then tar="$Pwd"; fi
217    cd .. && tar cvf - "$Pwd" > "$tar".tar
218    echo ../"$tar".tar created.
219
220 + t d & f ^\.\.$
221 z  Make a .zip release of the current directory
222    Pwd="`basename %d /`"
223    echo -n "Name of the distribution file (without extension) [$Pwd]: "
224    read zip
225    if [ "$zip"x = x ]; then zip="$Pwd"; fi
226    cd .. && zip -r9 "$zip".zip "$Pwd"
227    echo ../"$zip".zip created.
228
229 + t d & f ^\.\.$
230 y  Make a .zip release of the current directory with recoded filenames
231    Pwd="`basename %d /`"
232    echo -n "Name of the distribution file (without extension) [$Pwd]: "
233    read zip
234    if [ "$zip"x = x ]; then zip="$Pwd"; fi
235    cd .. && zip.py "$zip".zip "$Pwd"
236    echo ../"$zip".zip created.
237
238 + ! f \.(\.|zip|ZIP)$
239 z  zip the file/directory
240    exec zip -r9 %f.zip %f
241
242 + ! f \.(\.|zip|ZIP)$
243 y  zip the file/directory with recoded filename(s)
244    exec zip.py %f.zip %f
245
246 + t t
247 Z  zip these files/directories
248    ZIP=%{Enter zip name}
249    exec zip -r9 "$ZIP" %s
250
251 + t t
252 Y  zip these files/directories with recoded filenames
253    ZIP=%{Enter zip name}
254    exec zip.py "$ZIP" %s
255
256 + t r & f \.tar\.bz2$
257 u  Extract from tar-bzip2
258    exec bzip2 -cd %f | tar xpvf -
259
260 + f \.tar\.gz$ | f \.tgz$ & t r
261 u  Extract from tar-gzip
262    exec gzip -cd %f | tar xpvf -
263
264 + t r & f \.tar$
265 u  Extract from tar
266    exec tar xpvf %f
267
268 + t r & f \.(zip|ZIP)$
269 u  Extract from zip
270    exec unzip %f
271
272 + t r & f \.(zip|ZIP)$
273 y  Extract from zip with recoded filenames
274    exec unzip.py %f
275
276 + t r & f \.7z$
277 u  Extract from 7zip
278    exec 7zr x %f
279
280 + t r & f \.(rar|RAR)$
281 u  Extract from rar
282    exec unrar x -y %f
283
284 + t r & f \.tar\.xz$
285 u  Extract from tar-xz
286    exec xz -cd %f | tar xpvf -
287
288 + T r & F \.tar\.bz2$
289 U  Extract from the other tar-bzip2
290    exec bzip2 -cd %D/%F | tar xpvf -
291
292 + F \.tar\.gz$ | F \.tgz$ & T r
293 U  Extract from the other tar-gzip
294    exec gzip -cd %D/%F | tar xpvf -
295
296 + T r & F \.tar$
297 U  Extract from the other tar
298    exec tar xpvf %D/%F
299
300 + T r & F \.(zip|ZIP)$
301 U  Extract from the other zip
302    exec unzip %D/%F
303
304 + T r & F \.(zip|ZIP)$
305 Y  Extract from the other zip with recoded filenames
306    exec unzip.py %D/%F
307
308 + T r & F \.(rar|RAR)$
309 U  Extract from the other rar
310    exec unrar x -y %D/%F
311
312 + T r & F \.7z$
313 U  Extract from 7zip
314    exec 7zr x %D/%F
315
316 + T r & F \.tar\.xz$
317 U  Extract from tar-xz
318    exec xz -cd %D/%F | tar xpvf -
319
320 + f \.tar\.bz2$ | f \.tar\.gz$ | f \.tgz$ | f \.(zip|ZIP)$ | f \.(rar|RAR)$ | f \.7z$ & t r
321 n  Create a directory for this archive
322    case %f in
323      *.tar.bz2) D="`basename %f .tar.bz2`";;
324      *.tar.gz) D="`basename %f .tar.gz`";;
325      *.tgz)    D="`basename %f .tgz`";;
326      *.zip)    D="`basename %f .zip`";;
327      *.ZIP)    D="`basename %f .ZIP`";;
328      *.rar)    D="`basename %f .rar`";;
329      *.RAR)    D="`basename %f .RAR`";;
330      *.7z)     D="`basename %f .7z`";;
331    esac
332    exec mkdir "$D"
333
334 + F \.tar\.bz2$ | F \.tar\.gz$ | F \.tgz$ | F \.(zip|ZIP)$ | F \.(rar|RAR)$ | F \.7z$ & T r
335 N  Create a directory for this archive
336    case %F in
337      *.tar.bz2) D="`basename %F .tar.bz2`";;
338      *.tar.gz) D="`basename %F .tar.gz`";;
339      *.tgz)    D="`basename %F .tgz`";;
340      *.zip)    D="`basename %F .zip`";;
341      *.ZIP)    D="`basename %F .ZIP`";;
342      *.rar)    D="`basename %F .rar`";;
343      *.RAR)    D="`basename %F .RAR`";;
344      *.7z)     D="`basename %F .7z`";;
345    esac
346    exec mkdir "$D"
347
348 + t r
349 v  View via mailcap
350    exec see %f
351
352 + t r
353 c  Compare the file
354    exec cmp %D/%f %f
355
356 + t r & T r
357 C  Compare these files
358    exec cmp %D/%F %f
359
360 + t r
361 d  Diff the file
362    exec diff -u --speed-large-files %D/%f %f
363
364 + t r & T r
365 D  Diff these files
366    exec diff -u --speed-large-files %D/%F %f
367
368 + t r
369 v  vimdiff the file
370    exec vim -d %D/%f %f
371
372 + t r & T r
373 V  vimdiff these files
374    exec vim -d %D/%F %f
375
376 + t d & ! f ^\.\.$
377 d  Diff the directory
378    exec diff -ru --speed-large-files %D/%f %f
379
380 + t d & T d & ! F ^\.\.$
381 D  Diff these directories
382    exec diff -ru --speed-large-files %D/%F %f
383
384 += f \.(asc|sig(n)?)$ & t r
385 v  Verify signature
386    exec gpg --verify %f
387
388 += f \.[1-8]$ | f \.man$ & t r
389 1  Display the file with roff -man
390    %view nroff -man %f
391
392 m  View a manual page
393    MAN=%{Enter manual name}
394    %view man -P cat $MAN
395
396 + t r | t d | t t
397 r  rsync the file(s) there
398    rsync -ahP --del %s %D