summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler J <cjustice2000@gmail.com>2024-01-26 23:42:16 -0700
committerChandler J <cjustice2000@gmail.com>2024-01-26 23:42:16 -0700
commit1be4c39b4367004cd44a5cfe1f64308f39e91a48 (patch)
treef12a1989a863982778ae33f9a7b09154abee82b8
parent007e7076c7404c86180ff3aa6ea3fe15024a87c3 (diff)
began adding rofi initializer
-rw-r--r--data/theme.rasi180
-rw-r--r--src/initialize_rofi.py20
-rw-r--r--src/paths.py3
-rw-r--r--src/update_polybar.py2
-rw-r--r--src/update_rofi.py6
5 files changed, 207 insertions, 4 deletions
diff --git a/data/theme.rasi b/data/theme.rasi
new file mode 100644
index 0000000..7e14b1c
--- /dev/null
+++ b/data/theme.rasi
@@ -0,0 +1,180 @@
+{
+ 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%);
+ 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%);
+ background-color: transparent;
+ border-color: var(rice-foreground);
+ normal-background: var(rice-background);
+ selected-urgent-background: var(red);
+ alternate-active-background: var(rice-lightbg);
+ spacing: 2;
+ blue: rgba ( 114, 137, 204, 100 % );
+ alternate-normal-foreground: var(rice-foreground);
+ 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);
+ alternate-active-foreground: var(red);
+
+}
+element {
+ padding: 1px ;
+ cursor: pointer;
+ spacing: 5px ;
+ border: 0;
+}
+element normal.normal {
+ background-color: var(normal-background);
+ text-color: var(normal-foreground);
+}
+element normal.urgent {
+ background-color: var(urgent-background);
+ text-color: var(urgent-foreground);
+}
+element normal.active {
+ background-color: var(active-background);
+ text-color: var(active-foreground);
+}
+element selected.normal {
+ background-color: var(selected-normal-background);
+ text-color: var(selected-normal-foreground);
+}
+element selected.urgent {
+ background-color: var(selected-urgent-background);
+ text-color: var(selected-urgent-foreground);
+}
+element selected.active {
+ background-color: var(selected-active-background);
+ text-color: var(selected-active-foreground);
+}
+element alternate.normal {
+ background-color: var(alternate-normal-background);
+ text-color: var(alternate-normal-foreground);
+}
+element alternate.urgent {
+ background-color: var(alternate-urgent-background);
+ text-color: var(alternate-urgent-foreground);
+}
+element alternate.active {
+ background-color: var(alternate-active-background);
+ text-color: var(alternate-active-foreground);
+}
+element-text {
+
+ font: "Source Code Pro 10";
+ background-color: transparent;
+ cursor: inherit;
+ highlight: inherit;
+ text-color: inherit;
+}
+element-icon {
+ background-color: transparent;
+ size: 1.0000em ;
+ cursor: inherit;
+ text-color: inherit;
+}
+window {
+ padding: 5;
+ background-color: var(rice-background);
+ border: 1;
+}
+mainbox {
+ padding: 0;
+ border: 0;
+}
+message {
+ padding: 1px ;
+ border-color: var(separatorcolor);
+ border: 2px dash 0px 0px ;
+}
+textbox {
+ text-color: var(foreground);
+}
+listview {
+ padding: 2px 0px 0px ;
+ scrollbar: true;
+ border-color: var(separatorcolor);
+ spacing: 2px ;
+ fixed-height: 0;
+ border: 2px dash 0px 0px ;
+}
+scrollbar {
+ width: 4px ;
+ padding: 0;
+ handle-width: 8px ;
+ border: 0;
+ handle-color: var(normal-foreground);
+}
+sidebar {
+ border-color: var(separatorcolor);
+ border: 2px dash 0px 0px ;
+}
+button {
+ cursor: pointer;
+ spacing: 0;
+ text-color: var(normal-foreground);
+}
+button selected {
+ background-color: var(selected-normal-background);
+ text-color: var(selected-normal-foreground);
+}
+num-filtered-rows {
+ expand: false;
+ text-color: Gray;
+}
+num-rows {
+ expand: false;
+ text-color: Gray;
+}
+textbox-num-sep {
+ expand: false;
+ str: "/";
+ text-color: Gray;
+}
+inputbar {
+ font: "Source Code Pro 10";
+ padding: 1px ;
+ spacing: 0px ;
+ text-color: var(normal-foreground);
+ children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
+}
+case-indicator {
+ spacing: 0;
+ text-color: var(normal-foreground);
+}
+entry {
+ font: "Source Code Pro 10";
+ text-color: var(normal-foreground);
+ cursor: text;
+ spacing: 0;
+ placeholder-color: Gray;
+ placeholder: "Type to filter";
+}
+prompt {
+ font: "Source Code Pro 10";
+ spacing: 0;
+ text-color: var(normal-foreground);
+}
+textbox-prompt-colon {
+ font: "Source Code Pro 10";
+ margin: 0px 0.3000em 0.0000em 0.0000em ;
+ expand: false;
+ str: ":";
+ text-color: inherit;
+}
diff --git a/src/initialize_rofi.py b/src/initialize_rofi.py
new file mode 100644
index 0000000..972fad5
--- /dev/null
+++ b/src/initialize_rofi.py
@@ -0,0 +1,20 @@
+from rich import print
+import os
+def initializeRofi() -> None:
+ """
+ Create a Rofi theme if one is not present with desired defaults to work with InstantRice.
+ Will pull source file from data dir
+ """
+ print('[bold red]Initializing Rofi Theme')
+
+ uname = os.getlogin()
+
+
+ # copy the default config from data to .config
+
+ # 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)
+
+initializeRofi()
diff --git a/src/paths.py b/src/paths.py
index 7ad287b..db3d0ce 100644
--- a/src/paths.py
+++ b/src/paths.py
@@ -2,5 +2,6 @@ Paths = {
'i3': '/home/chandler/.config/i3/config',
'polybar': '/home/chandler/.config/polybar/config.ini',
'wallpapers': '/home/chandler/Pictures/papes/',
- 'lockscreen': '/home/chandler/.config/i3/'
+ 'lockscreen': '/home/chandler/.config/i3/',
+ 'rofi': '/home/chandler/.config/rofi/activetheme.rasi'
}
diff --git a/src/update_polybar.py b/src/update_polybar.py
index 2c1a3e0..97be44a 100644
--- a/src/update_polybar.py
+++ b/src/update_polybar.py
@@ -1,4 +1,4 @@
-
+from rich import print
def updatePolybarTheme(config_path: str, colors: list, compliments: list) -> None:
print('[bold red]Updating polybar color scheme')
diff --git a/src/update_rofi.py b/src/update_rofi.py
index 88e3289..fb2100c 100644
--- a/src/update_rofi.py
+++ b/src/update_rofi.py
@@ -1,4 +1,5 @@
import color_engine
+from rich import print
def updateRofiTheme(config_path: str, colors: list, compliments: list) -> None:
print('[bold red]Updating Rofi color scheme')
@@ -14,10 +15,11 @@ def updateRofiTheme(config_path: str, colors: list, compliments: list) -> None:
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 == 12:
- data[i] = ' lightbg: rgba({}, {}, {}, 100%);\n'.format(lbg[0], lbg[1], lgb[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])
with open(config_path, 'w') as file:
file.writelines(data)
+