Skip to content

Functioning

techcoder20 edited this page Mar 11, 2022 · 1 revision

UNDER THE HOOD

Here is a quick overview of how the different features of Theme Saver work:

What is a Slot

A slot is basically a folder. All your configs are saved in that folder. Its as simple as that.

Why in /opt

Firstly opt is meant for storing externally installed apps. Secondly I was trying to store the configs in such a way that the username doesnt appear so that when the user uploads their rice to the shop their username wont be exposed. So instead of using ~/.themesaver the app is making use of /opt

How the config file works ?

The config file is basically a env file which stands for environmetal variables. The app just reads the env file and uses the variables in the app.

Saving Slot

The app first check the config.env file for what all folder it needs to save. Then it takes hose list of folders and copies them into the Slot.

Loading Slot

The app first makes a backup of your existing configs. Then it overwrites those configs by copying the files stored in the Slot

Deleting Slot

Deleting slot just deletes slot folder

Listing Slots

It list the folders present in /opt/themesaver

Exporting Slot

The program exports a slot in the form of a .tar.gz file which can be imported on your other devices using the ThemeSaver app. You may ask why cant you just copy paste the slot ? Well the reason you cant do that it the themes and icons used in the rice may not be present in the other device thats why the program will go through the config files find which themes and icons are being use and stored them in a folder and finall compresses them into a .tar.gz file.

Importing Slot

Importing slot just does the opposite of exporting a slot. It just copies the themes and icons and other stuff and copies the slot so it can be used withe the ThemeSaver app.

Clone this wiki locally