About
Atom features a persistent configuration system designed to store settings. With MagiScript, you get access to configuration:
- config.get() – query a configuration value
- config.set() – set a configuration value
Let’s see how you can use them.
Available Configuration
Configuration Get
The exit function stops the execution of the actually running MagiScript mini-app. When no device is connected to Atom, it will turn off after waiting for a connection.
configuration.get('keyboard.language');
Configuration Set
The sleep function turns off Atom. If the code was not persisted, it also means it forgets the code running.
configuation.set('keyboard.language', 'de');
Conclusion
These configuration-related functions will help you to use generic settings and implement mini-apps working similarly as the built-in mini-apps.