Files
Marble-shell-theme/scripts/install/local_theme_installer.py
Vladyslav Hroshev 9bb229df7d Completely refactored gresource to correspond SOLID principles
- Create logger interface and updated its usage by console.py
2025-04-06 17:02:49 +03:00

32 lines
1.1 KiB
Python

import os.path
from scripts import config
from scripts.install.theme_installer import ThemeInstaller
from scripts.theme import Theme
from scripts.utils import remove_files
from scripts.utils.logger.console import Console, Color, Format
class LocalThemeInstaller(ThemeInstaller):
theme: Theme
def remove(self):
colors = self.colors.colors
remove_files(self.args, colors)
def _define_theme(self):
theme_folder = os.path.join(config.raw_theme_folder, config.gnome_folder)
self.theme = Theme("gnome-shell", self.colors, theme_folder,
config.themes_folder, config.temp_folder,
mode=self.args.mode, is_filled=self.args.filled)
def _install_theme(self, hue, theme_name, sat):
self.theme.install(hue, theme_name, sat)
def _apply_tweaks_to_theme(self):
self._apply_tweaks(self.theme)
def _after_install(self):
print()
formatted_output = Console.format("Theme installed successfully.", color=Color.GREEN, format_type=Format.BOLD)
Console.Line().update(formatted_output, icon="🥳")