diff options
| author | Chandler Justice <chandler@cock.li> | 2023-12-09 00:31:22 -0700 |
|---|---|---|
| committer | Chandler Justice <chandler@cock.li> | 2023-12-09 00:31:22 -0700 |
| commit | 7382992e00b104232454dfd3ef5f355fa3cb4095 (patch) | |
| tree | e271a76cbf0e80151cd9bca14695b5ad52d71502 /src/instant_rice.py | |
| parent | 8269c373599e34b0fe4ffd1542420286dded0739 (diff) | |
refactor complete
Diffstat (limited to 'src/instant_rice.py')
| -rw-r--r-- | src/instant_rice.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/instant_rice.py b/src/instant_rice.py new file mode 100644 index 0000000..87c9968 --- /dev/null +++ b/src/instant_rice.py @@ -0,0 +1,30 @@ +import sys +import color_engine +import user_interface +import update_rofi +import update_i3 +import update_polybar +from paths import Paths + +def main(): + if '-r' in sys.argv: + img_path = user_interface.pickRandomWallpaper() + else: + img_path = sys.argv[1] + + 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_dmenu = True if ('-dmenu' in sys.argv) else False + if '--nolock' in sys.argv: + update_i3.updatei3Theme(Paths['i3'], img_path, hex_colors, hex_compliments, False, update_dmenu) + else: + update_i3.updatei3Theme(Paths['i3'], img_path, hex_colors, hex_compliments, True, update_dmenu) + + + +if __name__ == '__main__': + main() |
