summaryrefslogtreecommitdiff
path: root/src/user_interface.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/user_interface.py')
-rw-r--r--src/user_interface.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/user_interface.py b/src/user_interface.py
index 934098c..f55c588 100644
--- a/src/user_interface.py
+++ b/src/user_interface.py
@@ -1,17 +1,20 @@
import os
import random
import color_engine
+import manage_saves
from rich import print
def colorPickerUI(img_path: str, num_palettes: int) -> tuple:
-#display the selected color scheme and ask user if they like it or want to generate a new color scheme
+ """
+ display the selected color scheme and ask user if they like it
+ or want to generate a new color scheme
+ """
hex_colors, hex_compliments = selectPalette(img_path, num_palettes)
final_colors, final_compliments = selectColorsFromPalette(hex_colors, hex_compliments)
return final_colors, final_compliments
def selectPalette(img_path: str, num_palettes: int) -> tuple:
- #
confirmed = False
while not confirmed:
print()
@@ -86,3 +89,15 @@ def pickRandomWallpaper(walls_dir) -> str:
confirmed = True
return wallpaper
+
+def saveThemePrompt(hex_colors, hex_compliments, wallpaper_location, theme_location):
+ print('[bold green]Save configuration as preset? (y/n)')
+ do_save = input('>')
+ if do_save == 'y':
+ print('[bold green]enter theme name')
+ theme_name = input('>')
+ theme_path = theme_location + theme_name + ".theme"
+
+ manage_saves.save_theme(hex_colors, hex_compliments, wallpaper_location, theme_path)
+ print(f'[bold green]Theme {theme_name} saved!')
+