Add Screen control features: Screen tab in sidebar, Kivy script, and backend logic

This commit is contained in:
PaulVua
2026-02-17 12:19:05 +01:00
parent 8106af624f
commit 3e5ee9c77e
6 changed files with 627 additions and 357 deletions

View File

@@ -1751,3 +1751,17 @@ if ($type == "set_cpu_power_mode") {
]);
}
}
if ($type == "screen_control") {
$action = $_GET['action'];
if ($action == "start") {
// Run as background process
$command = 'export DISPLAY=:0 && nohup /usr/bin/python3 /home/aircarto/nebuleair_pro_4g/screen_control/screen.py > /dev/null 2>&1 &';
shell_exec($command);
echo "Started";
} elseif ($action == "stop") {
$command = 'sudo pkill -f "screen_control/screen.py"';
shell_exec($command);
echo "Stopped";
}
}