I wrote a little perl script, you need the DesktopEntry lib
you just have to create a directory in .fvwm: panel.desktop
and put inside some *.desktop files don’t forget to change the icon to a png file because fvwm don’t know svg . .desktop files are well know by Nautilus (he didn’t show up the .desktop extension by default) you can then easly change the icon and the commands by right clicking on the file.
{desktop2fvwm.pl ButtonName file.desktop}
put this in ~/.fvwm/scripts/
#!/usr/bin/perl
#
# desktop2fvwmbutton.pl $FvwmButton's name $URI to the a .desktop file
use File::DesktopEntry;
my $entry = File::DesktopEntry->new_from_file("$ARGV[1]" );
die $entry->get_value('Name')." isn't an application\n"
unless $entry->get_value('Type') eq 'Application';
print "*$ARGV[0]: (1x1 , Icon ".$entry->get_value('Icon').", Action(Mouse 1) `Exec ".$entry->get_value('Exec')."`)"
Somewhere in your fvwms config files, BuildPanel take 2 arguments $0:FvwmButton’s name $1:location of the .desktop files
DestroyFunc BuildPanel
AddToFunc BuildPanel
+ I Test (f $1/$0.fvwm) Exec exec rm $1/$0.fvwm
+ I PipeRead 'for i in $1/*.desktop; do $[FVWM_USERDIR]/scripts/desktop2fvwmbutton.pl $0 $i >> $1/$0.fvwm; done;'
+ I Read $1/$0.fvwm
AddToFunc StartFunction
+ I BuildPanel MesBoutons $[FVWM_USERDIR]/panel.desktop #add to FvwmButtons MesBoutons the links present in the directory $[FVWM_USERDIR]
+ I Module FvwmButtons -g 50x768-0+0 MesBoutons
You can adapt the perl script so that it generates Menu entry instead of Button entry.
Next milestone: implement the desktop directory/menu/etc… you will be able to change the panel/menu really easly with alacarte (gnome appliction).
hope it helps.
[color=blue]Removed an ‘‘echo’’ builtin which serves no purpose. – TA[/color]