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