frameless links:[news] [shells] [.apps] [tips] [graphics] [add-ons] [links] [frames] [tin_omen]

Graphite

History

Graphite is a completely different approach to a desktop shell. It uses 'theme scripting', the developer, Damian "mian" Hodgkiss' term for a fully-scripted interface, using jscript, vbscript, Perl or Python. mian is known for his extensive work on Litestep23e, Litestep24.0, the eFX interface skinning application, skinz.org, and a variety of other projects. He's one productive guy!<g>

Article, "And now for something completely different" from 12/06/99, by tin_omen.

For the last couple of weeks I've had the opportunity to beta test a new shell that uses an amazing new approach, a completely scripted interface! That is, it uses jscript or perlscript to assemble the interface components, giving the thememaker an amazing level of control, because the interface isn't simply a static representation of a config file, but an actual running script!

Well it looks like today the wraps have finally come off, and the developer, mian (known for his prior work on Litestep24, eFX, and of course skinz.org), has finally decided to publicly release a beta of his new baby: Graphite v0.99 Build 23.

On the pointy technical end(:P), Graphite uses the jscript engine included with IE4.X or later, and/or the ActivePerl PerlScript engine available from ActiveState. Installation on my NT4sp5 Workstation was a snap, I simply download the 881k zip archive, and unpacked it into c:\graphite. From there I logged out of my regular shell, and used LiteSpawn's 'Other' option to pick the graphite.exe (non-litespawn users will want to edit the system.ini, if they use 9X, or appropriate registry settings under NT).

The shell loaded fine, by default it uses graphics from the Enlightenment theme BlueSteel, and presents out of the box with the distinctive E dragbar , a functional tasks display, termed the 'icon-box', (which scrolls left & right, and has a functional thumb!), a system tray, an instance of the LSLM resource meter module for Litestep, and an instance of MrJuke's lsMail. Right clicking the desktop loads up a popup menu structure which includes your explorer Start Menu structure, as well as links to the control panel, items for recycling, shutting down and configuring the shell, and the usual collection of system utilities. Plus, the menu automatically uses your existing system color scheme (note, on first triggering of the menu, it reads your entire 'Start Menu' structure by default, which could take a little time to load, so give it a minute or so to cache up). If you check out the raw graphics files in the themes directories, you'll see that it's using PNG files as well as bmps (actually supports the whole list: JPG, PNG, BMP & TIF), this shell is definitely equipped with the full complement of power config toys!:) In addition, you'll find that the native drag-n-drop support is already configured in the default theme: dragging a bmp onto the desktop applies the image as the wallpaper. Very snazzy!

Graphite is pretty light too, with NT Workstation's TaskManager showing the graphite.exe process using 3020k of memory. Heh, for my screenshot I tried to get the lslm cpu meter to jump up a bit to show off the vis graphic I made to match the theme graphics, and it was a genuine effort to get the cpu meter to jump much at all.<g>

Graphite includes a separate app, gselect.exe, to change themes, which appears below the Settings menu, as the 'Change Theme' item. From it's droplist, you can select the other three themes that ship with the shell: one using the Enlightenment BlueHeart theme, one using E's Brushed Metal theme's graphics, and one to demonstrate configuring the shell using PerlScript. Note: The Perl scripting variant will NOT function without the separate ActiveState ActivePerl download, so don't try selecting it without the supporting material!, or may have to either manually kill the shell and launch a new one, or shutdown and restart your box:P

Documentation is included in the form of the 'graphite.chm' help file, which is linked in the menu under the 'Help' item. The help file includes the following material:

* A discussion of the core concept of the shell, 'Theme Scripting'
* A list of desktop and shortcut events
* A HOWTO section that covers creating menus and shortcuts
* A full properties lists for the Desktop, menu Shell and Shortcut objects
* A brief discussion and example of using the jscript and PerlScript engines.

So how does Graphite work? Well on load up of the graphite.exe, the shell simply changes to the either the .\themes\default or last-saved themes directory, checks the local theme.ini file for the engine type and script file name (usually theme.js when using jscript), and then begins executing the designated script file. Jscript is reasonably well documented over at Microsoft, and is well beyond the bounds of this simple article, (not to mention that I'm still sorting it out myself<g>), but here's a little info about how to make sense of the theme.js file.:

If you open up the .\graphite\themes\default\theme.js file in a text editor, you'll find at the top it uses a variety of 'var' lines. These are variable declarations, and/or assignments (familiar stuff if you've ever used a programming language), that is, they create memory space for a variable, and in some cases assign it a value, using a '=' sign. Like so:
var caption = 'graphite :: Blue Steel';
The above creates a variable named 'caption', and assigns the new variable the value 'graphite :: Blue Steel'. The semicolon at the end is an end-of-line marker required at the end of every line of jscript. Also, you'll notice a fair number of lines beginning with '//', these are comments, to make the script more readable, and are not executed.

Browsing through the file, you'll find that it's comprised of a series of sections:

  • The top section contains variable declarations and/or assignments (where the majority of the lines beginning with 'var' are).

  • The section marked '//Menu items' creates a set of array's which defines the menu structures, icon images used for each, and descriptive text strings.

From there, the script then sets up a series of functions to perform the work of the interface (functions are self-contained code blocks that perform some task, and then return to the point in the script that called them):

  • The '// main command parser' function, which is the primary event-handling portion of the script. That is, anytime there is an event triggered (right-click the desktop, click a short cut etc.), the result is run through this portion of the script to determine what action should be taken (popup a desktop menu, run a program etc.).

  • You'll find a function that handles passing commands from a desktop Winamp control panel to the Winamp app (implemented in the BlueHeart theme, select it, to see this in action).

  • Functions that handle creating, destroying and right-click display of the menu

  • A function labeled, '// shell is going down; do any cleanups here' takes care of shutting things down cleanly by releasing memory for all desktop objects etc.

  • Functions that handle mouse button press and release, and drag & drop onto desktop shortcuts.

  • Functions that handle drag & drop onto the desktop.

  • Functions handling the arrow-up and down shortcuts, and dragbar left & right arrows and center portion clicks.

  • A systray function which sets up the tray

  • A wharf section which defines desktop wharf items (Litestep wharf modules are supported here, lslm.dll and alsclock are used in the themes bundled by the shell).

  • A desktop section where the Desktop Area specs are set

  • Material to handle the desktop icon box (AKA tasks list)

  • And finally, a command to automatically popup the about box on shell load (you'll probably want to comment this item out, once you've seen it a few times:P)

Pretty fancy stuff, but not too difficult to tackle, especially if you've had any prior programming or scripting experience. I'm not a C or Perl coder (although I'll admit I do program in VB) and I can comment that in spite of the apparent surface complexity, there are actually some reasonably simple things going on here. It's just a matter of sitting down and working your way through exactly how execution moves from point to point in the script. Even if you don't fully comprehend how everything works, you can do a fair amount of tweaking simply by cutting & pasting components between the existing bundled themes' theme.js files (as I've done on my current desktop shot<g>).

In summary, installing Graphite and getting it upright is a pretty simple process, with a minimum of end-user configuration required to make it run. The shell includes a fair amount of functionality right out of the box, and using the bundled prefabricated themes seems to work just fine. Obviously, tackling the creation of a fully-scripted Graphite theme in jscript or Perl will not be an easy process for the casual user, but for folks sincerely interested in asserting the maximum amount of control over their desktop, it is almost certainly one of the most powerful tools available. Give it a run, it'll knock your socks off!:D Graphite Homepage.

Article, "Use the source Luke"  2/13/00, by tin_omen.

This is about as cool as anything I've seen in quite awhile.<g> Most of you folks are aware that mian has spent the last month or so doing an extensive ground-up rewrite of the Graphite shell for win32. The hot news is that as of this morning he has decided to make Graphite an opensource project! *and the crowd goes wild!* Here's his formal post from graphite.sh:

Graphite goes OpenSource
I have decided to make the re-write of Graphite opensource, under a small protected license
(quoted below). The idea is to gather more public interest developer-wise and have each developer working on a section, rather than me working on every section :) If you would like to contribute please see the download page for CVS instructions, grab the latest source and see if you're upto it. Knowledge of Windows C++, COM and ATL is required. I am very busy at the moment with a huge site rewrite that you'll see soon elsewhere but i'll try to get things up & running.

The current source download's readme offers these additional comments,

This current release isn't in (a) runnable state, its purpose is to try gather up someone 3rd party development from quality developers, and create the most flexible, integrated shell available. While this is opensource, it is not GPL, it is under its own license (see LICENSE for details).

As to the license, it's a simple license in the following form:

ALL CODE CONTAINED HEREIN IS COPYRIGHT (C) ITS RESPECTIVE AUTHOR. YOU MAY FREELY MODIFIY THIS SOURCE FOR PERSONAL USE ONLY, BUT YOU MAY NOT USE ANY CODE CONTAINED HEREIN OUTSIDE OF THIS PROJECT. THIS SOURCE CODE IS PROTECTED BY LOCAL AND INTERNATIONAL COPYRIGHT LAWS.

Looks pretty reasonable and straightforward. Allows anyone to contribute, to help the growth of the shell, but prevents folks from stealing the code for reuse in other projects. This has become a key concern for opensource shell devs that have watched the code they sweated over stalk off into a variety of closed-source projects and competing shells, completely uncredited. So much so that Headius of the lsdev team submitted a question on the issue a while back to Ask Slashdot.

And for coders interested in contributing, a bit more detail can be gleaned from the cvs source release's Contrib,v file:

If you would like to contribute to this project you must have adequate knowledge of programming Windows C++, COM and ATL. All core components MUST be written in C++, using no MFC. This is my choice for the core of the shell as I want it as fast, efficient and free of 3rd party helpers like MFC as possible. Of course you can write any 3rd party components in any language you like. The shell is aimed to compliment the Windows 2000 operating system, not diminish its outstanding stability and provide a true customizable, expandable desktop environment.

If you agree to the above and would like to help on the project email me at mian@thirty4.com stating that you agree and understand the above requirements and you will be given a write-access CVS login to use.

The latest source can always be obtained via anonymous CVS from:

 Server: cvs.thirty4.com
 Login: graphite
 Password: graphite

This login permits read-only access.

Heh, I've been tossing a term around above extensively, and I haven't yet mentioned how cool and forward-looking it is: Graphite has public anonymous cvs access! That means anyone with the appropriate development tools can always use a cvs-client to log directly into cvs and pull the latest source (or grab the archived prior days development source) and compile it up! The premiere opensource shell (which mian contributed to extensively), 'Litestep' didn't have daily source available until January of 1999 (to my recollection), and only enabled anonymouse cvs access in the last few weeks. Graphite has only existed as a shell for something over three months and it already has both! Excruciatingly cool! Head over to www.graphite.sh and check it out. :D

 

A Graphite desktop running my slightly tweaked variant of the default theme shipped with the shell (graphics from hunchback's BlueSteel Theme for Enlightenment) is visible here:

Distribution

Unfortunately, in spite of Graphite's massive potential and growing popularaity in early 2000, the shell has languished since March of that year. The last formal build released was version .99 Build 40. The original graphite.sh site has long since been taken down, as has the Graphite page at mian's current site, www.thirty4.com. But we still ahve a copy of .99 Build 40 here in our shellark, and a copy of the last-modified 3/29/00 cvs source code can be found there as well. I've spoken to a few developers who would love to resurect the shell in some form, so it's entirely possible someone may pick things up where mian left off and decide to run with it! Till then feel free to play with what we have. It's a bit rough around the edges but genuinely good stuff!

No fancy layout or scripting. Just info & graphics.
(optimized for at least 800x600 resolution at highcolor depth)

All original material on this site is ©1998-2000 Todd Kadrie/ tin_omen.  These materials are intended for personal non-commercial use only.  No material from this site is to be mirrored, redistributed, archived or transmitted without the author's or copyright holder's express written consent.