change-theme.py: optimize

This commit is contained in:
2025-08-01 19:37:59 +02:00
parent 2c260be205
commit 2c61963968

View File

@@ -251,7 +251,7 @@ def match_color(color: str) -> str:
def main(): def main():
arguments = sys.argv[1:] arguments = sys.argv[1:]
if len(arguments) < 1: if len(arguments) < 1 or arguments[0] in ('-h', '--help'):
print("Usage: change-colortheme.py <flavor|#rrggbb> [<app1> <app2> ...]") print("Usage: change-colortheme.py <flavor|#rrggbb> [<app1> <app2> ...]")
sys.exit(1) sys.exit(1)
@@ -287,6 +287,7 @@ def main():
os.system(f'notify-send "Color theme changed" "Catppuccin Mocha - {flavor}"') os.system(f'notify-send "Color theme changed" "Catppuccin Mocha - {flavor}"')
if not app or app == 'fastfetch':
ans = input("execute \"exec fish\"? [y/N]: ").strip().lower() ans = input("execute \"exec fish\"? [y/N]: ").strip().lower()
if ans in ('y', 'yes'): if ans in ('y', 'yes'):
os.system('fish') os.system('fish')