Formatted logs

This commit is contained in:
Vladyslav Hroshev
2025-04-01 21:16:28 +03:00
parent e46181e19d
commit 627e5b16ce
8 changed files with 133 additions and 81 deletions
+10 -3
View File
@@ -3,6 +3,7 @@ import os
from scripts import config
from scripts.gdm import GlobalTheme
from scripts.install.theme_installer import ThemeInstaller
from scripts.utils.console import Console, Color, Format
class GlobalThemeInstaller(ThemeInstaller):
@@ -27,6 +28,12 @@ class GlobalThemeInstaller(ThemeInstaller):
self._apply_tweaks(theme.theme)
def _after_install(self):
print("\nGDM theme installed successfully.")
print("You need to restart gdm.service to apply changes.")
print("Run \"systemctl restart gdm.service\" to restart GDM.")
print()
Console.Line().update(
Console.format("GDM theme installed successfully.", color=Color.GREEN, format_type=Format.BOLD),
icon="🥳"
)
Console.Line().update("You need to restart GDM to apply changes.", icon="")
formatted_command = Console.format("systemctl restart gdm.service", color=Color.YELLOW, format_type=Format.BOLD)
Console.Line().update(f"Run {formatted_command} to restart GDM.", icon="🔄")
+4 -1
View File
@@ -4,6 +4,7 @@ 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.console import Console, Color, Format
class LocalThemeInstaller(ThemeInstaller):
@@ -26,4 +27,6 @@ class LocalThemeInstaller(ThemeInstaller):
self._apply_tweaks(self.theme)
def _after_install(self):
print("\nTheme installed successfully.")
print()
formatted_output = Console.format("Theme installed successfully.", color=Color.GREEN, format_type=Format.BOLD)
Console.Line().update(formatted_output, icon="🥳")