summaryrefslogtreecommitdiff
path: root/src/update_i3.py
diff options
context:
space:
mode:
authorChandler J <cjustice2000@gmail.com>2024-03-01 21:33:53 -0700
committerChandler J <cjustice2000@gmail.com>2024-03-01 21:33:53 -0700
commitb956fdd8cd5a4dc0620d02d0f981e507a4ee85e5 (patch)
tree8911f2dd2253f5f8223513ac454b508eb7dafbf8 /src/update_i3.py
parentc6062afafacf10e5f4b8bbca03a954966fa58287 (diff)
instant rice now reads from a configuration file!
Diffstat (limited to 'src/update_i3.py')
-rw-r--r--src/update_i3.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/update_i3.py b/src/update_i3.py
index 55509c9..eecc34f 100644
--- a/src/update_i3.py
+++ b/src/update_i3.py
@@ -3,9 +3,16 @@ import cv2 as cv
import os
from rich import print
-from paths import Paths
-def updatei3Theme(config_path: str, img_path: str, colors: list, compliments: list, lock: bool, dmenu: bool) -> None:
+def updatei3Theme(
+ config_path: str,
+ img_path: str,
+ colors: list,
+ compliments: list,
+ lock: bool,
+ dmenu: bool,
+ lock_image_path: str,
+ ) -> None:
print('[bold red]Updating i3 color scheme')
data = ''
with open(config_path, 'r') as file:
@@ -41,7 +48,7 @@ def updatei3Theme(config_path: str, img_path: str, colors: list, compliments: li
dim = (int(imgWidth * lock_scale), int(imgHeight * lock_scale))
img = cv.resize(img, dim, interpolation= cv.INTER_AREA)
cv.imwrite('lock.png', img)
- os.rename('lock.png', Paths['lockscreen'] + 'lock.png')
+ os.rename('lock.png', lock_image_path)
with open(config_path, 'w') as file:
file.writelines(data)