From 2c98c5fe81cd649a6ae66dd3ed295f1cb2f46849 Mon Sep 17 00:00:00 2001 From: Chandler J Date: Sat, 2 Mar 2024 12:39:36 -0700 Subject: improved color picking procedure --- src/load_config.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/load_config.py') diff --git a/src/load_config.py b/src/load_config.py index 2c894a3..dbc0d81 100644 --- a/src/load_config.py +++ b/src/load_config.py @@ -16,8 +16,8 @@ class systemConfig: rofi_config = "" username = "" rice_config = "" - #instant rice configuration settings + num_palettes = 15 use_dmenu = False generate_i3_lock = False @@ -69,5 +69,14 @@ class systemConfig: match = line.split(' ') self.generate_i3_lock = True if match[2] == 'True' else False if "wallpaper_directory" in line: - match = line.split(' ') + match = line.strip().split(' ') + if not match[2].endswith('/'): + match[2] += '/' self.wallpaper_directory = match[2] + if "num_palettes" in line: + match = line.strip().split(' ') + 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.') -- cgit v1.2.3