From b956fdd8cd5a4dc0620d02d0f981e507a4ee85e5 Mon Sep 17 00:00:00 2001 From: Chandler J Date: Fri, 1 Mar 2024 21:33:53 -0700 Subject: instant rice now reads from a configuration file! --- src/update_i3.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/update_i3.py') 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) -- cgit v1.2.3