aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorbenadha <benawiadha@gmail.com>2022-01-08 12:13:46 +0700
committerbenadha <benawiadha@gmail.com>2022-01-08 12:13:46 +0700
commit16a6ba5c634eefb832a4bfcf5c0d2f2742c667b1 (patch)
tree69b92f745914a98c05e6620f8d0f4220cd694c12 /epy.py
parent7b32115e763f73521875f6bc9a2c4784395ff8b3 (diff)
downloadepy-16a6ba5c634eefb832a4bfcf5c0d2f2742c667b1.tar.gz
Added default color configv2022.1.8
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py5
1 files changed, 4 insertions, 1 deletions
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