]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/display.py
Implement color customization config option
[lightcards.git] / lightcards / display.py
index f03620c60fee7632f5fcf69aaa1b43f17113223f..8e19d3c49f57fd9c7ed69dd5ab21ff39475de03f 100644 (file)
@@ -244,9 +244,9 @@ class Display:
         self.win = stdscr
         curses.curs_set(0)  # Hide cursor
         curses.use_default_colors()  # Allow transparency
-        curses.init_pair(1, curses.COLOR_CYAN, -1)
-        curses.init_pair(2, curses.COLOR_RED, -1)
-        curses.init_pair(3, curses.COLOR_YELLOW, -1)
+        curses.init_pair(1, self.config["highlight_color"], -1)
+        curses.init_pair(2, self.config["error_color"], -1)
+        curses.init_pair(3, self.config["starred_color"], -1)
 
         self.main_panel = curses.panel.new_panel(self.win)
         self.menu_obj = Menu(self)
@@ -351,10 +351,11 @@ class Display:
                 - 1
             )
         ):
-            # TODO: Use the variying width unicode block characters to make a
-            # super accurate bar
             self.win.addch(
-                height + 1, i + len(progress), "ยป", curses.color_pair(1)
+                height + 1,
+                i + len(progress),
+                self.config["progress_char"],
+                curses.color_pair(1),
             )
 
     def wrap_width(self):