diff options
Diffstat (limited to 'src/initialize_rofi.py')
| -rw-r--r-- | src/initialize_rofi.py | 21 |
1 files changed, 11 insertions, 10 deletions
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() |
