Subject: conditional commas

From: [email-masked]
Date: Mon, 9 Dec 2002 23:10:48 -0800

fvwm2 man page:
"The  conditions are a list of keywords from the list below and are
separated by commas or whitespace."

But, if I use commas in a list of conditions, I never get a match.  If I use
spaces, it seems to work fine.  Anybody else seen this behavior?

Also, if everybody is ok with the CycleWest, CycleEast, etc options
for the Direction command, I'll go ahead and add it to the core man page.
Any objections?

-- 
  _
 ( \      _  \    /_ /  _ _  Jason Weber                  (503) 380-7424
  \|(\/)()))  \/\/(-/_)(-/(  Infinite Monkeys Inc.        Aloha, Oregon
  //                         http://www.imonk.com/baboon  [email-masked]
 (/     [email-masked]        [email-masked]

     "Canister contains at least 50% recycled material; 15%
      post-consumer content."
   -- Pringles Fat-Free (side of can)
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 10 Dec 2002 10:58:31 +0100

> spaces, it seems to work fine.  Anybody else seen this behavior?

Post an example so we can tell what goes wrong.  I'd like to
remove the non-comma syntax in the long run.
 
> for the Direction command, I'll go ahead and add it to the core man page.

I still think it should be moved into a separate command and take
two directions as the argument (like IconBox).  One major
direction and a minor direction which must be orthogonal to the
first one.  For example:

  ScanWindows North West

This means "Scan windows from North to South.  Of all windows that
are closest in the primary direction, pick windows from left to
right."

Bye

Dominik ^_^  ^_^

---

From: [email-masked]
Date: Tue, 10 Dec 2002 11:05:00 -0800

> remove the non-comma syntax in the long run.

Works:
Key Tab         A   M   SendToModule    FvwmProxy   Circulate               \
                        Direction CycleEast (CurrentPage !Sticky)

Doesn't work:
Key Tab         A   M   SendToModule    FvwmProxy   Circulate               \
                        Direction CycleEast (CurrentPage,!Sticky)

I tried CirculateHit, but it doesn't seem to avoid WindowListSkip items.
Most of my persistant WindowListSkip items happen to be sticky, so this
works for me, but it's not really a good solution.

> are closest in the primary direction, pick windows from left to

I was also trying to minimize my impact of trampling around in the core.
A downside of my first version is that the secondary axis direction is fixed.
On the plus side, there's no new commands and only one function in one
file is changed.

Syntax-wise, ScanWindows looks fine.  It just sounds like more code 
(and therefore more time, space, and maintenence).

Is it code or syntax that's the problem?  I haven't looked at the
parser/dispatcher, but if a short entry for ScanWindows can route
to the same CMD_Direction and F_CMD_ARGS has an argv[0] equivalent,
we can pretty much use the code close to what we have now.
If arg0==ScanWindows, I could do gravity_parse_dir_argument twice.

Or I guess we could just turn CMD_Direction into a regular function
and route CMD_Direction and CMD_ScanWindows into it.

I don't like how there are 8 possible secondary directions, but only
2 are valid.  Maybe right/left turns, like 'ScanWindows East Right'.
That would mean the z-axis points into the screen.

---

From: [email-masked]
Date: Tue, 10 Dec 2002 20:22:16 -0800

> That would mean the z-axis points into the screen.

Ok, done.  Here's the working example:

Key -Meta_L     A   A   SendToModule    FvwmProxy   Hide
Key Tab         A   M   SendToModule    FvwmProxy   Circulate       \
                        ScanWindows East Right (CurrentPage !Sticky)
Key Tab         A   SM  SendToModule    FvwmProxy   Circulate       \
                        ScanWindows West Right (CurrentPage !Sticky)

If this ok, I go ahead and add ScanWindows to the core man page.

By "closest in the primary direction", did you mean anything other
than "exactly the same", such as "within some delta"?  Cause I didn't
do that.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 11 Dec 2002 13:17:42 +0100

> > That would mean the z-axis points into the screen.

That would be confusing since Left and Right are synonyms for West
and East.  I'd prefer to parse the direction as usual and complain
if the secondary direction is not orthogonal to the primary.  And
it is consistent with the semantics of the IconBox style.

> than "exactly the same", such as "within some delta"?  Cause I didn't

When the distance is != 0 it is obvious what to do.  But when a
window with distance is found, the distance in the secondary
direction is used.  In other words, with "North West", the closest
window to the right of the current one is take.

Bye

Dominik ^_^  ^_^

---

From: [email-masked]
Date: Wed, 11 Dec 2002 22:10:11 -0800

> it is consistent with the semantics of the IconBox style.

Ah, precedence.  Ok, fixed.

Key -Meta_L     A   A   SendToModule    FvwmProxy   Hide
Key Tab         A   M   SendToModule    FvwmProxy   Circulate       \
                        ScanWindow East South (CurrentPage !Sticky)
Key Tab         A   SM  SendToModule    FvwmProxy   Circulate       \
                        ScanWindow West North (CurrentPage !Sticky)

> window to the right of the current one is take.

Ok, but what you're not saying and what I'm not doing, is that if
the distance along the primary is, say, 1, that it says "that's pretty close",
and balances it with the cross axis (sorta like what Direction does).

Ok, back to the man pages.  Also, I went with ScanWindow (singular) to be
more like ThisWindow.   A commit is on its way real soon.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 12 Dec 2002 10:07:20 +0100

> and balances it with the cross axis (sorta like what Direction does).

Right, we have "Direction" for this.  ScanWindows should not try
to be clever here.

> more like ThisWindow.

But it should be plural as it operates on many windows while
ThisWindow operates only on one.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 12 Dec 2002 09:30:41 +0000

> ThisWindow operates only on one.

Should Next be NextWindow or NextWindows?

If it is Windows it could be thought to work like All (AllWindows),
but it works on one window only. I don't care much about this thought.
Maybe ScanForWindow? Or ScanLines?

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 12 Dec 2002 10:38:34 +0100

> Maybe ScanForWindow? Or ScanLines?

ScanForWindow is fine.

Bye

Dominik ^_^  ^_^