Re: FVWM: Book on fvwm...

2012-07-09 Thread Michael Großer
Jaimos Skriletz wrote:
> On Mon, Jul 09, 2012 at 09:07:17PM +0300, Oleksandr Gavenko wrote:
>> On 2012-04-06, Michael Großer wrote:
>> 
>> > It seems like nobody is working on a book
>> > right now.
>> > [SKIP]
> 
> I don't want it to be documentation but mearly a way to get
> people into the frameset of an fvwm config file so they can
> then start to read the fvwm man page to extract the info they
> need to do what they want)

This is the way I went:

1.) I read parts of your tutorial to enter the world
of FVWM.

2.) When I was in, I continued reading the man page and
asking questions here on the list.

I discarded my intention of writing my own kind of tutorial,
because it is summer now on the northern hemisphere and I'm
not even one step further than last winter. I have a more
realistic goal now.


Michael




Re: FVWM: Book on fvwm...

2012-07-09 Thread Jaimos Skriletz
On Mon, Jul 09, 2012 at 09:07:17PM +0300, Oleksandr Gavenko wrote:
> On 2012-04-06, Michael Großer wrote:
> 
> > It seems like nobody is working on a book
> > right now.
> > [SKIP]
> > The best thing you (and every other person who wants
> > to learn FVWM) can do is to just read the man page,
> > to read the "Unofficial Tutorial" at
> > http://www.zensites.net/fvwm/guide/
> >
> I just yesterday ask about using FvwmCpp and FvwmM4 modules. Because this
> page:
> 
>   http://www.zensites.net/fvwm/guide/global.html
> 
> around 2008 introduce to me usage of:
> 
>   SetVar VAR VAL

That is my guide and I would like to update it to and make it more inline of my 
modern approach and good fvwm pratcies. Though if you read though the guide you 
do see I say don't abuse this and in my new version (its imcomplete and I can't 
seem to get the motivation to fine tune it) I removed the SetEnv completely and 
want to replace it with InfoStore. But from the guide

"Note though that over-using environment variables leads to a lot of 
"pollution" within FVWM's evironment space, especially if they're only being 
used to hold settings which might only ever change once a year. You can see 
this thread on the fvwm forums for more detailed information."

though I guess I need to update the link there

If you want I don't mind sending a copy of the new version in its very raw 
incomplete form if you want to add to it. I am not really seeking help for it, 
but I don't mind accepting some if it follows the same format (I don't want it 
to be documentation but mearly a way to get people into the frameset of an fvwm 
config file so they can then start to read the fvwm man page to extract the 
info they need to do what they want)

jaimos



Re: FVWM: Book on fvwm...

2012-07-09 Thread Oleksandr Gavenko
On 2012-04-06, Michael Großer wrote:

> It seems like nobody is working on a book
> right now.
> [SKIP]
> The best thing you (and every other person who wants
> to learn FVWM) can do is to just read the man page,
> to read the "Unofficial Tutorial" at
> http://www.zensites.net/fvwm/guide/
>
I just yesterday ask about using FvwmCpp and FvwmM4 modules. Because this
page:

  http://www.zensites.net/fvwm/guide/global.html

around 2008 introduce to me usage of:

  SetVar VAR VAL

for anything. But this is bad practice as noticed by Thomas Adam at:

  http://fvwmwiki.xteddy.org/IRC/HashFvwm/

And this is highly harmonised with Thomas replay:

> Not that I'm forcing you, Michael, but these "go it alone" sorts of
> documents are utterly harmful to projects like this, where one-time "wow, I
> did it!" documents which are written once, and then never run again

zensites.net is most valuable and user friendly tutorial for FVWM newcomers
(at list in 2008 when I try to configure Fvwm first time, it have white
background, table of contents and look like macho document, better then blog
posts and other articles from miscellaneous home pages).

It was written in style "here's what I did" TM and after copy/paste it work
and take effect immediately.

But it is old, deprecated in some parts and give "bad" style (in case of
SetVar) for newbies.



I think official up‐to‐date tutorial is good thing for Fvwm.

It allow preserve time in configuration for end user and allow spread best
practices...

With this none will want any books...

-- 
Best regards!




Re: FVWM: Look for FvwmCpp and FvwmM4 best practice.

2012-07-09 Thread Oleksandr Gavenko
On 2012-07-09, Dan Espen wrote:

> Oleksandr Gavenko  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
> /*edgemid-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!