I have a perl script (thanks to osbourd2 for the help) which I used in Openbox3 to output the date and time to OB’s pipe menu. Now that I have migrated to FVWM, I want to use it with FVWM. Here is the perl script:
This can be run from the command line without problems. However, my unfamiliarity with FVWM syntax is what is troubling me. I think I should use PipeRead:
MissingSubmenuFunction FuncFvwmClock[/code]
but this doesn’t seem to work. I get an empty entry on the root menu. Could someone please point out my faults, or even a better way to do this (hope I’m not re-inventing the wheel).
real 0m0.002s
user 0m0.001s
sys 0m0.002s
time clock.pl “”%T - %A, %B %e, %Y""
08:26:32
real 0m0.027s
user 0m0.015s
sys 0m0.002s[/code]
I guess you should avoid calling perl for that (even if I’m a great perl fan) It is 10 times longer than ‘date’.
In this case, your clock function for your menu would be much simpler:
“13:26:16 - Tuesday, February 15, 2005”[/code]
As can clearly be seen, it should produce a valid menu entry. However, when I save my config and restart FVWM, all that is shown is the “+%H:%M:%S” portion (the time). Am I violating some sacred shell scripting rule if I use spaces within backticks ? I don’t know. I just started diving into shell scripting. When the space is introduced, nothing thereafter shows up in the FVWM menu. Just for kicks, I tried the above without spaces, and lo and behold, it works.
I know how much schell scritping can be itchy scratchy when it comes to these backslash thingies. So, here’s the menu with a date (screenshot provided):