[+] Dynamically set lightness based on light_dark
This commit is contained in:
parent
85eaad14f2
commit
887f766464
5 changed files with 67 additions and 28 deletions
|
|
@ -4,6 +4,8 @@ import os
|
|||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
CONFIG_PATH = Path.home() / '.config/hyfetch.json'
|
||||
VERSION = '1.0.7'
|
||||
|
||||
|
|
@ -37,5 +39,8 @@ class GlobalConfig:
|
|||
debug: bool
|
||||
is_light: bool
|
||||
|
||||
def light_dark(self) -> Literal['light', 'dark']:
|
||||
return 'light' if self.is_light else 'dark'
|
||||
|
||||
|
||||
GLOBAL_CFG = GlobalConfig(color_mode='8bit', override_distro=None, debug=False, is_light=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue