[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: From Tuxcmd to Midnight Commander - Editing menu file



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: mc_menu_1.jpg
Description: JPEG image

Attachment: mc_menu_2.jpg
Description: JPEG image

Attachment: mc_menu_3.jpg
Description: JPEG image

Attachment: mc_menu_4.jpg
Description: JPEG image

shell_patterns=0

#####################
####             ####
#### Added by me ####
####             ####
#####################

#### Video File Menu ####
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ $ & t n
1       ffmpeg -i (show audio/video info)
        ffmpeg -i %f
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ $ & t n
2       vlc
        vlc %f
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ $ & t n
3       Encode to h264 hq 96 700
        enc2h264 hq 96 700 %f

#### 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

#### Disk Image File Menu ####
+ f \.iso$ | f \.ccd$ | f \.img$ | f \.nrg$ | f \.mdf$ | f \.cue$ | f \.bin$ | f \.daa$ | f \.b6t$ | f \.b6i$ & t r & ! t t
1       mountiso
        mountiso %f &
+ f \.iso$ | f \.ccd$ | f \.img$ | f \.nrg$ | f \.mdf$ | f \.cue$ | f \.bin$ | f \.daa$ | f \.b6t$ | f \.b6i$ & t r & ! t t
2       isomaster
        isomaster %f
+ f \.iso$ | f \.ccd$ | f \.img$ | f \.nrg$ | f \.mdf$ | f \.cue$ | f \.bin$ | f \.daa$ | f \.b6t$ | f \.b6i$ & t r & ! t t
3       Convert BIN to ISO
        bin2iso %f
+ f \.iso$ | f \.ccd$ | f \.img$ | f \.nrg$ | f \.mdf$ | f \.cue$ | f \.bin$ | f \.daa$ | f \.b6t$ | f \.b6i$ & t r & ! t t
4       Poweriso convert image to ISO
        all2iso %f
+ f \.iso$ | f \.ccd$ | f \.img$ | f \.nrg$ | f \.mdf$ | f \.cue$ | f \.bin$ | f \.daa$ | f \.b6t$ | f \.b6i$ & t r & ! t t
5       Convert CCD to ISO
        myccd2iso %f

#### Image File Menu ####
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
1       feh
        feh %f
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
2       gimp
        gimp %f
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
3       gqview
        gqview %f
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
4       mirage
        mirage %f

#### PDF File Menu ####
+ f \.pdf$ & t r & ! t t
1       epdfview
        epdfview %f
+ f \.pdf$ & t r & ! t t
2       xpdf
        xpdf %f

#### Text File Menu ####
+ f \.txt$ | f \.nfo$ | f \.cfg$ | f \.log$ | f \.srt$ | f \.sub$ | f \.ssa$ & t r & ! t t
1       leafpad
        leafpad %f

#### Archive File Menu ####
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
1       xarchiver
        xarchiver %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
2       Extract *.tar.gz
        tar -xzvf %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
3       Extract *.tar.bz2
        tar -xjvf %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
4       Extract *.rar Full Path
        unrar x %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
5       Extract *.rar Current Dir
        unrar e %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
6       Extract *.zip
        unzip %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
7       Extract *.7z Full Path
        7z x %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
8       Extract *.7z Current Dir
        7z e %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
9       Extract *.ace Full Path
        unace x %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
a       Extract *.ace Current Dir
        unace e %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
b       Extract *.rar in *.rar_dir directory
        unrar2dir %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
c       Extract *.zip in *.zip_dir directory
        unzip2dir %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
d       Pacman Install Package
        sudo pacman -A %f
+ f \.zip$ | f \.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
e       Pacman Upgrade Package
        sudo pacman -U %f

#### Windows Executable File Menu ####
+ f \.exe$ | f \.bat$ | f \.msi$ & t r & ! t t
1       wine
        wine %f

#### Internet File Menu ####
+ f \.htm$ | f \.html$ | f \.php$ | f \.asp$ & t r & ! t t
1       kazehakase
        kazehakase %f
+ f \.htm$ | f \.html$ | f \.php$ | f \.asp$ & t r & ! t t
2       swiftfox
        swiftfox %f

#### Document File Menu ####
+ f \.doc$ | f \.rtf$ | f \.php$ | f \.asp$ & t r & ! t t
1       abiword
        abiword %f
+ f \.doc$ | f \.rtf$ | f \.php$ | f \.asp$ & t r & ! t t
2       OpenOffice Writer
        soffice -writer %f

#### Spread Sheet File Menu ####
+ f \.xls$ | f \.csv$ & t r & ! t t
1       gnumeric
        gnumeric %f

#### Presentation File Menu ####
+ f \.ppt$ | f \.pps$ & t r & ! t t
1       OpenOffice Impress
        soffice -impress %f

Attachment: signature.pgp
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]