Discussion:
FVWM: GSoC 2012: Project ideas
Thomas Adam
2012-02-16 11:06:46 UTC
Permalink
All,

Whilst I appreciate that organisations need not worry about this until the
end of February, I'll be moving house then so I need to start thinking about
this now, rather than later.

Now that 2.6.0 is out, I'm proposing the following project (some of which
are a continuation from previous GSoC proposals) -- none of which are listed
in any order.

* Style clean-up (Difficulty: Easy):

This would involve thinking about the internal state of styles. At the
moment, we've a complete bomb-site in fvwm/styles.c in the form of a huge
case statement which is responsible for dishing out random code to act on
windows. I'd like to see this mechanism replaced with something more like a
dispatch-state, involving stucts and callbacks. I've very tentatively
started this here:

https://github.com/ThomasAdam/fvwm/commits/ta/style-cmd-tweaks

This is a pre-requisite step for many other style-related project proposals
though -- but still something which is a good enough project in its own
right.

* Finer-grained style matching (Difficulty: Medium):

Currently there is no direct way to match specific components of windows
when putting styles to them -- the only way you can do this at the moment is
through clever ordering of style lines. This project would therefore flesh
out ideas to allow for specifiers for which window to match based on a
windows's name, class, resource, or icon name. Perhaps in the form:

Style (Name=xteddy,Class=XTeddy) Sticky

... where these styles are logically ANDed together, rather than ORed, to
avoid the need for specific style-line ordering.

* Unification of window commands/states to provide a consistent interface
(Difficulty: Hard)

Style (and WindowStyle) affect the state of windows, as well as specific
commands which are not style-options but still affect the state of windows.
There has long-since been an idea to unify this, and to split the entire
concept into two states:

- The initial state of windows (perhaps with an InitialState command)
- Subsequent window operations happen with a WindowState command

So you could think of this as FVWM commands at present which aren't
style-related (but which operate on windows anyway) deprecated in that you
have to set states of windows to have them work. Here's an example:

# All windows' initial state are set like this.
InitialWindowState * SetWindowState WindowShade E, Maximize 100 100

# I want to control "XTermA" to never windowshade. In setting this, as it's
# already a running program, that specific window's state has changed, and
# only that window.
Next (XTermA) SetWindowState WindowShade Off

# I want all XTerm windows to have a specific window state of iconified.
InitialWindowState (Name=xterm,Class=XTerm) Iconify On

Thus, all that happens in unifying the commands to properties on windows is
a stack of things which are applied/unapplied as appropriate.

This change is huge though, and would need more discussion.

* Decor code to be modularised (Difficulty: Medium):

Finally deprecated the decoration code as being in the core, and instead
allow for this to be handled with a FvwmDecor module (or some such name).
Some thought would need to be put in to how this is handled by modules, as
there should be some means to allow more than one module to decorate a given
window.

This will require a change in libs/vpacket.h as well as the module
information.

* Allow fine-grained control of window decors (Difficulty: Hard):

If we ever want to allow users to customise the colour and/or which parts of
a decor is rendered, we need to rethink the FW_FRAME construct, and how
that's rendered in terms of its current GC implementation. A module would
need to do this -- as well as defaulting to a base decor (such as a MWM
look?)

Shape-masking might be a possible to do this. This would also allow for
bling features like rounded-corners. This is obviously the future now,
where bling is more important than functionality.

Comments welcome, or even ideas.

-- Thomas Adam
Dan Espen
2012-02-16 14:57:28 UTC
Permalink
Post by Thomas Adam
All,
Whilst I appreciate that organisations need not worry about this until the
end of February, I'll be moving house then so I need to start thinking about
this now, rather than later.
Now that 2.6.0 is out, I'm proposing the following project (some of which
are a continuation from previous GSoC proposals) -- none of which are listed
in any order.
Like all open source work,
the project should meet some need of the coder.
So, whoever does the work should have some input on what gets done.

What do you think?

I'd like to see the initial appearance issue get some attention.

I'm working close to that area:

Right now, I'm trying to understand xdg menus.
We make an entry in the FvwmMenu marked:

D: Desktop

It's pretty clear that should be "A: Applications".
I'm pretty sure there should be a "Preferences" and
"Settings" menu.

There are other related things that need attention.
For one, having 2 setups (Form and 95 Script) is not
a good thing. They should be unified and more function
should be added.

As far as more specific style matching, I haven't tried
the branch that contains the patch but isn't that mostly working?

If we had a volunteer to do "drudge" work it would be nice
to move off docbook to something easier to use.

I think Fvwm should packaging some kind of .Desktop file.
Wouldn't that get Fvwm into some kind of preferences menu so
a non-fvwm user could just select Fvwm?
--
Dan Espen
Thomas Adam
2012-02-16 15:37:39 UTC
Permalink
Post by Dan Espen
Post by Thomas Adam
All,
Whilst I appreciate that organisations need not worry about this until the
end of February, I'll be moving house then so I need to start thinking about
this now, rather than later.
Now that 2.6.0 is out, I'm proposing the following project (some of which
are a continuation from previous GSoC proposals) -- none of which are listed
in any order.
Like all open source work,
the project should meet some need of the coder.
So, whoever does the work should have some input on what gets done.
What do you think?
I think it's perfectly valid -- yes. But we (as an "organisation") need
some suggestions for prospective GSoC candidates because there will be
mentors needed to help with the proposed project -- i.e., someone a GSoC
student can go to for questions.

The project outlines as I gave them weren't my own project ideas but rather
things we would need to do to allow for more interesting features. There's
something for everyone to do, and one man's interest is another man's
boredom. :)
Post by Dan Espen
I'd like to see the initial appearance issue get some attention.
Right now, I'm trying to understand xdg menus.
D: Desktop
It's pretty clear that should be "A: Applications".
I'm pretty sure there should be a "Preferences" and
"Settings" menu.
This is touching on some default configuration then?
Post by Dan Espen
There are other related things that need attention.
For one, having 2 setups (Form and 95 Script) is not
a good thing. They should be unified and more function
should be added.
Yes.
Post by Dan Espen
As far as more specific style matching, I haven't tried
the branch that contains the patch but isn't that mostly working?
To an extent, but it doesn't apply cleanly and I wouldn't want to use it
outright, given what I outlined earlier.
Post by Dan Espen
If we had a volunteer to do "drudge" work it would be nice
to move off docbook to something easier to use.
I've mentioned this a few times, but see:

https://github.com/ThomasAdam/fvwm/tree/ta/asciidoc
Post by Dan Espen
I think Fvwm should packaging some kind of .Desktop file.
Wouldn't that get Fvwm into some kind of preferences menu so
a non-fvwm user could just select Fvwm?
I offered to do this when speaking to downstream packagers. This varies
slightly between distributions, so until I get something sent through I'm
holding off for now.

But yes, it would do what you said.

-- Thomas Adam
Dan Espen
2012-02-16 17:37:42 UTC
Permalink
Post by Thomas Adam
Post by Dan Espen
I'd like to see the initial appearance issue get some attention.
Right now, I'm trying to understand xdg menus.
D: Desktop
It's pretty clear that should be "A: Applications".
I'm pretty sure there should be a "Preferences" and
"Settings" menu.
This is touching on some default configuration then?
Yes.
--
Dan Espen
MK
2012-02-17 07:22:41 UTC
Permalink
On Thu, 16 Feb 2012 09:57:28 -0500
Post by Dan Espen
Post by Thomas Adam
Now that 2.6.0 is out, I'm proposing the following project (some of
which are a continuation from previous GSoC proposals) -- none of
which are listed in any order.
Like all open source work,
the project should meet some need of the coder.
So, whoever does the work should have some input on what gets done.
The possibility of an applicant submitting their own proposal should be
definitely be left open. However, since this is also paid work, I
don't think there is anything wrong with saying, "this is what the
project leadership *needs* doing most".

Speaking for myself, I would say that "my needs as a coder" in this
regard are about finding clear and well-defined ideas set out for me,
because:

a) While I am personally interested in the project, I am not familiar
with the source, and having a proposal set out suggests a doorway into
the source.

b) I'm more interested in helping the involved senior people with
the tasks that they perceive to be important, or tasks that the user
base has expressed interest in, than in performing my own analysis.

As a long term fvwm user tho, I do naturally have some opinions...
Post by Dan Espen
What do you think?
I'd like to see the initial appearance issue get some attention.
I don't remember the last time I saw the default config, but if
this has to do with enticing new users, to my mind working on that
would first involve:

- deciding who potential "new users" might be, without saying
"well anybody" which leads to trying to be all things to all people
and/or aiming at a lowest common denominator.

- identifying fvwm's strengths and weaknesses vis. what people think
about when they think about a graphical desktop, and focus on presenting
the strengths, not on shoring up the weaknesses.

IMO fwvm's biggest strength is its configurability, which is a
challenging thing to emphasis in a default configuration. Eg: it seems
to me that the "fvwm95" concept dates back to a time when gnome was
still in it's infancy, and it made more sense to think in terms of an
appeal to general users who did not, and might never, want or need much
in the way of configurability -- instead, the appeal was about
providing a familiar out of the box functionality.

But if in contemporary terms configurability is fvwm's strength, there
is no point in trying to appeal to people who will never make much use
of it, by using it to mimic something familiar and comfortable.

I'm looking back at the "New default configuration wanted" thread that
started last April and was continued a bit in January. It seems that
appearance is a big issue. Perhaps we could have a sort of competition
around that, within the limitations that Thomas suggested (no
dependency on xpm/png/svg support).

Something that would emphasis configurability would be to use multiple,
complementary styles. Also:

- being heavy on the comments
- incorporating optional commented out sections.
- tieing-in something on the web

I also know there is a rounded corners patch available for fvwm. I
haven't tried it myself, but having a bit of web-dev in my background,
I know that rounded corners are something that people associate with a
"more modern" look.

I don't know if this is a great GSOC item however, as it does not really
involve programming.
Post by Dan Espen
Right now, I'm trying to understand xdg menus.
D: Desktop
It's pretty clear that should be "A: Applications".
I'm pretty sure there should be a "Preferences" and
"Settings" menu.
Right now, am I correct to say that xdg menu compatibility is
provided by a script for converting the xml files? Presuming that
application installs often use those, it might be good to include the
possibility to have that automatically (or prompt to) run at start-up
if the files have changed.

OTOH, again taking (manual) configurability as the key strength, it
might be better to just leave it up to the user to update things
his/her self.
Post by Dan Espen
If we had a volunteer to do "drudge" work it would be nice
to move off docbook to something easier to use.
Here's an irritating thing: I'm using 2.6.2 provided by gentoo, and
the links from index.html down in /usr/share/doc/fvwm... are relative to
subdirectories that don't exist. The files do, just they are all in
the top level.

I'd suggest having those pre-generated in the source tarball, btw,
instead of the xml.

WRT asciidoc, Thomas mentions stuff "within the Documentation/
directory", but I don't know what this refers to (there is no such
directory in the 2.6.4 source). In any case, I would think that it
should not be hard to parse/scrape/whatever the existing docs into a
NAME, SYNOPSIS, DESCRIPTION pattern, rather than do it all manually.

MK
--
"Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
"The angel of history[...]is turned toward the past." (Walter Benjamin)
Thomas Adam
2012-02-17 09:46:34 UTC
Permalink
Post by MK
WRT asciidoc, Thomas mentions stuff "within the Documentation/
directory", but I don't know what this refers to (there is no such
directory in the 2.6.4 source). In any case, I would think that it
should not be hard to parse/scrape/whatever the existing docs into a
NAME, SYNOPSIS, DESCRIPTION pattern, rather than do it all manually.
Umm, I mentioned this in a previous reply to this thread. Please read that.

-- Thomas Adam
MK
2012-02-17 15:34:12 UTC
Permalink
On Fri, 17 Feb 2012 09:46:34 +0000
Post by Thomas Adam
Post by MK
WRT asciidoc, Thomas mentions stuff "within the Documentation/
directory", but I don't know what this refers to (there is no such
directory in the 2.6.4 source). In any case, I would think that it
should not be hard to parse/scrape/whatever the existing docs into a
NAME, SYNOPSIS, DESCRIPTION pattern, rather than do it all manually.
Umm, I mentioned this in a previous reply to this thread. Please read that.
Okay, I found that directory on github.
--
"Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
"The angel of history[...]is turned toward the past." (Walter Benjamin)
MK
2012-02-17 07:23:03 UTC
Permalink
On Thu, 16 Feb 2012 11:06:46 +0000
Post by Thomas Adam
Now that 2.6.0 is out, I'm proposing the following project (some of
which are a continuation from previous GSoC proposals) -- none of
which are listed in any order.
This would involve thinking about the internal state of styles. At
the moment, we've a complete bomb-site in fvwm/styles.c in the form
of a huge case statement which is responsible for dishing out random
code to act on windows. I'd like to see this mechanism replaced with
something more like a dispatch-state, involving stucts and
https://github.com/ThomasAdam/fvwm/commits/ta/style-cmd-tweaks
I think I get the gist of what you want to do there. Have you thought of
using a hash table or tree in place of the a,b,c,d thing?

I'll admit I don't use nearly everything fvwm has to offer, so forgive
me if some of my next comments betray this ignorance ;)
Post by Thomas Adam
Currently there is no direct way to match specific components of
windows when putting styles to them -- the only way you can do this
at the moment is through clever ordering of style lines. This
project would therefore flesh out ideas to allow for specifiers for
which window to match based on a windows's name, class, resource, or
Style (Name=xteddy,Class=XTeddy) Sticky
Would "class" here be a new (optional) aspect of the fvwm syntax?
Post by Thomas Adam
* Unification of window commands/states to provide a consistent
interface (Difficulty: Hard)
This change is huge though, and would need more discussion.
It implies to me a lot of drastic changes to the way the way the
configuration is currently. Are you sure that is a good idea?

MK
--
"Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
"The angel of history[...]is turned toward the past." (Walter Benjamin)
Thomas Adam
2012-02-17 09:45:07 UTC
Permalink
Post by MK
On Thu, 16 Feb 2012 11:06:46 +0000
Post by Thomas Adam
Now that 2.6.0 is out, I'm proposing the following project (some of
which are a continuation from previous GSoC proposals) -- none of
which are listed in any order.
This would involve thinking about the internal state of styles. At
the moment, we've a complete bomb-site in fvwm/styles.c in the form
of a huge case statement which is responsible for dishing out random
code to act on windows. I'd like to see this mechanism replaced with
something more like a dispatch-state, involving stucts and
https://github.com/ThomasAdam/fvwm/commits/ta/style-cmd-tweaks
I think I get the gist of what you want to do there. Have you thought of
using a hash table or tree in place of the a,b,c,d thing?
Yes. The point isn't to care about the structure but to show how it works
at the moment. There is no grouping per-se of style options other than to
say which letter that option begins with, which is only done that way to
satisfy a switch statement. But a tree is overkill for this because all
you're really doing is a linear search -- so having:

struct style_opt_struct *all_style_ops[]

Would be fine for this.
Post by MK
Post by Thomas Adam
Currently there is no direct way to match specific components of
windows when putting styles to them -- the only way you can do this
at the moment is through clever ordering of style lines. This
project would therefore flesh out ideas to allow for specifiers for
which window to match based on a windows's name, class, resource, or
Style (Name=xteddy,Class=XTeddy) Sticky
Would "class" here be a new (optional) aspect of the fvwm syntax?
No more so than Name, or Resource would be, yes.
Post by MK
Post by Thomas Adam
* Unification of window commands/states to provide a consistent
interface (Difficulty: Hard)
This change is huge though, and would need more discussion.
It implies to me a lot of drastic changes to the way the way the
configuration is currently. Are you sure that is a good idea?
Absolutely it is a good idea. You can't keep using that as an excuse to
disallow changes, and managing the migration wouldn't be too difficult.

-- Thomas Adam
MK
2012-02-17 15:33:51 UTC
Permalink
On Fri, 17 Feb 2012 09:45:07 +0000
Post by Thomas Adam
Post by MK
On Thu, 16 Feb 2012 11:06:46 +0000
Post by Thomas Adam
This would involve thinking about the internal state of styles.
At the moment, we've a complete bomb-site in fvwm/styles.c in the
form of a huge case statement which is responsible for dishing
out random code to act on windows. I'd like to see this
mechanism replaced with something more like a dispatch-state,
involving stucts and callbacks. I've very tentatively started
https://github.com/ThomasAdam/fvwm/commits/ta/style-cmd-tweaks
I think I get the gist of what you want to do there. Have you
thought of using a hash table or tree in place of the a,b,c,d thing?
Yes. The point isn't to care about the structure but to show how it
works at the moment. There is no grouping per-se of style options
other than to say which letter that option begins with, which is only
done that way to satisfy a switch statement. But a tree is overkill
for this because all you're really doing is a linear search -- so
struct style_opt_struct *all_style_ops[]
Would be fine for this.
Fair enough. There are only a hundred or so of them anyway, and I
presume that happens (mostly) at start-up.
Post by Thomas Adam
Post by MK
Post by Thomas Adam
Currently there is no direct way to match specific components of
windows when putting styles to them -- the only way you can do
this at the moment is through clever ordering of style lines.
This project would therefore flesh out ideas to allow for
specifiers for which window to match based on a windows's name,
Style (Name=xteddy,Class=XTeddy) Sticky
Would "class" here be a new (optional) aspect of the fvwm syntax?
No more so than Name, or Resource would be, yes.
Those are passed thru from xlib, correct? I did not realize fvwm used
all that, I've only ever just used the name, but looking at the manpage
I notice it does.

So the idea here would be to allow combinations of properties rather
than a single one?

Something I've thought a few times -- it may already be possible, but I
don't think so -- would be the ability to label windows in the fvwm Exec
command and use those labels with Style. That would allow you to have
two different possible styles set up for applications (eg, terminal
emulators) that otherwise have identical X properties.
Post by Thomas Adam
Post by MK
Post by Thomas Adam
* Unification of window commands/states to provide a consistent
interface (Difficulty: Hard)
This change is huge though, and would need more discussion.
It implies to me a lot of drastic changes to the way the way the
configuration is currently. Are you sure that is a good idea?
Absolutely it is a good idea. You can't keep using that as an excuse
to disallow changes, and managing the migration wouldn't be too
difficult.
Fair enough again. It would not upset me particularly, and I suppose
the rest of the user base could be more excited than ticked off.

If you did get two people from GSOC, to what extent do you think these
various tasks could be done concurrently?

MK
--
"Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
"The angel of history[...]is turned toward the past." (Walter Benjamin)
Thomas Adam
2012-02-17 16:08:38 UTC
Permalink
Post by MK
On Fri, 17 Feb 2012 09:45:07 +0000
Post by Thomas Adam
No more so than Name, or Resource would be, yes.
Those are passed thru from xlib, correct? I did not realize fvwm used
all that, I've only ever just used the name, but looking at the manpage
I notice it does.
Well, yes. It's tied to Xlib. That's how all of this works.
Post by MK
So the idea here would be to allow combinations of properties rather
than a single one?
Correct. At the moment we match class or resource or name or visible name.
See fvwm/style.c:fw_match_style_id(). These values come out of xlib in so
much that all windows have to set those properties. If I need to explain
all of this, I'm happy to, but you'll need to contact me off-list for that.

So yes, we'd want to basically allow the user to specify those individually
and instead combine them:

Style (Class=,Name=Resource=) ...
Post by MK
Something I've thought a few times -- it may already be possible, but I
don't think so -- would be the ability to label windows in the fvwm Exec
command and use those labels with Style. That would allow you to have
two different possible styles set up for applications (eg, terminal
emulators) that otherwise have identical X properties.
Umm, I don't follow you here. But see the WindowStyle command which instead
uses the window's ID internally to make out the individual windows.
Post by MK
Post by Thomas Adam
Post by MK
Post by Thomas Adam
* Unification of window commands/states to provide a consistent
interface (Difficulty: Hard)
This change is huge though, and would need more discussion.
It implies to me a lot of drastic changes to the way the way the
configuration is currently. Are you sure that is a good idea?
Absolutely it is a good idea. You can't keep using that as an excuse
to disallow changes, and managing the migration wouldn't be too
difficult.
Fair enough again. It would not upset me particularly, and I suppose
the rest of the user base could be more excited than ticked off.
Well that's not my intention with this either. I am saying that whilst the
changes I'm tentatively proposing are quite wide-ranging, taking a typical
FVWM config file and updating its syntax to suit wouldn't be too hard.
Post by MK
If you did get two people from GSOC, to what extent do you think these
various tasks could be done concurrently?
To some extent, yes. There might be some correlation needed though.

-- Thomas Adam
Thomas Adam
2012-02-26 00:11:22 UTC
Permalink
Post by Thomas Adam
All,
Whilst I appreciate that organisations need not worry about this until the
end of February, I'll be moving house then so I need to start thinking about
this now, rather than later.
And to make a start on this, I've created the following wiki page (which
we'd need anyway before we think about applying):

http://fvwmwiki.xteddy.org/GSOC/2012/

Next week, I'll look at formalising proposals for submitting to Google.

-- Thomas Adam
--
"Deep in my heart I wish I was wrong. But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)
Loading...