[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fvwm
Subject:    Re: FVWM: Use of PipeRead or how do you get date into a button?
From:       Christophe MARTIN <cmartin () ipnl ! in2p3 ! fr>
Date:       1997-01-31 8:53:35
[Download RAW message or body]

Hello,
>> cmartin@ipnl.in2p3.fr said:
>> > >> I would like to have todays day and date displayed in an FvwmButton. I
>> > >> have tried:
>> > >> 
>> > >> *FvwmButtons(2x1,Swallow "" PipeRead 'date -d today "+%a %b %-d %Y"')
>> > >> 
>> > >> and various pertubations. I'm currently running fvwm-2.0.43 and I'm out 
of
>> > >> ideas! Pointers to doc's on PipeRead welcome!
>> 
>> > Unfortunately, you cannot pass args to a piperead command.
>> [snip]
[snip]
Hum, I'am afraid I answered a bit too fast. There were 2 problems ( I think )
If you use, something like
Piperead cat foo
then fvwm executes commands outputed from `cat foo'. ie whatever fvwm commands are
in the foo file. but you cannot get the output for your own !
without my patch, fvwm would just execute cat, not cat foo.

Now, for your button, you need that the piperead command echoes the *fvwmButtons
line.
The following work for me ( with my patch ), I just tried it and will use it for 
now on. Thanks for the idea !


piperead echo '*Fvwmbuttons(Title "'`date "+%a %b %Y"`'", Action Nop)'
or
# cm is the sun Calendar Manager tool
piperead echo '*Fvwmbuttons(Title "'`date "+%a %b %Y"`'", Action `Exec cm` )


Hope this helps,
Christophe
--
char*p="[)1++++++11+(QI1)9191991)9)1)(II1)919Y91)9)1)(AK+9;991+3*(9I1*IY991)Q1\
)(1I1))A91991)Q1)(+)1)1++9;)Q1+(";main(){int _;while(*p){for(_=*p-32>>3;_;--_)
putchar(' ');if(!(_=*p++-32&7))putchar('\n');else while(_--)printf("_/");}}


--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo@hpc.uh.edu.
To report problems, send mail to fvwm-owner@hpc.uh.edu.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic