Re: Mc Digest, Vol 48, Issue 6



It looks as if you're trying to make a *MULTI-LEVEL* menu,
callable from <F2>; which is interesting, and I'd like to know if
that's possible.

But, via guidance on a recent thread here [is there an archive?]
I successfully updated my ??mc/mc.ext to show graphics via
<F3> and <enter> using 2 diferent 'viewers'.
Here's an extract, with some of my modifications:--------
### Images ###

type/^GIF
#       Include=image-options  CRG edit try:
#    Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (
      Open=%view{ascii} identify %f
      View=/usr/bin/display %f

type/^JPEG
#crg    Include=image-options
#      Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (/usr/bin/display %f &);
#      View=if [ "$DISPLAY" = "" ]; then zgv %f; else (/usr/bin/display %f &);
        Open=display %f
        View=display %f

type/^PNG
# crg try to edit ?
#       Include=image-options
      Open=%view{ascii} identify %f
      View=/usr/bin/display %f
--------------
BTW I saw the various sound ..etc. formats which you listed.

Of course you realise that you should use the 'hello world principle',
and first just add/edit one new type and test it.

I think that you can see from the code that the file.extention is tested
to decide which app. to apply to the data.file ?

I know that eg. for pdf's entry I which edited to get:-
# PDF
type/^PDF
        Open=xpdf %f&
        #Open=acroread %f&
        #Open=ghostview %f&
        View=%view{ascii} pdftotext %f -
----- And now <enter> calls my xpdf
& <F3> calls my pdftotex, both on %f:the selected file.

== Chris Glur.

On 4/13/08, mc-request gnome org <mc-request gnome org> wrote:
Send Mc mailing list submissions to
      mc gnome org

To subscribe or unsubscribe via the World Wide Web, visit
      http://mail.gnome.org/mailman/listinfo/mc
or, via email, send a message with subject or body 'help' to
      mc-request gnome org

You can reach the person managing the list at
      mc-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mc digest..."


Today's Topics:

   1. From Tuxcmd to Midnight Commander - Editing menu file
      (Leandro Chescotta)


----------------------------------------------------------------------

Message: 1
Date: Sat, 12 Apr 2008 06:20:18 -0700
From: "Leandro Chescotta" <leandro chescotta gmail com>
Subject: From Tuxcmd to Midnight Commander - Editing menu file
To: mc gnome org
Message-ID:
      <2eb117800804120620p1ef2b871j3f256b79d574d23 mail gmail com>
Content-Type: text/plain; charset="iso-8859-1"

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! =(

Any help appreciated! =)

My "~/.mc/menu" file

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

2       vlc
        vlc %f

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

2       aplay
        aplay %f

3       ffmpeg -i (show audio/video info)
        ffmpeg -i %f

4       audacity
        audacity %f

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 &

2       isomaster
        isomaster %f

3       Convert BIN to ISO
        bin2iso %f

4       Poweriso convert image to ISO
        all2iso %f

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

2       gimp
        gimp %f

3       gqview
        gqview %f

4       mirage
        mirage %f

#### PDF File Menu ####

+ f \.pdf$ & t r & ! t t
1       epdfview
        epdfview %f

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

2       Extract *.tar.gz
        tar -xzvf %f

3       Extract *.tar.bz2
        tar -xjvf %f

4       Extract *.rar Full Path
        unrar x %f

5       Extract *.rar Current Dir
        unrar e %f

6       Extract *.zip
        unzip %f

7       Extract *.7z Full Path
        7z x %f

8       Extract *.7z Current Dir
        7z e %f

9       Extract *.ace Full Path
        unace x %f

a       Extract *.ace Current Dir
        unace e %f

b       Extract *.rar in *.rar_dir directory
        unrar2dir %f

c       Extract *.zip in *.zip_dir directory
        unzip2dir %f

d       Pacman Install Package
        sudo pacman -A %f

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

2       swiftfox
        swiftfox %f

#### Document File Menu ####

+ f \.doc$ | f \.rtf$ | f \.php$ | f \.asp$ & t r & ! t t
1       abiword
        abiword %f

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

#### Java File Menu ####

+ f \.jar$ & t r & ! t
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /archives/mc/attachments/20080412/8f6cb490/attachment.html

------------------------------

_______________________________________________
Mc mailing list
http://mail.gnome.org/mailman/listinfo/mc


End of Mc Digest, Vol 48, Issue 6
*********************************




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