summaryrefslogtreecommitdiff
path: root/src/get_args.py
diff options
context:
space:
mode:
authorChandler J <cjustice2000@gmail.com>2024-04-13 09:21:54 -0600
committerChandler J <cjustice2000@gmail.com>2024-04-13 09:21:54 -0600
commitd1f74e783cd9af20a81e86783e0b7fe23371e208 (patch)
tree8d72edcb63782689b72f7b085d3ae671eca0845a /src/get_args.py
parentf594dc71a727100075164a2a21da11dc550cc514 (diff)
added ability to load preset themes using -t
Diffstat (limited to 'src/get_args.py')
-rw-r--r--src/get_args.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/get_args.py b/src/get_args.py
index f878e77..9197995 100644
--- a/src/get_args.py
+++ b/src/get_args.py
@@ -4,25 +4,25 @@ import os
from rich import print
-def get_args(args, walls_dir) -> tuple:
+def get_args(args, walls_dir, theme_dir) -> tuple:
# arguments that can be passed into program
VALID_ARGS = ['-r', '-p', '--initialize', '--reconfigure']
initialize = False
reconfigure = False
-
theme = None
- VALID_ARGS = ['-r', '-p', '--initialize', '--reconfigure']
-
+ img_path = ''
if '-p' in args:
index = args.index('-p')
isFile = os.path.isfile(args[index + 1])
if isFile == True:
print("reached")
theme = manage_saves.load_theme(args[index + 1])
-
- if '-r' in args:
+ elif '-t' in args:
+ theme = user_interface.themeSelector(theme_dir)
+ img_path = theme['wallpaper']
+ elif '-r' in args:
img_path = user_interface.pickRandomWallpaper(walls_dir)
else:
img_path = f"{os.getcwd()}/{args[1]}"