From f17bb8068950a8875f81b92463eccf866527bec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferit=20Yi=C4=9Fit=20BALABAN?= Date: Sun, 3 Apr 2022 01:40:21 +0300 Subject: [PATCH] Implement SETTINGS dictionary to allow runtime modifications --- dotman.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dotman.py b/dotman.py index 7e20ca6..1515719 100755 --- a/dotman.py +++ b/dotman.py @@ -9,9 +9,16 @@ from datetime import datetime as dt from termcolor import colored, cprint -DOTFILES_REPOSITORY = '$HOME/repos/dotfiles' -REMOTE_REPOSITORY = 'https://github.com/fybx/dotfiles' -LOCAL_CONFIG = '$HOME/.config' +# Modify SETTINGS dictionary to set runtime variables +# Access values in dictionary using pre-defined names +SETTINGS = { + 'DOTFILES_REPOSITORY': '$HOME/repos/dotfiles', + 'REMOTE_REPOSITORY': 'https://github.com/fybx/dotfiles', + 'LOCAL_CONFIG': '$HOME/.config' +} +DOTFILES_REPOSITORY = SETTINGS['DOTFILES_REPOSITORY'] +REMOTE_REPOSITORY = SETTINGS['REMOTE_REPOSITORY'] +LOCAL_CONFIG = SETTINGS['LOCAL_CONFIG'] VER = 'v1.6' help_message = f''' dotman {VER} dotfiles manager by fyb