WIP
This commit is contained in:
parent
93aa9eeb21
commit
d3c4372144
@ -18,7 +18,7 @@ SETTINGS = {
|
|||||||
}
|
}
|
||||||
WHEREAMI = '$HOME/scripts'
|
WHEREAMI = '$HOME/scripts'
|
||||||
VER = 'v1.7'
|
VER = 'v1.7'
|
||||||
WER = 'v1'
|
WER = 'v1.1'
|
||||||
help_message = f'''
|
help_message = f'''
|
||||||
dotman {VER} dotfiles manager by fyb
|
dotman {VER} dotfiles manager by fyb
|
||||||
|
|
||||||
@ -60,6 +60,10 @@ def read_setup():
|
|||||||
SETTINGS[key] = value
|
SETTINGS[key] = value
|
||||||
|
|
||||||
|
|
||||||
|
def write_setup():
|
||||||
|
path = f'{WHEREAMI}setup.dtm' if SETTINGS['SETUP_FILE'] == 'same-directory' else os.path.expandvars(SETTINGS['SETUP_FILE'])
|
||||||
|
|
||||||
|
|
||||||
def rrem(text: str, char: str):
|
def rrem(text: str, char: str):
|
||||||
"""
|
"""
|
||||||
Remove characters from right until character supplied with char
|
Remove characters from right until character supplied with char
|
||||||
@ -246,6 +250,8 @@ def main():
|
|||||||
elif num.isnumeric() and 1 <= int(num) <= len(SETTINGS):
|
elif num.isnumeric() and 1 <= int(num) <= len(SETTINGS):
|
||||||
key = get_nth_key(int(num) - 1, SETTINGS)
|
key = get_nth_key(int(num) - 1, SETTINGS)
|
||||||
SETTINGS[key] = input(f'Enter new value for {key}: ').strip()
|
SETTINGS[key] = input(f'Enter new value for {key}: ').strip()
|
||||||
|
print('Saving changes to file')
|
||||||
|
write_setup()
|
||||||
|
|
||||||
elif flag_version:
|
elif flag_version:
|
||||||
print(f'dotman version: {VER.removeprefix("v")}')
|
print(f'dotman version: {VER.removeprefix("v")}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user