23 lines
673 B
Python
23 lines
673 B
Python
import shutil
|
|
import os
|
|
|
|
|
|
def apply_custom_theme(colors_file: str) -> str:
|
|
return colors_file \
|
|
.replace("36393f", "292841") \
|
|
.replace("292b2f", "413f66") \
|
|
.replace("2f3136", "242338") \
|
|
.replace("202225", "1c1b29") \
|
|
.replace("18191c", "1c1b29")
|
|
|
|
|
|
def patch_theme():
|
|
with open("discord/res/values/colors.xml") as f:
|
|
color_theme = f.read()
|
|
color_theme = apply_custom_theme(color_theme)
|
|
with open("discord/res/values/colors.xml", "w") as f:
|
|
f.write(color_theme)
|
|
|
|
os.remove("discord/res/drawable-xxxhdpi/img_logo.png")
|
|
shutil.copy("lesbibabs.png", "discord/res/drawable-xxxhdpi/img_logo.png")
|