diff options
| author | Chandler J <cjustice2000@gmail.com> | 2024-04-12 20:54:20 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-12 20:54:20 -0600 |
| commit | c5937854ff01ba29da48b7b0560ef27faad00d53 (patch) | |
| tree | e8fc9dc0bb690cc1976a47fe1166f4bafcafcb40 /src/load_config.py | |
| parent | 2564189a769a5bd3de63086bb62dc3532d1b07b9 (diff) | |
| parent | 8a1903bb16d9e04795c33f3eb226486d06e8a642 (diff) | |
Merge pull request #2 from chandlerj/saves
major changes: save states & refactoring
Diffstat (limited to 'src/load_config.py')
| -rw-r--r-- | src/load_config.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/load_config.py b/src/load_config.py index e28e9c3..5fe99b9 100644 --- a/src/load_config.py +++ b/src/load_config.py @@ -23,6 +23,7 @@ class systemConfig: self.use_dmenu = False self.generate_i3_lock = False self.menu_keybind = "" + self.theme_directory = "" print('[bold green]Loading configuration files') @@ -38,6 +39,7 @@ class systemConfig: self.polybar_config = f'/home/{self.username}/.config/polybar/config.ini' if os.path.exists(f'/home/{self.username}/.config/rofi/config.rasi'): self.rofi_config = f'/home/{self.username}/.config/rofi/config.rasi' + if os.path.exists(f'/home/{self.username}/.config/instantrice/'): self.rice_config = f'/home/{self.username}/.config/instantrice/config.rice' self.get_user_preferences() @@ -86,6 +88,13 @@ class systemConfig: if match[2].isdigit(): self.num_palettes = int(match[2]) else: + print(f'Invalid configuration parameter at line {i}:\n{line}.\nUsing default \ + configuration of 15 palettes.') + if "theme_directory" in line: + match = line.strip().split(' ') + if not match[2].endswith('/'): + match[2] += '/' + self.theme_directory = match[2] print(f'Invalid configuration parameter at line {i}:\n{line}Using default configuration of 15 palettes.') if "menu_keybind" in line: |
