From 21e53dd011a20dd237abfbe093bbb465fda1c11d Mon Sep 17 00:00:00 2001 From: Chandler J Date: Sun, 28 Jan 2024 14:45:48 -0700 Subject: working on tui --- src/initialize_rofi.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/initialize_rofi.py') diff --git a/src/initialize_rofi.py b/src/initialize_rofi.py index 69c8637..8b8efdd 100644 --- a/src/initialize_rofi.py +++ b/src/initialize_rofi.py @@ -6,14 +6,11 @@ configPath = f'/home/{uname}/.config/rofi/' def reconfigureRofi() -> None: """ - Create a Rofi theme if one is not present with desired defaults to work with InstantRice. - Will pull source file from data dir + Create a Rofi configuration file if one is not present with desired defaults to work with InstantRice. """ print('[bold red]Initializing Rofi Theme') - # copy the default config from data to .config - dirExists = os.path.isdir(configPath) - if dirExists: + def changeConfigContents() -> None: print('path exists') if os.path.exists(f'{configPath}config.rasi'): print('config present') @@ -33,15 +30,19 @@ def reconfigureRofi() -> None: file = open(rf'{configPath}config.rasi', 'w') file.write('@theme "theme.rasi"') file.close() + + # copy the default config from data to .config + dirExists = os.path.isdir(configPath) + if dirExists: + changeConfigContents() else: print('path doesnt exist') - # add line to rofi config - # (this means we need might need to make the rofi config file, and the rofi directory) - # (it also will be necessary to grab the current user's username to access their .config) - print(uname) - print(dirExists) + def dropRofiTheme(): + """ + Drop the config file from data/ directory and place it in the .config/rofi directory + """ with open('../data/theme.rasi', 'r') as file: data = file.readlines() -- cgit v1.2.3