summaryrefslogtreecommitdiff
path: root/src/initialize_rofi.py
diff options
context:
space:
mode:
authorChandler J <cjustice2000@gmail.com>2024-02-24 00:08:21 -0700
committerChandler J <cjustice2000@gmail.com>2024-02-24 00:08:21 -0700
commit4734634389cdbac0e0c9596a4c1737b4fb6c644d (patch)
treecf713a2d62c82beb12c7384173ed7b2d323c1467 /src/initialize_rofi.py
parente5171305479b4fe3fea8cdeff5cb8a2ed4e84967 (diff)
early stages of changing config plus license
Diffstat (limited to 'src/initialize_rofi.py')
-rw-r--r--src/initialize_rofi.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/initialize_rofi.py b/src/initialize_rofi.py
index 8b8efdd..cc3fd0a 100644
--- a/src/initialize_rofi.py
+++ b/src/initialize_rofi.py
@@ -27,16 +27,19 @@ def reconfigureRofi() -> None:
file.writelines(data)
else:
# create the rasi config
- file = open(rf'{configPath}config.rasi', 'w')
- file.write('@theme "theme.rasi"')
- file.close()
+ with open(rf'{configPath}config.rasi', 'w') as file:
+ file.write('@theme "theme.rasi"')
# copy the default config from data to .config
dirExists = os.path.isdir(configPath)
if dirExists:
changeConfigContents()
else:
- print('path doesnt exist')
+ # Drop the Rofi theme config in rofi
+ print(f'path doesnt exist. Creating directory {configPath}')
+ os.makedirs(configPath)
+ changeConfigContents()
+ dropRofiTheme()
def dropRofiTheme():
@@ -48,7 +51,3 @@ def dropRofiTheme():
with open(f'{configPath}theme.rasi', 'w') as file:
file.writelines(data)
-
-
-reconfigureRofi()
-dropRofiTheme()