TreeLayout

From Elektra Initiative

Contents

Purpose

There are Backends which use the filesystem to store Data. These backends SHOULD use the following TreeLayout structure to save their Key.

Layout

There are following trees for Configuration available:

NamespaceNameFolder
doc/documentation and default keys/usr/share/doc/kdb/
system/system configuration/etc/kdb/system/
locallocal application configuration/usr/local/$APP/kdb/
user/user configuration$HOME/.kdb/user/

Subdirs

Every of the above mentioned trees has a set of required subdirs.

SubdirDescription
swConfiguration for installed Software
hwHardware specific configurations
menuMenu Entries for applications
keysShortcuts for Applications
other standardsmore to come...


Global Configurations

In many parts it is needed to have global settings (for user and system) which sets configurations when the applications don't say anything else. That would be very important for Shortcuts in Applications. Its a very common wish to have a specific shortcut for an often used Action (find, quit, copy, paste,...) for every application.

So it is needed to have a global configuration. When user sets a shortcut global, every application will use that shortcut. But it is possible to change it application specific.

The question is, if this feature is needed in other parts then Shortcuts?

Yes, for instance a mail app may use domain names, SMTP servers, etc. specified in the system configuration unless they are overridden by the user.

Order

The applications using elektra will get the configuration in the above used order. This is done by

kdbGetKeys (,,RECURSIVE);

Doc is hidden per default, you get it with the flag DOCUMENTATION.

If no system configuration is found the current path will be used (local/). Otherwise local/ will be hidden.

The */global configurations are for items used by many applications.

Example: You want the shortcut for opening files. Your program will first do

kdbGetKeys("/app/key/open",return,RECURSIVE);

Following will happen:

Views
MediaWiki