|
|
@ -28,7 +28,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
# Standard Lib |
|
|
|
# Standard Lib |
|
|
|
import sys |
|
|
|
import sys |
|
|
|
import yaml |
|
|
|
import ruamel.yaml as yaml |
|
|
|
import pkg_resources |
|
|
|
import pkg_resources |
|
|
|
import os |
|
|
|
import os |
|
|
|
from typing import ( |
|
|
|
from typing import ( |
|
|
@ -85,21 +85,25 @@ def changeConfig(option: str, value): |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
def debugMode(value: bool): |
|
|
|
def debugMode(value: bool): |
|
|
|
|
|
|
|
window = {} |
|
|
|
|
|
|
|
greeter = {} |
|
|
|
if value: |
|
|
|
if value: |
|
|
|
custom_config["debug_mode"] = True |
|
|
|
greeter["debug_mode"] = True |
|
|
|
custom_config["decorated"] = True |
|
|
|
window["decorated"] = True |
|
|
|
custom_config["stays_on_top"] = False |
|
|
|
window["stays_on_top"] = False |
|
|
|
|
|
|
|
window["initial_state"] = "normal" |
|
|
|
else: |
|
|
|
else: |
|
|
|
custom_config["debug_mode"] = False |
|
|
|
greeter["debug_mode"] = False |
|
|
|
custom_config["decorated"] = False |
|
|
|
window["decorated"] = False |
|
|
|
custom_config["stays_on_top"] = True |
|
|
|
window["stays_on_top"] = True |
|
|
|
pass |
|
|
|
custom_config["whither"]["window"] = window |
|
|
|
|
|
|
|
custom_config["app"]["greeter"] = greeter |
|
|
|
|
|
|
|
|
|
|
|
def changeTheme(theme: str): |
|
|
|
def changeTheme(theme: str): |
|
|
|
dirlist = listThemes(True) |
|
|
|
dirlist = listThemes(True) |
|
|
|
|
|
|
|
|
|
|
|
if theme in dirlist: |
|
|
|
if theme in dirlist: |
|
|
|
custom_config["theme"] = theme |
|
|
|
custom_config["app"]["greeter"]["theme"] = theme |
|
|
|
else: |
|
|
|
else: |
|
|
|
logger.error("Theme not found. Going with config theme") |
|
|
|
logger.error("Theme not found. Going with config theme") |
|
|
|
return |
|
|
|
return |
|
|
@ -136,11 +140,11 @@ def yargs(args: List[str]): |
|
|
|
used+=1 |
|
|
|
used+=1 |
|
|
|
exit() |
|
|
|
exit() |
|
|
|
elif args[0] == "--debug": |
|
|
|
elif args[0] == "--debug": |
|
|
|
changeConfig("debug_mode", True) |
|
|
|
debugMode(True) |
|
|
|
used+=1 |
|
|
|
used+=1 |
|
|
|
pass |
|
|
|
pass |
|
|
|
elif args[0] == "--normal": |
|
|
|
elif args[0] == "--normal": |
|
|
|
changeConfig("debug_mode", False) |
|
|
|
debugMode(False) |
|
|
|
used+=1 |
|
|
|
used+=1 |
|
|
|
pass |
|
|
|
pass |
|
|
|
elif args[0] == "--theme": |
|
|
|
elif args[0] == "--theme": |
|
|
|