From b956fdd8cd5a4dc0620d02d0f981e507a4ee85e5 Mon Sep 17 00:00:00 2001 From: Chandler J Date: Fri, 1 Mar 2024 21:33:53 -0700 Subject: instant rice now reads from a configuration file! --- src/instant_rice.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/instant_rice.py') diff --git a/src/instant_rice.py b/src/instant_rice.py index e0faa5e..a42ec0f 100644 --- a/src/instant_rice.py +++ b/src/instant_rice.py @@ -4,18 +4,19 @@ import update_rofi import update_i3 import update_polybar from get_args import get_args,usage -from paths import Paths - +from load_config import systemConfig + if __name__ == '__main__': + if len(sys.argv) > 1: img_path, update_dmenu, nolock, initialize, reconfigure = get_args(sys.argv) hex_colors, hex_compliments = user_interface.colorPickerUI(img_path) - - if 'polybar' in Paths: - update_polybar.updatePolybarTheme(Paths['polybar'], hex_colors, hex_compliments) - if 'rofi' in Paths: - update_rofi.updateRofiTheme(Paths['rofi'], hex_colors, hex_compliments) - if 'i3' in Paths: - update_i3.updatei3Theme(Paths['i3'], img_path, hex_colors, hex_compliments, nolock, update_dmenu) + config = systemConfig() + if config.polybar_config != "": + update_polybar.updatePolybarTheme(config.polybar_config, hex_colors, hex_compliments) + if config.rofi_config != "": + update_rofi.updateRofiTheme(config.rofi_config, hex_colors, hex_compliments) + if config.i3_config: + update_i3.updatei3Theme(config.i3_config, img_path, hex_colors, hex_compliments, nolock, config.use_dmenu, config.i3_lock_image) else: usage(sys.argv) -- cgit v1.2.3