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