28 lines
836 B
Python
28 lines
836 B
Python
from Module import Module
|
|
from parse_config_file import get_bar_config_and_module_config_list
|
|
|
|
def main():
|
|
bar_config, module_config_list = get_bar_config_and_module_config_list("/home/noah/src/easyconf-lemonbar/data/testing_config.yml")
|
|
padding = bar_config["padding"]
|
|
|
|
left_modules = []
|
|
center_modules = []
|
|
right_modules = []
|
|
|
|
all_modules = (left_modules, center_modules, right_modules)
|
|
|
|
for module_config in module_config_list:
|
|
module = Module(module_config, padding, all_modules)
|
|
match module.alignment:
|
|
case "left":
|
|
left_modules.append(module)
|
|
case "center":
|
|
center_modules.append(module)
|
|
case "right":
|
|
right_modules.append(module)
|
|
module.start_thread()
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|