parent
b175a59c42
commit
bce6623603
|
@ -2,6 +2,7 @@ import time
|
|||
import os
|
||||
current_path = os.path.dirname(os.path.realpath(__file__))
|
||||
import threading
|
||||
import json
|
||||
try:
|
||||
import pystray
|
||||
from PIL import Image, ImageDraw
|
||||
|
@ -25,20 +26,19 @@ def debug_print_error(msg: str):
|
|||
|
||||
if not os.path.exists(current_path+"/modes.json"):
|
||||
with open(current_path+"/modes.json", "w") as f:
|
||||
f.write({"mode": 0})
|
||||
json.dump({"mode": 0}, f)
|
||||
else:
|
||||
with open(current_path+"/modes.json", "r") as f:
|
||||
global mode
|
||||
mode = f.read()
|
||||
|
||||
mode = json.load(f)["mode"]
|
||||
|
||||
#mode switches
|
||||
def volument_mode():
|
||||
def volumen_mode():
|
||||
debug_print("volument mode")
|
||||
global mode
|
||||
mode = 0
|
||||
with open(current_path+"/modes.json", "w") as f:
|
||||
f.write({"mode": 0})
|
||||
json.dump({"mode": 0}, f)
|
||||
|
||||
#mode actions
|
||||
|
||||
|
|
Loading…
Reference in New Issue