fix broken files after faulty update

This commit is contained in:
2025-01-14 08:51:58 +01:00
parent 598da9bfac
commit 997d618ff1
102 changed files with 2499 additions and 548 deletions

59
icons/config.py Normal file
View File

@@ -0,0 +1,59 @@
from omegaconf import OmegaConf, DictConfig
from typing import Optional
import os
import sys
class Icons:
_config: Optional[DictConfig] = None
def __init__(self):
self._config = OmegaConf.load("icons/icons.yaml")
self.config_path = "icons/config.yaml"
def save(self):
OmegaConf.save(self._config, self.config_path)
@property
def icons(self):
return self._config.icons
def get_icon(self, name: str):
return self.icons[name]
def set_icon(self, name: str, value: str):
self._config.icons[name] = value
@property
def path(self):
return self._config.icon_path
@property
def colors(self):
return self._config.colors
@colors.setter
def colors(self, value):
self._config.colors = value
@property
def dark(self):
return self._config.colors.dark
@property
def light(self):
return self._config.colors.light
@property
def warning(self):
return self._config.colors.warning
@property
def success(self):
return self._config.colors.success
def set_color(self, name: str, value: str):
self._config.colors[name] = value
@icons.setter
def icons(self, value):
self._config.icons = value