2024-01-28 15:46:57 +00:00
|
|
|
import kernel.ui.WindowManager;
|
|
|
|
import kernel.ps.ProcessManager;
|
|
|
|
import kernel.binstore.BinStore;
|
|
|
|
import kernel.MainTerm;
|
2023-01-30 02:04:53 +00:00
|
|
|
import lib.HomeContext;
|
2021-12-20 00:55:30 +00:00
|
|
|
|
|
|
|
class Startup {
|
2022-02-21 00:50:19 +00:00
|
|
|
public static function main() {
|
2024-01-28 15:46:57 +00:00
|
|
|
if (MainTerm.instance.isColor()) {
|
|
|
|
var main = new HomeContext();
|
2022-03-04 12:28:59 +00:00
|
|
|
|
2024-01-28 15:46:57 +00:00
|
|
|
main.run();
|
|
|
|
} else {
|
|
|
|
var term = BinStore.instantiate("terminal");
|
|
|
|
var pid = ProcessManager.run(term, {});
|
|
|
|
var ctx = WindowManager.getContextByPID(pid);
|
|
|
|
WindowManager.focusContextToOutput(ctx[0], "main");
|
|
|
|
}
|
2021-12-20 00:55:30 +00:00
|
|
|
}
|
|
|
|
}
|