[compiz] Compiz-manager script (Was: --skip-gl-yield)

Kristian Lyngstøl
Fri, 20 Apr 2007 13:57:05 -0000

I threw together a very rough draft of a script:

(See my compiz-script git repo:
http://gitweb.beryl-project.org/?p=users/kristian/compiz-scripts;a=summary
)

It's not too pretty, and only really adjusted for nVidia, so it's
pretty useless at this point. I've only ever actually used nVidia with
direct rendering, so I'll need some input from people with other
setups than mine.

On 4/20/07, Colin Guthrie <gmane@colin.guthr.ie>
wrote:
> Kristian Lyngst?l wrote:
> > Sure, I was thinking of makeing this simple and generic. I don't
> > really think wether it is compiled or not matters all that much,
> > though.
>
> Cool. I reckon if it can be done in scripts it should be, but that's
> just my preference. Makes it easier to include in packages but overall
> that's just my laziness speaking ;)

No, you're right. Though there are some checks that would be simpler
in C, I don't think it's really reasonable to write it in C (or any
other compiled languaged) for just those checks.

> > How about I make sure that the application can be used to test
> > specific cases manually? Say: 'compiz-manager' does all the
tests and
> > starts compiz, but 'compiz-manager --test glyield --no-start'
just
> > checks wether __GL_YIELD="NOTHING" should be set or not?
That way, you
> > could use it fairly easy from other places too. Or
"compiz-manager
> > --get-arguments --no-start" to return a list of all arguments
> > compiz-manager suggest you pass to compiz?
>
> Yeah sounds like a good idea.
>
> Something that could do that would be ideal. Tho I would make it more
> generic than that. GL_YIELD is just an env. variable and thus you could
> probably just return a recommended list of environment variables rather
> than testing for the GL_YIELD specifically. That way if Nvidia or Ati
> etc. introduce new variables the tool can be updated and people use of
> it will not need to change.
>
> I'd generificate two specific modes:
>
> compiz-helper --recommend --env
> compiz-helper --recommend --args
>
> Or something similar.

Yeah... I used this, but slightly diffrent. Basicly -r env, -r args or
-r both. See if it looks sane to you. (Of course what it actually
gives you is, again, pretty useless.)

The script I wrote stores the result of it's test, so you won't have
to do the same tests every time (though they are quick). This also
allows you to easily override the script. It is in no way perfect, but
see if you like the concept, so we'll see if it's worth working
further on it :)

Oh, I guess this actually does what you suggested too, Mike, except it
does it in a single file, but that's not really significant :)

--
Regards,
Kristian