fixed major bug where it read the wrong config
This commit is contained in:
parent
65195e1976
commit
edb8e97d04
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
||||||
from parse_config_file import get_bar_config_and_module_config_list
|
from parse_config_file import get_bar_config_and_module_config_list
|
||||||
|
from os import getenv
|
||||||
|
from os.path import exists
|
||||||
|
|
||||||
def generate_flags(bar_config):
|
def generate_flags(bar_config):
|
||||||
flags = ""
|
flags = ""
|
||||||
|
@ -26,6 +28,11 @@ def generate_flags(bar_config):
|
||||||
flags += (" -U '" + bar_config[option] + "'")
|
flags += (" -U '" + bar_config[option] + "'")
|
||||||
return flags.strip()
|
return flags.strip()
|
||||||
|
|
||||||
bar_config, module_config_list = get_bar_config_and_module_config_list("/home/noah/src/easyconf-lemonbar/data/testing_config.yml")
|
if exists("./data/testing_config.yml"):
|
||||||
|
config_file = "./data/testing_config.yml"
|
||||||
|
else:
|
||||||
|
config_file = str(getenv("HOME")) + "/.config/easyconf-lemonbar.yml"
|
||||||
|
|
||||||
|
bar_config, module_config_list = get_bar_config_and_module_config_list(config_file)
|
||||||
|
|
||||||
print(generate_flags(bar_config))
|
print(generate_flags(bar_config))
|
||||||
|
|
Loading…
Reference in a new issue