diff options
| author | chqn <chandler@cock.li> | 2023-12-14 20:13:24 -0700 |
|---|---|---|
| committer | chqn <chandler@cock.li> | 2023-12-14 20:13:24 -0700 |
| commit | 2eaf90df29b101a55be46099417faadf86bd3eb6 (patch) | |
| tree | 8c1568c3c662f780dccbe9e7d4fccca9618e3c1c /src/update_polybar.py | |
| parent | c11972edf3e08112d94083f0d3ccb7abec77df19 (diff) | |
more sensible way of organizing things
Diffstat (limited to 'src/update_polybar.py')
| -rw-r--r-- | src/update_polybar.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/update_polybar.py b/src/update_polybar.py index ff395c6..2ea16af 100644 --- a/src/update_polybar.py +++ b/src/update_polybar.py @@ -7,18 +7,18 @@ def updatePolybarTheme(config_path: str, colors: list, compliments: list): data = file.readlines() for i,line in enumerate(data): #update colors - if "background =" in line and i == 19: - data[i] = 'background = ' + colors[0] + '\n' - if "background-alt =" in line and i == 20: - data[i] = 'background-alt = ' + colors[1] + '\n' - if "foreground =" in line and i == 21: - data[i] = 'foreground = ' + compliments[0] + '\n' - if "primary =" in line and i == 22: - data[i] = 'primary = ' + compliments[1] + '\n' - if "secondary =" in line and i == 23: - data[i] = 'secondary = ' + compliments[2] + '\n' - if "disabled =" in line and i == 25: - data[i] = 'disabled = ' + colors[2] + '\n' + if "rice-background =" in line: + data[i] = 'rice-background = ' + colors[0] + '\n' + if "rice-background-alt =" in line: + data[i] = 'rice-background-alt = ' + colors[1] + '\n' + if "rice-foreground =" in line: + data[i] = 'rice-foreground = ' + compliments[0] + '\n' + if "rice-primary =" in line: + data[i] = 'rice-primary = ' + compliments[1] + '\n' + if "rice-secondary =" in line: + data[i] = 'rice-secondary = ' + compliments[2] + '\n' + if "rice-disabled =" in line: + data[i] = 'rice-disabled = ' + colors[2] + '\n' with open(config_path, 'w') as file: file.writelines(data) |
