mirror of https://github.com/aristocratos/bpytop
Declare THEME as global before assignment in `main`
parent
00e2d6675b
commit
c6a3c4b3ec
|
@ -4368,8 +4368,10 @@ def process_keys():
|
||||||
|
|
||||||
CPU_NAME: str = get_cpu_name()
|
CPU_NAME: str = get_cpu_name()
|
||||||
|
|
||||||
|
THEME: Theme
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
global THEME
|
||||||
|
|
||||||
#? Init -------------------------------------------------------------------------------------->
|
#? Init -------------------------------------------------------------------------------------->
|
||||||
if DEBUG: TimeIt.start("Init")
|
if DEBUG: TimeIt.start("Init")
|
||||||
|
@ -4388,7 +4390,7 @@ def main():
|
||||||
if CONFIG.show_init:
|
if CONFIG.show_init:
|
||||||
Draw.buffer("+init!", f'{Mv.restore}{Fx.trans("Loading theme and creating colors... ")}{Mv.save}')
|
Draw.buffer("+init!", f'{Mv.restore}{Fx.trans("Loading theme and creating colors... ")}{Mv.save}')
|
||||||
try:
|
try:
|
||||||
THEME: Theme = Theme(CONFIG.color_theme)
|
THEME = Theme(CONFIG.color_theme)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Init.fail(e)
|
Init.fail(e)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue