mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 11:22:03 +00:00
Add CEF Remote Debugging toggle (#129)
* feat: add CEF Remote Debugging toggle * feat: disable remote debugger on startup * refactor: stop debugger instead of disable * feat: add option to allow remote debugging by default Co-authored-by: TrainDoctor <traindoctor@protonmail.com>
This commit is contained in:
+17
-1
@@ -5,6 +5,7 @@ from aiohttp import ClientSession, web
|
||||
|
||||
from injector import inject_to_tab
|
||||
import helpers
|
||||
import subprocess
|
||||
|
||||
class Utilities:
|
||||
def __init__(self, context) -> None:
|
||||
@@ -16,7 +17,10 @@ class Utilities:
|
||||
"confirm_plugin_install": self.confirm_plugin_install,
|
||||
"execute_in_tab": self.execute_in_tab,
|
||||
"inject_css_into_tab": self.inject_css_into_tab,
|
||||
"remove_css_from_tab": self.remove_css_from_tab
|
||||
"remove_css_from_tab": self.remove_css_from_tab,
|
||||
"allow_remote_debugging": self.allow_remote_debugging,
|
||||
"disallow_remote_debugging": self.disallow_remote_debugging,
|
||||
"remote_debugging_allowed": self.remote_debugging_allowed
|
||||
}
|
||||
|
||||
if context:
|
||||
@@ -133,3 +137,15 @@ class Utilities:
|
||||
"success": False,
|
||||
"result": e
|
||||
}
|
||||
|
||||
|
||||
async def remote_debugging_allowed(self):
|
||||
return await helpers.is_systemd_unit_active(helpers.REMOTE_DEBUGGER_UNIT)
|
||||
|
||||
async def allow_remote_debugging(self):
|
||||
await helpers.start_systemd_unit(helpers.REMOTE_DEBUGGER_UNIT)
|
||||
return True
|
||||
|
||||
async def disallow_remote_debugging(self):
|
||||
await helpers.stop_systemd_unit(helpers.REMOTE_DEBUGGER_UNIT)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user