start termianl if not advanced computer

This commit is contained in:
Niklas Kapelle 2024-01-28 16:46:57 +01:00
parent ce0e89f5b3
commit 8cd105b84c
Signed by: niklas
GPG Key ID: 4EB651B36D841D16

View File

@ -1,9 +1,20 @@
import kernel.ui.WindowManager;
import kernel.ps.ProcessManager;
import kernel.binstore.BinStore;
import kernel.MainTerm;
import lib.HomeContext;
class Startup {
public static function main() {
if (MainTerm.instance.isColor()) {
var main = new HomeContext();
main.run();
} else {
var term = BinStore.instantiate("terminal");
var pid = ProcessManager.run(term, {});
var ctx = WindowManager.getContextByPID(pid);
WindowManager.focusContextToOutput(ctx[0], "main");
}
}
}