summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/theme.rasi18
-rw-r--r--src/initialize_rofi.py17
-rw-r--r--src/update_rofi.py18
3 files changed, 29 insertions, 24 deletions
diff --git a/data/theme.rasi b/data/theme.rasi
index 7e14b1c..d7437af 100644
--- a/data/theme.rasi
+++ b/data/theme.rasi
@@ -1,15 +1,13 @@
-{
- rice-background: rgba(1, 19, 41, 100%);
- rice-foreground: rgba(1, 19, 41, 100%);
- rice-lightfg: rgba(1, 19, 41, 100%);
- rice-lightbg: rgba(1, 19, 41, 100%);
+* {
+ rice-background: rgba(112, 80, 55, 70%);
+ rice-foreground: rgba(143, 175, 200, 100%);
+ rice-lightfg: rgba(152, 152, 150, 100%);
+ rice-lightbg: rgba(211, 191, 165, 100%);
red: rgba ( 220, 50, 47, 100 % );
selected-active-foreground: var(rice-background);
- lightfg: rgba(1, 19, 41, 100%);
separatorcolor: var(rice-foreground);
urgent-foreground: var(red);
- alternate-urgent-background: var(lightbg);
- lightbg: rgba(1, 19, 41, 100%);
+ alternate-urgent-background: var(rice-lightbg);
background-color: transparent;
border-color: var(rice-foreground);
normal-background: var(rice-background);
@@ -21,12 +19,10 @@
urgent-background: var(rice-background);
selected-normal-foreground: var(rice-lightbg);
active-foreground: var(red);
- background: rgba(1, 51, 86, 70%);
selected-active-background: var(blue);
active-background: var(rice-background);
selected-normal-background: var(rice-background);
alternate-normal-background: var(rice-background);
- foreground: rgba(254, 204, 169, 100%);
selected-urgent-foreground: var(rice-background);
normal-foreground: var(rice-foreground);
alternate-urgent-foreground: var(red);
@@ -104,7 +100,7 @@ message {
border: 2px dash 0px 0px ;
}
textbox {
- text-color: var(foreground);
+ text-color: var(rice-foreground);
}
listview {
padding: 2px 0px 0px ;
diff --git a/src/initialize_rofi.py b/src/initialize_rofi.py
index 972fad5..621e665 100644
--- a/src/initialize_rofi.py
+++ b/src/initialize_rofi.py
@@ -7,14 +7,23 @@ def initializeRofi() -> None:
"""
print('[bold red]Initializing Rofi Theme')
- uname = os.getlogin()
-
-
+ uname: str = os.getlogin()
# copy the default config from data to .config
-
+ configPath = f'/home/{uname}/.config/rofi/'
+ dirExists = os.path.isdir(configPath)
+ if dirExists:
+ print('path exists')
+ if os.path.exists(f'{configPath}config.rasi'):
+ print('config present')
+ else:
+ # create the rasi config
+ pass
+ 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)
initializeRofi()
diff --git a/src/update_rofi.py b/src/update_rofi.py
index fb2100c..3232397 100644
--- a/src/update_rofi.py
+++ b/src/update_rofi.py
@@ -9,16 +9,16 @@ def updateRofiTheme(config_path: str, colors: list, compliments: list) -> None:
bg = color_engine.hexToRGB(colors[1])
fg = color_engine.hexToRGB(compliments[1])
lbg = color_engine.hexToRGB(colors[0])
- lfg = color_engine.hexToRGB(colors[0])
+ lfg = color_engine.hexToRGB(colors[2])
for i,line in enumerate(data):
- if 'background: ' in line and i == 23:
- data[i] = ' background: rgba({}, {}, {}, 70%);\n'.format(bg[0], bg[1], bg[2])
- if 'foreground: ' in line and i == 28:
- data[i] = ' foreground: rgba({}, {}, {}, 100%);\n'.format(fg[0], fg[1], fg[2])
- if 'lightbg: ' in line and i == 11:
- data[i] = ' lightbg: rgba({}, {}, {}, 100%);\n'.format(lbg[0], lbg[1], lbg[2])
- if 'lightfg: ' in line and i == 7:
- data[i] = ' lightfg: rgba({}, {}, {}, 100%);\n'.format(lfg[0], lfg[1], lfg[2])
+ if 'rice-background: ' in line:
+ data[i] = ' rice-background: rgba({}, {}, {}, 70%);\n'.format(bg[0], bg[1], bg[2])
+ if 'rice-foreground: ' in line:
+ data[i] = ' rice-foreground: rgba({}, {}, {}, 100%);\n'.format(fg[0], fg[1], fg[2])
+ if 'rice-lightbg: ' in line:
+ data[i] = ' rice-lightbg: rgba({}, {}, {}, 100%);\n'.format(lbg[0], lbg[1], lbg[2])
+ if 'rice-lightfg: ' in line:
+ data[i] = ' rice-lightfg: rgba({}, {}, {}, 100%);\n'.format(lfg[0], lfg[1], lfg[2])
with open(config_path, 'w') as file:
file.writelines(data)