forked from ramottamado/eval-gjs
@ -1,3 +1,8 @@
|
|||||||
|
import Gio from 'gi://Gio';
|
||||||
|
import Meta from 'gi://Meta';
|
||||||
|
import GLib from 'gi://GLib';
|
||||||
|
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||||
|
|
||||||
/* extension.js
|
/* extension.js
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@ -16,14 +21,6 @@
|
|||||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* exported init */
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const { Gio, GLib, Meta } = imports.gi;
|
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
|
||||||
|
|
||||||
const EvalGjsIface =
|
const EvalGjsIface =
|
||||||
'<node>' +
|
'<node>' +
|
||||||
' <interface name="dev.ramottamado.EvalGjs">' +
|
' <interface name="dev.ramottamado.EvalGjs">' +
|
||||||
@ -35,7 +32,7 @@ const EvalGjsIface =
|
|||||||
' </interface>' +
|
' </interface>' +
|
||||||
'</node>';
|
'</node>';
|
||||||
|
|
||||||
class EvalGjs {
|
export default class EvalGjs {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(EvalGjsIface, this);
|
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(EvalGjsIface, this);
|
||||||
}
|
}
|
||||||
@ -85,7 +82,3 @@ class EvalGjs {
|
|||||||
if (this._dbusImpl) this._dbusImpl.unexport();
|
if (this._dbusImpl) this._dbusImpl.unexport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
|
||||||
return new EvalGjs();
|
|
||||||
}
|
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
"description": "Evaluate GJS script through DBus",
|
"description": "Evaluate GJS script through DBus",
|
||||||
"uuid": "eval-gjs@ramottamado.dev",
|
"uuid": "eval-gjs@ramottamado.dev",
|
||||||
"shell-version": [
|
"shell-version": [
|
||||||
"41",
|
"45"
|
||||||
"42",
|
|
||||||
"43",
|
|
||||||
"44"
|
|
||||||
],
|
],
|
||||||
"url": "https://github.com/ramottamado/eval-gjs"
|
"url": "https://github.com/ramottamado/eval-gjs"
|
||||||
}
|
}
|
Reference in New Issue
Block a user