Adding a config scheme
Hi I am quite new to redox and Rust but I think I might have found a thing that would be good to add. I was thinking of a config Scheme where Programs could save their configs to. (It is quite a mess in Linux at least from my experience)
Anyways here some example URLs:
- config:/ion
- config:/ion/background_color
- config:/system/timezone
Here some Pseudo-Code:
write("config:/ion" Buffer::empty()); // could be used to create a default config
let current_config = read("config:/ion"); // used when loading the entire config left font_config = read("config:/ion/fonts"); // used when loading the fonts config
Short Description
Each User has an own config for each Application/Program when the handler receives the open request it opens the App-Config of the user. Optionally a branch like system (with one main branch) could be integrated where each user could have multiple configs which each have a name. (Sth like this can be seen in the Godot Gameengine).
More Pseudo code :)
struct ConfigScheme{ ByApp: HashMap<String, ProgramConfig> // sorted by Program here as it should be easier to add new Programs }
struct ProgramConfig{ ByUsers: HashMap<u32, Profiles> }
struct Profiles{ main: Profile, other: Option<Vec> // could be just a Vec too. }
struct Profile{ profiles: HashMap<String, ConfigData> // optionally add paths like described }
struct ConfigData{ private: bool, Data } //I don't know what datatype to use here. //I would either encode everything to a String/ bytes //or make an Enum with every accepted Datatype (which seems pretty stupid)
I hope this might be a good idea if not just close this issue Sorry for my bad English. I am not a native speaker