From 2eaf90df29b101a55be46099417faadf86bd3eb6 Mon Sep 17 00:00:00 2001 From: chqn Date: Thu, 14 Dec 2023 20:13:24 -0700 Subject: more sensible way of organizing things --- src/get_args.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/get_args.py') diff --git a/src/get_args.py b/src/get_args.py index 0001abb..c4e8ade 100644 --- a/src/get_args.py +++ b/src/get_args.py @@ -1,10 +1,17 @@ import user_interface def get_args(args): - if len(args) != 2: - pass - elif '-r' in args: + + dmenu = False + nolock = False + + if '-r' in args: img_path = user_interface.pickRandomWallpaper() else: img_path = args[1] - return img_path + + if '-dmenu' in args: + dmenu = True + if '--nolock' in args: + nolock = True + return img_path, dmenu, nolock -- cgit v1.2.3