feat: dzgui 7 alpha

This commit is contained in:
aclist committed 2025-12-08 17:32:25 +09:00
1 parent 1acdbd58c5
commit 2e5b771137
150 files changed
+10359

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
import re
import subprocess
from pathlib import Path
CPU_FILE = "/proc/cpuinfo"
def is_steam_deck() -> bool:
# TODO: tests
r = r"AMD Custom APU [0-9]{4}"
with open(CPU_FILE, "r") as f:
s = f.read()
match = re.search(r, s)
if match:
if "0932" in match.group() or "0405" in match.group():
return True
return False
def is_game_mode() -> bool:
proc = subprocess.run(
["/usr/bin/pgrep", "-a", "gamescope"],
capture_output=True,
text=True
)
if proc.returncode != 0:
return False
if "generate-drm-mode" in proc.stdout:
return True
else:
return False