Setup disk tool

This commit is contained in:
2026-04-03 16:18:07 -04:00
parent 20a9820a77
commit 413426d597
2 changed files with 172 additions and 7 deletions

17
main.py
View File

@@ -6,6 +6,7 @@ import win32api
CONFIG_PATH = os.path.join(os.environ["APPDATA"], "FP26CKOSDGLBIFUMD", "library.toml")
PAUSE_FILE = os.path.join(os.environ["APPDATA"], "FP26CKOSDGLBIFUMD", "pause")
disk_in = False
already_launched = False
@@ -13,16 +14,18 @@ app_info = None
def run_game(app_type, app):
if app_type == "playnite":
os.startfile(f"playnite://playnite/start/{app}")
elif app_type == "steam":
os.startfile(f"steam://rungameid/{app}")
if not os.path.exists(PAUSE_FILE):
if app_type == "playnite":
os.startfile(f"playnite://playnite/start/{app}")
elif app_type == "steam":
os.startfile(f"steam://rungameid/{app}")
def stop_game(game_process):
for proc in psutil.process_iter(["name"]):
if proc.info["name"].lower() == game_process.lower():
proc.terminate()
if not os.path.exists(PAUSE_FILE):
for proc in psutil.process_iter(["name"]):
if proc.info["name"].lower() == game_process.lower():
proc.terminate()
while True: