Development

Cooperating themes

Cothemes compared to the Theme Package Specification draft

Another theme package format has been proposed with similar goals to Cothemes. The draft specification can be found at:
http://freedesktop.org/wiki/ThemePackageSpec

This document aims to compare them.

ThemePackage Cotheme Comments by Flimm, author of Cotheme
File extension .theme .cotheme .theme is already used by Windows themes, as well as other file formats. .cotheme has not been used, as far as I am aware.
Mime-type application/x-themepackage application/x-cotheme Both are unique, AFAIK
Archive format gzipped-compressed tarball zip Gzipped tarballs are the traditional archive format for themes on free desktop environments. However, the zip file format is more universally accepted. In addition, zip files allow random access to its contents by file name, allowing rapid extraction of metadata files or thumbnail files. Different files can be compressed at different levels and at specified positions in the file. This is important for maintaining the magic number. OpenDocument packages use zip.
Magic number None application/x-cotheme found at byte x
Metadata file format an INI file an RDF/XML file While INI files are simpler to edit by hand, their format is not well documented, leading to incompatible parsers. XML files are also reasonably easy to edit by hand. The XML file format is very well defined, and parsers exist for practically every programming language. Developers and theme creators would not need to know RDF at all, similar to DOAP, the XML format chosen would coincide with RDF/XML.
Embedded thumbnails None Included (Thumbnails/thumbnail.png) Cotheme's thumbnail mechanism is similar to OpenDocument's.
Include multiple themes Yes Yes
Theme types allowed Not specified Almost any that meet the minimum requirements
Theme type names Simple but limited: gtk-2.0, xfwm4, etc Uses URNs, unlimited
Required and recommended meta-data
  • name
  • version
  • name and email of the maintainer
  • name of the artist
  • description
  • license
  • name
  • version
  • name of the creator
  • description
  • license
  • source
  • rights holder
  • date copyrighted
  • dominant colour
  • relationships to other cothemes (dependence or inclusion)
  • dependencies on pieces of software
  • (can be expanded to include any RDF data, which is unlimited)
Cothemes use the well-established vocabulary of Dublin Core for some of its metadata. Dependencies on other themes can be specified (for example, icon themes on other icon themes). Dependencies on software programs or libraries can be specified (for example, GTK themes on GTK engines), in a way that would allow automatic installation of the dependency.
Can metadata be translated? Unspecified, probably yes Yes

Design document

This is the design document for the application Epidermis.
Please note that this is a work in progress.

The mission

Epidermis aims to make changing the look of your GNOME desktop complete, rapid, simple, automatic, customisable and shareable.
As a secondary mission, Epidermis wants to aid the user in creating their own look and sharing it to other Epidermis users, but without hindering those who consume exclusively.

The look of a GNOME desktop

Ubuntu (using GNOME) has the following customisable elements, which change its look and feel:

  • Wallpaper (GNOME or compiz)
  • Metacity window border theme
  • GTK widget theme
  • Icon set
  • GNOME splash image
  • Mouse cursor theme
  • Grub bootsplash screen
  • Usplash bootsplash screen
  • GDM login screen
  • Qt theme
  • Emerald theme
  • Panel
  • Fonts
  • Sounds
  • Docks like AWN, cairo-dock...
  • Screenlets, widgets
  • Screensaver
  • Wine colours
  • Program themes:
    • Firefox
    • Opera
    • VLC
    • Java(?)
    • OpenOffice.org(?)

(Add anything else that you can think of here)

Epidermis' customisation unit: pigment

In order to keep Epidermis' customisations both customisable and complete, a structure involving pigments and skins was created.
A pigment is a customisation of a piece of the GNOME desktop. It contains the files necessary to activate the customisation, (with the exception of skins,) and the information describing it, including authorship, copyright, name, key words, description, main colours and a preview image.
A pigment type is a category of pigments sharing the same characteristics of the area of the GNOME desktop they affect using the same technology, for example, pigment types can include: Metacity, wallpaper, GDM login screen... Metacity and Emerald are seperate pigment types, because they use different technology.
A skin is a pigment of the type skin, it is unique in the fact that it includes links to other pigments required for the activation of the skin. It should link to (at least?) one pigment of every type (other than skin). The skin is the means through which both complete and rapid customisation occurs.

The file structure of a pigment

A pigment is one single file. It is a gzipped tar archive (.tar.gz) of other files, but it has the extension .pigment .
Its mime-type is application/x-pigment
The archive should contain:

  • A folder named data, which contains the uncompressed files necessary to activate the pigment. For example, a icon set pigment would contain the folder of the icons under data.
  • A folder named information, containing:
    • One XML file with text only information concerning the pigment
    • A preview image

(Should we allow a file to include several pigments? This would make it easier for people with no Internet access to distribute skins) (Implemented in packs)

A pigment's XML information file

Here's an example of a pigment's XML information file:

<?xml version="1.0" ?>
<pigment>
<pigmentVersion>0.1</pigmentVersion>
<name lang="en">3LCD</name>
<description lang="en">Just a different angle rendering of another wallpaper I did</description>
<type>wallpaper</type>
<codename>3lcd</codename>
<copyright>Free</copyright>
<author>Chris S</author>
<preview>3lcd.png</preview>
<filename>3lcd.jpg</filename>
<pictureOptions>zoom</pictureOptions>
<colorShadingType>solid</colorShadingType>
<primaryColor>#87028e72ffff</primaryColor>
</pigment>

(TODO: XML schemas)

Skin XML example

Here's an example of pigment.xml for a skin pigment.
Note that Skin is the only type of pigment that doesn't require a preview image, for the time being.

<?xml version="1.0" ?>
<pigment>
<pigmentVersion>0.1</pigmentVersion>
<name lang="en">Ubuntu Studio</name>
<description lang="en">The default Ubuntu Studio theme</description>
<type>skin</type>
<codename>ubuntu-studio</codename>
<copyright>Creative Commons and other</copyright>
<author>Ubuntu Studio</author>
<preview></preview>
<primaryColors><color>Black</color></primaryColors>
<secondaryColors><color>white</color></secondaryColors>
<keyWords><keyWord lang="en">Studio</keyWord></keyWords>
<version>unknown</version>
<webPage></webPage>
 
<link><codename type="wallpaper">3lcd</codename></link>
<link><codename type="metacity">ubuntu-studio</codename></link>
<link><codename type="gtk">ubuntu-studio</codename></link>
<link><codename type="icons">ubuntu-studio</codename></link>
<link><codename type="gnomeSplash">blue-ubuntu</codename></link>
<link><codename type="cursors">ComixCursors-blue-regular</codename></link>
<link><codename type="grub">debian-moreblue-swirl</codename></link>
<link><codename type="gdm">blue-folder</codename></link>
<link><codename type="usplash">splash</codename></link>
 
</pigment>

The shared repository for distributing pigments

In order to simplify accessing available pigments and sharing them, using shared repositories, preferably online, is a must for Epidermis.
Epidermis currently uses a variation of Get Hot New Stuff (http://ghns.freedesktop.org). Browse (http://download.tuxfamily.org/epidermis/ghns) for an example of an Epidermis repository.

The user interface

The user interface has these requirements: it should include both a GUI and a command line interface, it should fit in with the customized GNOME desktop, it should keep its mission in focus and therefore hide secondary functionality. It should comply with the HIG and use GTK.

Daniel Glimm's desktop designer

Daniel Glimm has shared an independent non-functional prototype for an application very similar to Epidermis. He included screenshots, the glade file and a python app.

Here's the mock-up.
Dan's mock-upDan's mock-up

The 0.1p3 GUI

AttachmentSize
glade.zip11.29 KB

The 0.1p3 GUI was devided in two: the main app, and the creator app.
The main app
This window was devided into three: Installed, Find more and Settings.
0.1p3 screenshot 1: Installed0.1p3 screenshot 1: Installed
0.1p3 screenshot 2: Find more0.1p3 screenshot 2: Find more
0.1p3 screenshot 3: Settings0.1p3 screenshot 3: Settings
Three dialogs are displayed at the appropriate times: (progress window not displayed)
0.1p3 apply: Applying skin0.1p3 apply: Applying skin
0.1p3 customise: Customise window0.1p3 customise: Customise window
Attached is the glade file.

The creator app
This app was there for those wishing to create their own pigments without editing XML.
0.1p3 creator: Creator0.1p3 creator: Creator

Test cases

  1. Install Epidermis using the .deb downloaded from launchpad, or from the PPA.
  2. Make sure you can access Epidermis from the following places:
    • Your desktop environment's menu, on GNOME, Applications, System Tools, Epidermis. Make sure the icon is correct.
    • From the terminal, typing epidermis and then enter should launch Epidermis
  3. Launch Epidermis. Set the repo to http://downloads.tuxfamily.org/epidermis/ghns/downloads.xml , as it should be by default.
  4. Click About, the version displayed should be the version you expect to see. If you're using Epidermis in a language other than English, make sure the translators have been credited in the About dialog.
  5. Click 'Find More', and install one or two skins, if not all of them, from the repository.
  6. Go to installed, and apply each of the skins in turn, activating all the pigment types (including usplash, gdm and grub themes). Make sure that they have been activated.
  7. Click 'Find More' and look for any pigments that have not been yet downloaded and installed, example: Artic Penguin wallpaper is not included in any skins, so you need to install it manually.
  8. In 'Installed', customise a skin by changing one of the linked pigments to a newly downloaded one. Verify that if you change a skin back to how it was originally, the custom skin automatically disappears. Apply the custom skin.
  9. Save the customised Skin, close and reload Epidermis, and make sure it's still there.
  10. Delete a few skins from 'Installed' view.
  11. Download a few pigments manually from http://downloads.tuxfamily.org/epidermis/ghns/ and install them manually by opening Epidermis and clicking 'Open'.
  12. Delete all your pigments by clicking on 'Find More' and unticking them.
  13. Check that Epidermis' manpage has been installed correctly, type 'man epidermis' in a terminal, and make sure the displayed version number matches the version of Epidermis.
  14. Check that the gconf schemas have been installed correctly by open gconf-editor to /apps/epidermis .
  15. Uninstall Epidermis.

If you encounter any bugs, you know where to report them.. If you complete the entire test case without any errors, send me a line, I'll be interested to know (David D Lowe).