edelib  2.1.0
Theme layout and search locations

Theme layout

Theme is directory with a bunch of Theme files and files used by theme, like images or sound files. Knowing this, you can conclude how theme name is a name of this directory and when Theme engine start to look for named theme, it will try to find a directory with this name.

For example, here is an example layout for a Foo theme:

Foo/
main.ewt
application1.ewt
application2.ewt
sounds/
on-click.ogg
window-close.ogg
window-hide.ogg
images/
img1.png
img2.png

Here, main.ewt will include (via (include) directive) application1.ewt and application2.ewt files, like:

;; main.ewt
;; theme information
(theme.name "Foo")
(theme.author "John Foo <john@foo.com>")
(theme.sample "img.jpg")
;; styles
(theme.style "ede" [
background_color "#ffffff"
background_color2 "#043456"
icon_theme "edeneu"
])
;; include the rest
(include "application1.ewt")
(include "application2.ewt")

Or, main.ewt does not have to have any style code; it can only serve as loader for a bunch of styles separated in a special file. Combinations are limitless.

Default theme and default locations

Default theme that will be loaded is default. This name can be either a directory or symbolic link to desired theme. Knowing this, changing theme is simply creating symbolic link on target theme.

Themes will be searched in $XDG_DATA_DIRS/themes directories. If Theme class has a prefix (default is "ede"), themes will be searched in $XDG_DATA_DIRS/themes/prefix.