From 09185e5a41c5917ac1140df78bb884615bfd0650 Mon Sep 17 00:00:00 2001 From: "Azalea (on HyDEV-Daisy)" Date: Wed, 19 Oct 2022 23:48:41 -0400 Subject: [PATCH] [F] Fix light dark detection --- hyfetch/neofetch_util.py | 1 + hyfetch/presets.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hyfetch/neofetch_util.py b/hyfetch/neofetch_util.py index c7292027..9002bdab 100644 --- a/hyfetch/neofetch_util.py +++ b/hyfetch/neofetch_util.py @@ -298,5 +298,6 @@ def get_fore_back(distro: str | None = None) -> tuple[int, int] | None: fore_back = { 'fedora': (2, 1), 'ubuntu': (2, 1), + 'kubuntu': (2, 1), } diff --git a/hyfetch/presets.py b/hyfetch/presets.py index c668b165..a7973f9b 100644 --- a/hyfetch/presets.py +++ b/hyfetch/presets.py @@ -112,7 +112,7 @@ class ColorProfile: """ return ColorProfile([c.set_light(light, at_least, at_most) for c in self.colors]) - def set_light_dl(self, light: float, term: LightDark = GLOBAL_CFG.light_dark()): + def set_light_dl(self, light: float, term: LightDark | None = None): """ Set HSL lightness value with respect to dark/light terminals @@ -120,6 +120,7 @@ class ColorProfile: :param term: Terminal color (can be "dark" or "light") :return: New color profile (original isn't modified) """ + term = term or GLOBAL_CFG.light_dark() assert term.lower() in ['light', 'dark'] at_least, at_most = (True, None) if term.lower() == 'dark' else (None, True) return self.set_light_raw(light, at_least, at_most)