Re: FVWM: FvwmScript and environment variables
On Sat, May 04, 2013 at 03:49:42PM -0400, Dan Espen wrote: > Dominique Michel writes: > > > Hi, > > > > I am writing a font selector for fvwm-crystal with FvwmScript. > > Most of it work, but I didn't succeeded to use environment variables. > > > > Also thing like > > Set $PanelFont = (GetOutput {echo $[panel_font]} 1 -1) > > I belive you could do something hackish like this if you don't want to patch for actual support. But you need to be a little more creative. First I belive GetOutput is excuting a shell command, so you may just need (GetOutput {echo $PANEL_FONT} 1 -1) this should work for the enviorment variables but not infostore (I'm hoping a new shell isn't spawned with a new enviorment). If this doesn't work my next thought is Use FvwmCommand with Echo (from fvwm) which can echo a string to your stderr ($HOME/.xsession-errors is common for this). Then parse the value from $HOME/.xsession-errors with grep/regex tools. This should work with either EnvVars or InfoStore since you can echo their values as well. The only issue I see with this portability as not everyone may have stderr of their Xserver redirected to $HOME/.xsession-errors jaimos
Re: FVWM: FvwmScript and environment variables
Dominique Michel writes: > Hi, > > I am writing a font selector for fvwm-crystal with FvwmScript. > Most of it work, but I didn't succeeded to use environment variables. > > In the config: > SetEnv panel_font "Bitstream Cyberbit" > > In the script: > Set $SelectorFont = {"xft:$[panel_font]:size=16"} > > but it doesn't work. I try everything I could think about, but nothing > worked. > > Also thing like > Set $PanelFont = (GetOutput {echo $[panel_font]} 1 -1) > > didn't work. This is with the last fvwm cvs. > > I will change those variables to infostore, but I am waiting the next > fvwm release for that. (which will have EnvMatch that work with the > infostore) Sorry, I really don't know much about FvwmScript, but a quick read of the man page doesn't say anything about environment variables or infostore. Do you know if this is supposed to work? Hmm, just checked: grep -nH -e getenv * FvwmScript.c:225: sprintf(path,"%s/%s",getenv("FVWM_USERDIR"),filename); Instructions.c:73: home_dir = getenv("HOME"); Instructions.c:85: FvwmUserDir = getenv("FVWM_USERDIR"); Instructions.c:1719:home = getenv("HOME"); Doesn't look like there's any support. A patch would be considered. -- Dan Espen