Mikhael Goikhman <migo_at_homemail.com> writes:
> On 25 Oct 2002 11:56:25 -0400, Dan Espen wrote:
> >
> > Victor Eijkhout <eijkhout_at_cs.utk.edu> writes:
> > > Can I retrieve the value of a desktop label in the pager?
> > >
> > > Right now I'm setting the values from a form, and saving them
> > > additionally in an environment variable:
> > >
> > > *NameDesk: Text "Name this desktop:"
> > > *NameDesk: Line expand
> > > *NameDesk: Input deskname 20 ""
> > > *NameDesk: Button quit "OK" ^M
> > > *NameDesk: Command SetEnv label_$d '$(deskname)'
> > > *NameDesk: Command PipeRead `echo "*FvwmPager: Label $d '$(deskname)'"`
> > >
> > > so that I can write them out:
> > >
> > > AddToFunc ExitFunction
> > > + I Exec for i in `awk -v n=$[FVWM_N_DESKS] \
> > > 'BEGIN { for (i=0; i<=n; i++) { print i } }' ` ; \
> > > do eval echo "*FvwmPager: Label $$i \\\"\$label_$$i\\\"" ; \
> > > eval echo "SetEnv label_$$i \\\"\$label_$$i\\\"" ; \
> > > done > $[HOME]/.fvwm/labels
> > >
> > > (wanna guess how long it took me to find the right combination of
> > > eval,$$,\\\ &c?)
> > >
> > > but obviously I don't like double bookkeeping. I would like that
> > > first eval line above to write out the pager label, as opposed to an
> > > environment variable that I hope has the right value.
> >
> > Perhaps Mikhael would be interested in adding the equivalent of an
> > M_CONFIG_INFO to FvwmPerl.
>
> I am not sure. I think reading configuration of others is like reading
> passwords of others. :) I only planned to add support for its own module
> configuration. Let's be confidential and solve it the right way.
It's not someone else's configuration.
Modules might sometimes need to read other modules configurations.
> > Why don't you just have FvwmForm update the .fvwm/labels file?
>
> There is much easier solution in 2.5.x and I posted it several times.
>
> Just don't use "*FvwmPager: Label" starting from 2.5.x, use a new
> DesktopName command. It was invented exactly for the purpose of switching
> from the FvwmPager's private data to a globally accessible data, desk
> names is something that many modules and WindowList may be interested in.
> Then you may read $[desk.name<n>] anywhere. Thanks to Olivier.
>
> DesktopName 2 MyDeskNumber2
> ...
> Exec exec xmessage "name of the desk number 2 is $[desk.name2]"
>
> Just try currently not to use spaces in the name, because I want
> to require quotes if there are spaces, currently quotes are ignored here.
DeskTopName works better, but the issue is saving the name for
the next session. Is it saved by the session manager feature?
The man page doesn't say.
--
Dan Espen E-mail: dane_at_mk.telcordia.com
--
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 Fri Oct 25 2002 - 12:57:35 BST