From e89bf06d9ac530c60d0a1b470bcde2d055e5b0e6 Mon Sep 17 00:00:00 2001 From: Cuan Date: Mon, 18 Apr 2022 22:54:33 -0400 Subject: [PATCH] Made entry list monochrome --- bin/sshyp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/sshyp b/bin/sshyp index 76559dd..400fa7d 100755 --- a/bin/sshyp +++ b/bin/sshyp @@ -20,10 +20,10 @@ def entry_list_gen(): # generates and prints a list of all folders and entries for _entry in sorted(listdir(path.expanduser('~/.password-pasture'))): if Path(path.expanduser(f"~/.password-pasture/{_entry}")).is_file(): if _color_alternator == 1: - _entry_list.append(f"\u001b[38;5;195m{_entry.replace('.gpg', '')}\u001b[0m") + _entry_list.append(f"\u001b[38;5;255m{_entry.replace('.gpg', '')}\u001b[0m") _color_alternator = 2 else: - _entry_list.append(f"\u001b[38;5;123m{_entry.replace('.gpg', '')}\u001b[0m") + _entry_list.append(f"\u001b[38;5;248m{_entry.replace('.gpg', '')}\u001b[0m") _color_alternator = 1 _real = len(' '.join(_entry_list)) - (15 * len(_entry_list)) if _real <= get_terminal_size()[0]: @@ -37,15 +37,15 @@ def entry_list_gen(): # generates and prints a list of all folders and entries for _root, _directories, _files in walk(path.expanduser('~/.password-pasture')): for _dir in sorted(_directories): _inner_dir = f"{_root.replace(path.expanduser('~/.password-pasture'), '')}/{_dir}" - print(f"\u001b[38;5;228m{_inner_dir}/\u001b[0m") + print(f"\n\u001b[38;5;15;48;5;232m{_inner_dir}/\u001b[0m") _entry_list, _color_alternator = [], 1 for _s_root, _s_directories, _s_files in walk(path.expanduser(f"~/.password-pasture{_inner_dir}")): for _entry in sorted(_s_files): if _color_alternator == 1: - _entry_list.append(f"\u001b[38;5;195m{_entry.replace('.gpg', '')}\u001b[0m") + _entry_list.append(f"\u001b[38;5;255m{_entry.replace('.gpg', '')}\u001b[0m") _color_alternator = 2 else: - _entry_list.append(f"\u001b[38;5;123m{_entry.replace('.gpg', '')}\u001b[0m") + _entry_list.append(f"\u001b[38;5;248m{_entry.replace('.gpg', '')}\u001b[0m") _color_alternator = 1 _real = len(' '.join(_entry_list)) - (15 * len(_entry_list)) if _real <= get_terminal_size()[0]: