On 2012-07-09, Dan Espen wrote: > Oleksandr Gavenko <gaven...@gmail.com> writes: > >> On 2012-07-08, Thomas Adam wrote: >> >>> On Sun, Jul 08, 2012 at 05:20:28PM +0300, Oleksandr Gavenko wrote: >> Now I think that FvwmCpp and FvwmM4 are mostly useless modules. > > Little snippet from one of my config files: > > #define BACK 21/B9/FD > #define FORE 22/59/E9 > DestroyDecor recreate DecorVec > AddToDecor DecorVec > #if PLANES < 9 > + TitleStyle Centered ActiveUp (Solid cornflowerblue -- Raised) \\ > Inactive (Solid Navy -- Flat) \\ > ActiveDown (Solid dimgrey -- Sunk) > #else > /* edge mid-point center */ > + TitleStyle Centered ActiveUp (\\ > SGradient 128 2 rgb:BACK 20 rgb:33/33/aa 70 rgb:FORE)\\ > Inactive (\\ > SGradient 128 2 rgb:BACK 50 rgb:44/44/aa 50 rgb:33/33/77)\\ > ActiveDown (\\ > SGradient 128 2 rgb:00/77/aa 30 rgb:44/88/aa 70 rgb:88/88/aa) > #endif > > > This came from work where we had some users with Sun workstations > and 8 bit color, and some with Linux and real graphics cards.
Thanks for answer. Good example! After some thinking I become to understand that conditional operator is most powerful part of FvwmCpp and FvwmM4. By the way you can pre-process .fvwm2rc: $ m4 <$RC_STORE/.fvwm2rc >~/.fvwm2rc But you need also provide OSTYPE, REVISION, RELEASE, SCREEN, WIDTH, X_RESOLUTION, etc macros... to achieve same semantical power of tools. I trapped in error with this variables when rewrite code: SetEnv fvwm_img $[FVWM_USERDIR]/images with: define(`IMGPATH', `$[FVWM_USERDIR]/images')dnl as after substitution of: ImagePath IMGPATH:+ I get: ImagePath $[/home/user/.fvwm]/images:+ So I run FvwmM4 with '-m4-prefix' and '-m4-prefix-defines': fvwm -cmd "Module FvwmM4 -m4-prefix -m4-prefix-defines $HOME/.fvwm/config" & and rewrite code to: m4_define(`m4_IMGPATH', `$[FVWM_USERDIR]/images')m4_dnl ImagePath m4_IMGPATH:+ FvwmCpp module have no ability to switch to unique prefix... But have clear syntax for conditions: #if COND 1... #else 2... #endif instead of: ifelse(C_O_N_D,dnl 1... ,dnl 2... )dnl and with M4 you must properly escape ',' and ')'... Also with FvwmCpp you can't compare strings HOSTNAME, OSTYPE, etc with value... -- Best regards!