26 lines
534 B
Python
26 lines
534 B
Python
import json
|
|
import os
|
|
import sys
|
|
|
|
base = 'https://cdosea.0x2620.org/static/render/'
|
|
lang = ''
|
|
start = ''
|
|
lights = False
|
|
lanbox = False
|
|
font = 'Menlo'
|
|
# SimHei for chinese
|
|
font_size = 28
|
|
# 30 for chinese
|
|
|
|
letter_offset = False
|
|
lights_brightness = 255
|
|
led_lights = 24
|
|
letter_base_light = 25
|
|
|
|
conf = os.path.expanduser('~/.config/cdosea.json')
|
|
if os.path.exists(conf):
|
|
with open(conf) as fd:
|
|
config = json.load(fd)
|
|
_this = sys.modules[__name__]
|
|
for key in config:
|
|
setattr(_this, key, config[key])
|