6. The future

There are many paths in the future of this project. Some or all of them may be taken. The readers are invited to advocate for any they favour, and to suggest others.

6.1. Buttons: do what I mean

Almost every Cowbell CSS file contains a series of predictable rules, one for each button:


      button.menu { width:200px; height:200px; background-image: url('menu.png'); }
      button.close { width:200px; height:200px; background-image: url('close.png'); }
      button.maximize { width:200px; height:200px; background-image: url('maximize.png'); }
      button.minimize { width:200px; height:200px; background-image: url('minimize.png'); }
      button.shade { width:200px; height:200px; background-image: url('shade.png'); }
      button.stick { width:200px; height:200px; background-image: url('stick.png'); }
      button.above { width:200px; height:200px; background-image: url('above.png'); }
    

It would make sense for Cowbell to check whether there were files named button-*.png in the theme directory, and for each one assume such a rule automatically. Rules in the theme would override such implicit rules.

6.2. Single file doctrine

Metacity themes are currently shipped in a zipfile or tarball, which must be unpacked before use. It may be more helpful if they can be used in the shipping format.

This may be accomplished by allowing Metacity to read files out of tarballs.

It is also possible that we can use data: URLs in order to keep all referents in the same file. Code for this is already written but is not shipping.

6.3. Pseudoclasses

There is currently no way for buttons to change their appearance when pressed or prelighted. This could clearly be achieved using the :hover and :active pseudoclasses. This functionality is not present in the current version; it will be in a later version.

6.4. Debugging signals

It would be helpful if a particular signal made Metacity dump its parse tree of the CSS of the current theme, and the calculated coordinates of all the elements. This would also be useful in writing automated tests.

6.5. Frenkle: an editor

There are plans for a simple interactive editor which will allow you to change the colours, alignment, and so on on the fly.

6.6. Allowing the title to be absent

In a future release, it will be possible for themes to show no title. This will make themes such as Prelude possible under Cowbell.

This will be acheived as follows:


      title { display: none; }
      area.titlebar { height: 15px; }
    

The height of area.titlebar will default to some sensible value.

6.7. Allowing buttons to be absent

Similarly, it should be possible to remove buttons using display: none;. This would allow use of the common pattern where unfocused windows have no controls.

6.8. Metadata parsing

Metacity should parse the theme's metadata (see Section 4) and refuse to load a theme where it is missing or clearly erroneous.

6.9. More colours

At present, only literal colours can be used. We need to support colours based on the GTK theme as well.

6.10. Cascades

It may make sense to allow themes to inherit settings from other themes. This would introduce dependency problems, however.

6.11. Filters

Internet Explorer has a custom CSS property called -ms-filter that allows various graphical effects to be added to elements. We should do something similar. In particular, we need:

6.12. Extra buttons

The window manager is capable of adding other buttons than the standard seven, but this has never been done in the past because instructions for drawing them would need to be added to every theme.

Now that buttons are identified by their classes, it is possible that some file format defining new buttons could supply CSS supplemental to each theme, describing how to draw the new button. If the theme already described how to draw such a button, it would take priority.

Some possible uses for extra buttons:

In case extra buttons are in use, themes should ensure that unknown buttons degrade gracefully.

6.13. area.filler

It has been suggested that an extra area could be added to fill in the space to the right of left-justified titles, to the right of left-justified titles, and either side of centred titles. The class of this area would be filler.

This would allow, for example, background decorations to tile a whole number of times yet not run under the title.

6.14. CSS in GConf

It should be possible either to give overriding CSS in GConf, or to specify an overriding stylesheet.

6.15. Of both kinds

Cowbell-enabled Metacity only supports Cowbell themes, and standard Metacity only supports standard themes. When Cowbell is merged, it is intended that the final version will support both kinds.

6.16. Other window managers

It has always been the intention to design a method of styling window borders using CSS which can be adopted by multiple window managers. Mutter is an obvious candidate, but KWin and others could also be fertile targets for ports.