Contents |
There are Backends which use the filesystem to store Data. These backends SHOULD use the following TreeLayout structure to save their Key.
There are following trees for Configuration available:
| Namespace | Name | Folder |
| doc/ | documentation and default keys | /usr/share/doc/kdb/ |
| system/ | system configuration | /etc/kdb/system/ |
| local | local application configuration | /usr/local/$APP/kdb/ |
| user/ | user configuration | $HOME/.kdb/user/ |
Every of the above mentioned trees has a set of required subdirs.
| Subdir | Description |
| sw | Configuration for installed Software |
| hw | Hardware specific configurations |
| menu | Menu Entries for applications |
| keys | Shortcuts for Applications |
| other standards | more to come... |
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?
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: