2023-06-07 11:58:08 -04:00
|
|
|
import GLib from 'gi://GLib';
|
2023-06-12 20:13:01 -04:00
|
|
|
import Gio from 'gi://Gio';
|
2021-08-20 21:42:27 -04:00
|
|
|
|
2023-07-10 02:05:14 -04:00
|
|
|
import './environment.js';
|
2023-06-07 11:58:08 -04:00
|
|
|
|
|
|
|
// Run the Mutter main loop after
|
|
|
|
// GJS finishes resolving this module.
|
|
|
|
imports._promiseNative.setMainLoopHook(() => {
|
|
|
|
// Queue starting the shell
|
|
|
|
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
2023-07-10 05:53:00 -04:00
|
|
|
import('./main.js').then(main => main.start()).catch(e => {
|
2023-06-12 20:13:01 -04:00
|
|
|
const error = new GLib.Error(
|
|
|
|
Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED,
|
2023-08-17 17:42:02 -04:00
|
|
|
`${e.message}\n${e.stack}`);
|
2023-06-12 20:13:01 -04:00
|
|
|
global.context.terminate_with_error(error);
|
|
|
|
});
|
2023-06-07 11:58:08 -04:00
|
|
|
return GLib.SOURCE_REMOVE;
|
|
|
|
});
|
|
|
|
|
|
|
|
// Run the meta context's main loop
|
|
|
|
global.context.run_main_loop();
|
|
|
|
});
|