Пример #1
0
def colorSelector():
    ifSettingsNotExists()
    for arg in sys.argv:
        if arg in ['--theme']:
            for arg in sys.argv:
                if arg in [
                        'anaglyph', '3danaglyph', '3Danaglyph', '3DAnaglyph'
                ]:
                    color = [
                        '\033[91m', '\033[46m', '\033[36m', '\033[32m',
                        '\033[0m'
                    ]  # LightRed, BackgroundCyan, Cyan, Green, ResetAll
                    if arg in ['--default']:
                        config.set("Defaults", "theme", "anaglyph")
                    return color
                if arg in ['ocean', 'breeze', 'blue']:
                    color = [
                        '\033[36m', '\033[46m', '\033[34m', '\033[30m',
                        '\033[0m'
                    ]  # Cyan, BackgroundCyan, BrightBlue, DarkGray, ResetAll
                    if arg in ['--default']:
                        config.set("Defaults", "theme", "ocean")
                    return color
    if config.get("Defaults", "theme") == "anaglyph":
        color = ['\033[91m', '\033[46m', '\033[36m', '\033[32m',
                 '\033[0m']  # LightRed, BackgroundCyan, Cyan, Green, ResetAll
        return color
    elif config.get("Defaults", "theme") == "ocean":
        color = ['\033[36m', '\033[46m', '\033[34m', '\033[30m', '\033[0m'
                 ]  # Cyan, BackgroundCyan, BrightBlue, DarkGray, ResetAll
        return color
Пример #2
0
import base64
from os import system, path
from distutils.dir_util import copy_tree
from time import sleep
import re
import json
from urllib.request import urlopen
from subprocess import check_output, CalledProcessError
from sys import stdout, argv, exit
from Defs.ThemesManager import colorSelector
from Defs.Configurations import readConfig, ifSettingsNotExists
from Defs.Languages import *

installGetText()
languageSelector()
ifSettingsNotExists()
config = readConfig()

logFile = None
didBackground = config.get("Settings", "DidBackground")
for arg in argv:
    if arg == "--nolog":  # If true - don't log
        didBackground = False
if config.get("Settings", "DidBackground") == "True":
    logFile = open("log.txt", "w")

colorTheme = colorSelector()
MAIN0, MAIN1, MAIN2, MAIN3, MAIN4 = colorTheme[0], colorTheme[1], colorTheme[
    2], colorTheme[3], colorTheme[4]