Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if args.backend in pywal.colors.list_backends():
settings['backend'] = args.backend
else:
logging.error("no such backend, please "
"choose a valid backend")
exit(1)
if args.preview:
pywal.colors.palette()
exit(0)
if args.m:
file_list = files.get_file_list()
if len(file_list) > 0:
filename = random.choice(file_list)
themer.set_theme(filename, filename, args.r)
exit(0)
else:
logging.error("you have no themes")
exit(1)
if args.s:
if len(args.s) == 1:
themer.set_theme(args.s[0], args.s[0], args.r)
elif len(args.s) == 2:
themer.set_theme(args.s[0], args.s[1], args.r)
exit(0)
if args.l:
if args.t:
templates = files.get_file_list(OPT_DIR, False)
any(print(t) for t in templates if ".base" in t)
if args.m:
file_list = files.get_file_list()
if len(file_list) > 0:
filename = random.choice(file_list)
themer.set_theme(filename, filename, args.r)
exit(0)
else:
logging.error("you have no themes")
exit(1)
if args.s:
if len(args.s) == 1:
themer.set_theme(args.s[0], args.s[0], args.r)
elif len(args.s) == 2:
themer.set_theme(args.s[0], args.s[1], args.r)
exit(0)
if args.l:
if args.t:
templates = files.get_file_list(OPT_DIR, False)
any(print(t) for t in templates if ".base" in t)
else:
print("\n".join(files.get_file_list()))
exit(0)
if args.version:
print("current version: " + __version__)
exit(0)
if args.d:
delete_action = files.delete_template if args.t \
pywal.colors.palette()
exit(0)
if args.m:
file_list = files.get_file_list()
if len(file_list) > 0:
filename = random.choice(file_list)
themer.set_theme(filename, filename, args.r)
exit(0)
else:
logging.error("you have no themes")
exit(1)
if args.s:
if len(args.s) == 1:
themer.set_theme(args.s[0], args.s[0], args.r)
elif len(args.s) == 2:
themer.set_theme(args.s[0], args.s[1], args.r)
exit(0)
if args.l:
if args.t:
templates = files.get_file_list(OPT_DIR, False)
any(print(t) for t in templates if ".base" in t)
else:
print("\n".join(files.get_file_list()))
exit(0)
if args.version:
print("current version: " + __version__)
exit(0)
def on_set_clicked(self, widget):
x = self.option_combo.get_active()
y = self.colorscheme.get_active()
current_walls = files.get_file_list()
if current_walls:
filename = current_walls[x]
colorscheme_file = current_walls[y]
themer.set_theme(filename, colorscheme_file)