Re: FVWM: Document mime type compliance?
Brian <[email protected]>
| Newsgroups | gmane.comp.window-managers.fvwm |
|---|---|
| Organization | Home |
| Message-ID | <[email protected]> |
Domink, Thank you! Your answer suggestion did the trick, in combination with reading the man page. It is now working the way that I wanted. For those reading this later the correct lines added to the default config were # Function: FvwmMenuDirectory DestroyFunc FuncFvwmMenuDirectory AddToFunc FuncFvwmMenuDirectory + I PipeRead '/usr/bin/fvwm-menu-directory --title "%d" --dir "$0" --exec-file "^xdg-open" --links' (This was all on one line, sorry about the wrap line at 72 characters.) Then of course I had to add to the # Root Menu a line + "Documents%icons/documents.png%" Popup DOCMenu And finally a new menu # Generate DOCMenu AddToMenu DocMenu + MIssingSubmenuFunction FuncFvwmMenuDirectory + "Documents" Popup /home/brian/Documents HTH someone else Cheers BrianA_MN ------------------------------------------------------------------------------------------------------------------ On Tue, 7 Jan 2020 00:57:37 +0100 Dominik Vogt <[email protected]> wrote: > On Mon, Jan 06, 2020 at 04:04:49PM -0600, Brian wrote: > > > > Thanks for replying. The following is the functions called, so not > > the one you reference. > > > > #Function FvwmMenuDirectory > > DestroyFunc FuncFvwmMenuDirectory > > AddToFunction FuncFvwmMenuDirectory > > + I PipeRead '/usr/bin/fvwm-menu-directory --title "%d" --dir "$0"' > > > > Which as I said makes a Documents directory directly in the main > > menu and then displays the files and directories as if they were a > > submenu of "Documents". > > > > The trouble I run into is that every file clicked on opens in vi, > > directories open the next level down directory, and what I need is > > for the files to open according to the mime type with the proper > > application. > > > > Dominik, > > The man page suggest that you and Mikhael originally wrote this > > little script. Is there a config I've forgotten so that files will > > properly open by mime type? > > It is really just a showcase for generating menus on the fly. Any > additional logic like opening files needs to be done outside fvwm. > It was never intended to integrate a general file handler into > fvwm. > > > For example I see in the man for fvwm-menu-directory a --exec-app > > [command] which maybe means I need to include the app to run on a > > file, but would that work for each mime type? Maybe there is > > another FvwmFunction which needs to be referenced to add mime type > > calls? Maybe I'm using the wrong function even? > > Looking at the --help output, I imagine that the option > --exec-file=xdg-open should do what you want. (xdg-open starts > the application defined by the mime type with the given file; > don't ask me about syntax details.) > > Ciao > > Dominik ^_^ ^_^ > > -- > > Dominik Vogt >