It’s hot

August 2, 2009

It’s hot and humid in Boston, and I’ve been finding it a bit hard to sleep sometimes. I keep telling myself I’m going to get an air conditioner, but, well, laziness and money. Anyways tonight around 3am I just gave up, and from then till now-ish I was working on this cool little hack for Gnome Shell.

So here’s the problem. I have almost no visual skills personally, and in a freeform environment like Clutter or HTML I have a really tough time making things I code look good without basically being handed the pixels directly by a visual designer. But one thing I have noticed though is we have some people in the GNOME community with awesome visual skills. So I wanted to lower the barrier to entry a bit for them.

My inspiration was Firebug (which again if you have to do HTML and haven’t tried, do so immediately); I wanted to make something where you could interactively edit and debug the visual layout. So the result of the hacking landed in bug 590515. But since you’re unlikely to do a git pull and git bz apply, I used Owen’s cool builtin facility for making .ogg recordings of the shell.

Note however that at least parts of the shell aren’t redrawing correctly in the beginning, and I gave up debugging that for now. The top chrome will appear in the middle of the video.

Ok, you don’t have the video tag, try the direct link.

Being able to hack something like this up in a short span of time is really neat I think, and definitely is one of the high points of having one’s app scripted with JavaScript. You can go in and play around, even monkey patch things.

To actually make this useful for artists there’s a lot more to do; a Firebug style properties display/layout debugger probably wouldn’t be too hard, and would help you get past the problem of even knowing what properties there are. But besides this tool, in the big picture we really need to switch to CSS, but that’s coming.

One question you may have is why when I moused over the window area, we didn’t see different boxes for the windows? Well, that comes down to the fact that there’s a transparent input-only box over the windows. A nice future enhancement for this tool would be to be able to skip layers; then you could type in a bit of code and animate/color etc. your windows.

Another thing that would be neat from a code perspective to make this more useful for hackers is to allow JavaScript subclassing GObject; the problem is most of the shell there’s no good way to get the JavaScript framework from a given actor. If only I had a time machine to go back to when Brendan was typing in code for prototypes, and hand him an extends keyword. But, speaking of dreaming…it’s 8am now.

There’s more going on in the shell land, among other things we’re taskbar-less now. Yay for less visual chrome, though we have to work through the details. More on this later.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: