[email protected]
[Top] [All Lists]

Re: From Tuxcmd to Midnight Commander - Editing menu file

Subject: Re: From Tuxcmd to Midnight Commander - Editing menu file
From: Michelle Konzack
Date: Tue, 15 Apr 2008 19:19:16 +0200
Am 2008-04-12 06:20:18, schrieb Leandro Chescotta:
> Well, right now i edited my ~/.mc/menu file so when i press F2 i get a menu
> with my additions, but the thing is, that i need that depending on the
> selected file when i press F2, the menu displays the corresponding options
> depending on the file type, but i barely understand the conditions and
> subconditions thing... This i make works, but no matter what file type i
> press F2, always i get the same menu... With everything! =(

I do not know whats going on, but If I use your settings,
select a file and hit F2, my Midnight Commander Segfault...

OK I have striped down your file and corrected the pattern line to:

----[ '~/.mc/menu' ]----------------------------------------------------
shell_patterns=0

#### Audio File Menu ####
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | 
f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ $ & t n
1       mplayer
        mplayer %f
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | 
f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ $ & t n
2       aplay
        aplay %f
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | 
f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ $ & t n
3       ffmpeg -i (show audio/video info)
        ffmpeg -i %f
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | 
f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ $ & t n
4       audacity
        audacity %f
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | 
f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ $ & t n
5       Encode to *.mp3
        enc2mp3 %f
------------------------------------------------------------------------

and it show me mc_menu_1.jpg for the WAVE file and mc_menu_2.jpg for the
menu.leandro since it has not found any usable RegExp.

Now I put it ON THE BEGINNING of the original ~/.mc/menu file and I get
mc_menu_3.jpg for the WAVE file and mc_menu_4.jpg for the menu.leandro.

Note: I do not know, whether it was your MUA or you, but the lines like

      + f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f 
\.flac$ | f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ $ & t 
n

      should be in ONE line and not splited.

So if you follow this steps, (maybe  you  should  start  with  an  empty
~/.mc/menu file) you can develop the exact behaviour you want.

I personaly dislike the default ~/.mc/menu  file  and  have  it  heavyly
striped down and modified.

Attached the working ~/.mx/menu file.  :-)

Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: menu
Description: Text document

_______________________________________________
Mc mailing list
http://mail.gnome.org/mailman/listinfo/mc
<Prev in Thread] Current Thread [Next in Thread>