On 20 Apr 2003 22:34:23 +0200, Felix E. Klee wrote:
>
> Hm, don't you consider Perl a separate process? In addition, don't I need
> environment variables to interface with perl?
I mean that when you start one FvwmPerl process together with fvwm,
there are 0 forks per line. And when you invoke PipeRead (i.e. /bin/sh)
that then starts bash, printf and similar, there are 3 forks per line.
> Also, is there some reason to avoid environment variables? If I avoid name
> clashes by prefixing them all with eg. FVWM_ then I believe that shouldn't
> cause any trouble.
If it is easier for you to build a program using environment variables
(or by creating temporarily files), just do it. But there is another way.
> > FvwmPerl may also be used as a more powerful replacement for FvwmCpp and
> > FvwmM4 using its -p (--preprocess) flag.
>
> To be honest, I don't like that preprocessing stuff. Some standard FVWM
> expressions do always collide with the preprocessor.
This is not the case with "FvwmPerl -p", there are no such collisions.
Try it just for fun. :) Here are several random ideas for preprocessing:
# ---------------------------------------------------------------------
AddToFunc InitFunction
+ I Exec exec xterm -n %{ $USER eq "root" ? "superuser" : $USER }% -ls
%{
$MAIN_FONT = "lucidasans-10";
_at_apps = ([ 'netscape', 'Netscape' ], [ 'xterm', 'XTerm' ]);
$number_of_mouse_buttons = `xmodmap -pp | cut -d' ' -f3` + 0;
""
}%
%ModuleConfig FvwmPager destroy
SolidSeparators
Font %{$MY_MAIN_FONT}%
Colorset 0
DeskTopScale 28
MiniIcons
%End ModuleConfig FvwmPager
AddToMenu Apps Applications Title
%{
$menu = "";
foreach (_at_apps) {
($prog, $name) = _at_$_;
$menu .= "+ '%$prog%$name' Exec exec $prog\n"
}
$menu;
}%
AddToFunc StartXTermWithUniqueTitle
+ I Exec xterm -name xterm-%{++$i}% -ls
%{ $number_of_mouse_buttons < 4 ? "Nop" : "" }% Mouse 4 R A GotoDesk +1
# ---------------------------------------------------------------------
I think it is at least much more readable then your solution with bash
and dozen of environment variables.
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sun Apr 20 2003 - 20:27:02 BST