refactor: clean up service implementations and remove dead code

This commit is contained in:
sankalp committed 2026-07-08 12:24:39 +05:45
1 parent 9a1f512a28
commit 06be28535a
22 files changed
+2067 -756

No files matched your search

+4 -5
View File
@@ -7,21 +7,20 @@ and other visual effects for better performance during gaming.
Uses a marker file in /tmp to track state.
"""
import subprocess
import sys
from datetime import datetime
from typing import Literal
from utils.functions import read_json_file, write_json_file
from utils.functions import read_json_file, run_command, write_json_file
STATE_FILE = "/tmp/hyprland_gamemode"
def run_hyprctl(command: str) -> str:
"""Run a hyprctl command and return the output (raises on error)."""
result = subprocess.run(
["hyprctl"] + command.split(), capture_output=True, text=True, check=True
)
result = run_command(["hyprctl"] + command.split(), timeout=5)
if result.returncode != 0:
raise RuntimeError(f"hyprctl failed: {result.stderr}")
return result.stdout.strip()