Re: Control Center



Well, so this is the first display hack .desktop file I've written.
It's for attraction.
It's a bit of a tedious job, but fun in some way - you get to explore
the hacks, and you can add no end of witty commentaries :))
Though, I hope you don't expect me to contribute .desktop files for
display hacks without man pages soon... It occurred to me that a
pixmap selector widget would be nice for configuring the pixmap for
the blitspin hack, BTW.

I have NOT tried this out, since my screensaver-properties-capplet is
slightly broken... first of all, I had to handroll a .desktop file to
make it appear in the Control Center, and then, it didn't parse the
Deco .desktop file and it didn't show the pixmap for Qix. After
various clicking, it crashed, burned and took X down with it.

Look at the FIXME tags in the code for various questions of mine.
Please. I need your help to go on. BTW, if there is a need for such a
silly job, I am willing to volunteer maintainer of the screensaver
.desktop files, since I've got plenty of spare time. If you don't need
such a person, no problem.

I think that if you explain me the issues I marked with FIXMEs down
there, you can expect at least 10 .desktop files before the end of
this week^W^Wrather the next four weeks.

FIXME: what are the differences between LRange, NRange and Entry? what
other widgets are there?
FIXME: do I need to break lines explicitly in all the labels? If yes,
I'll need a functioning screensaver-properties-capplet, how do I do
that?

[Desktop Entry]
Name=Qix
Comment=Let points attracte and repulse each other (with variations).
Exec=xscreensaver-command -activate
TryExec=attraction
Terminal=0
Type=Application

[Screensaver Data]
WindowIdCommand=-window-id 
Icon=
Author=Jamie Zawinski <jwz@jwz.org>
ExtendedComment=The attraction programme\nhas several modes of
operation,\nall of which are based on\nthe interaction of control
points.
DefaultFlags=-no-mouse
FIXME: Perhaps we should support the mouse?

[Arg0]
Name=Points
Type=NRange
Label=Points:
Flag=-points
ValType=I[0-30]=0
Comment=How many control points should be used. 0 means a random
number.

[Arg1]
Name=Threshold
Type=LRange
ValType=I[1-1000]=100
Flag=-threshold
Label=Count:
LeftLabel=Repulsion Threshold:
Comment=The distance from each particle at which attraction becomes
repulsion.

[Arg2]
FIXME: How to do a list of radio buttons?

[Arg3]
Name=Size
Type=Entry
ValType=I[0-50]=8
Flag=-size
LeftLabel=Size of balls:
RightLabel=[0-50]
Comment=Sets the ball size (point mass in other modes). 0 means a
random number.

[Arg4]
Name=Segments
Type=Entry
ValType=I[0-300]=100
Flag=-segments
LeftLabel=Number of line segments or polygons.
Comment=How many segments to draw. 0 means don't erase lines.

[Arg5]
Name=Delay
Type=LRange
ValType=I[100-100000]=10000
Flag=-delay
LeftLabel=Set delay between animation steps.
Comment=Sets how much of a delay to introduce between steps of the
animation in microseconds.

[Arg6]
Name=ColorShift
Type=NRange
Label=Color Shift:
Flag=-color-shift
ValType=I[1-256]=3
Comment=Sets how many lines will be drawn before a new color is
chosen.

FIXME: How do I do comments in a .desktop file?

FIXME: Providing an option for radius will make it easy for the user
to put
the balls off-screen. Since we don't know his resolution, it's less
hassle for
everybody to leave this at the default (adjusting with the window
size).

[Arg7]
Name=Glow
Type=Check
Flag=-glow
Flag2=-noglow
LeftLabel=Make balls glow.
Comment=In "balls" mode, specifying this option makes all the balls
glow in the same colour.

[Arg8]
Name=XVelocity
Type=Entry
ValType=I[-30-30]=5
Flag=-vx
LeftLabel=Initial horizontal velocity.
RightLabel=[-30-30]
Comment=This is the initial horizontal velocity of the points. A
positive value will make the balls move to the right, a negative one
will make them move to the left.

[Arg9]
Name=YVelocity
Type=Entry
ValType=I[-30-30]=5
Flag=-vy
LeftLabel=Initial vertical velocity:
RightLabel=[-30-30]
Comment=This is the initial vertical velocity of the points. A
positive value will make the balls move up, a negative one will make
them move down.

FIXME: are negative entries possible?

[Arg10]
Name=Orbit
Type=Check
Flag=-orbit
Flag2=FIXME: Do I always need a Flag2 for checkboxes?
LeftLabel=Put balls in orbit?
Comment=Checking this will put the balls or points into a Kemplerer
rosette orbit that will decay in a most interesting way. Larry Niven
fans will enjoy this.

[Arg11]
Name=VMult
Type=FIXME: how do I create a widget for a floating point value?
ValType=I[0.5-1.5]=0.9
LeftLabel=Pull inwards or outwards in Orbit mode:
RightLabel=[0.5-1.5]
Comment=In orbit mode, the initial velocity of the balls is multiplied
by this. A value <1 makes the balls pull closer together, a larger
number will make them move apart.

FIXME: BTW, can Names contain spaces?

[Arg12]
Name=Viscosity
Type=FIXME: floating point if possible
ValType=I[0.1-1]=1
LeftLabel=Viscosity:
RightLabel=[0.1-1]
Comment=This sets the viscosity of the hypothetical fluid through
which the points move. Values smaller than 1 mean increased
resistance.


mawa
-- 
Matthias Warkus    |    mawa@iname.com    |    Dyson Spheres for sale!
My site's been cracked but it'll go up on another server soon. My Geek
Code is no longer in my .signature.  It's available on e-mail request.
/\/\/\\/\//\ (mawa) <-- this is why ASCII art in signatures is no good



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]