From 16a6ba5c634eefb832a4bfcf5c0d2f2742c667b1 Mon Sep 17 00:00:00 2001 From: benadha Date: Sat, 8 Jan 2022 12:13:46 +0700 Subject: Added default color config --- epy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epy.py b/epy.py index 0df16e8..36d8760 100755 --- a/epy.py +++ b/epy.py @@ -403,6 +403,8 @@ class Settings: MouseSupport: bool = False StartWithDoubleSpread: bool = False # -1 is default terminal fg/bg colors + DefaultColorFG: int = -1 + DefaultColorBG: int = -1 DarkColorFG: int = 252 DarkColorBG: int = 235 LightColorFG: int = 238 @@ -2166,9 +2168,10 @@ class Reader: self.is_color_supported: bool = False try: curses.use_default_colors() - curses.init_pair(1, -1, -1) + curses.init_pair(1, self.setting.DefaultColorFG, self.setting.DefaultColorBG) curses.init_pair(2, self.setting.DarkColorFG, self.setting.DarkColorBG) curses.init_pair(3, self.setting.LightColorFG, self.setting.LightColorBG) + self.screen.bkgd(curses.color_pair(1)) self.is_color_supported = True except: self.is_color_supported = False -- cgit