2023-06-07 15:58:08 +00:00
|
|
|
import {setConsoleLogDomain} from 'console';
|
|
|
|
import GLib from 'gi://GLib';
|
2023-06-13 00:13:01 +00:00
|
|
|
import Gio from 'gi://Gio';
|
2021-08-21 01:42:27 +00:00
|
|
|
|
|
|
|
setConsoleLogDomain('GNOME Shell');
|
|
|
|
|
|
|
|
imports.ui.environment.init();
|
2023-06-07 15:58:08 +00: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-06-13 00:13:01 +00:00
|
|
|
imports.ui.main.start().catch(e => {
|
|
|
|
const error = new GLib.Error(
|
|
|
|
Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED,
|
|
|
|
e.message);
|
|
|
|
global.context.terminate_with_error(error);
|
|
|
|
});
|
2023-06-07 15:58:08 +00:00
|
|
|
return GLib.SOURCE_REMOVE;
|
|
|
|
});
|
|
|
|
|
|
|
|
// Run the meta context's main loop
|
|
|
|
global.context.run_main_loop();
|
|
|
|
});
|