Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Lang = imports.lang;
- const Applet = imports.ui.applet;
- const GLib = imports.gi.GLib;
- const Gettext = imports.gettext.domain('cinnamon-applets');
- const _ = Gettext.gettext;
- function MyApplet(orientation) {
- this._init(orientation);
- }
- MyApplet.prototype = {
- __proto__: Applet.TextApplet.prototype,
- _init: function(orientation) {
- Applet.TextApplet.prototype._init.call(this, orientation);
- try {
- let [res, out, err, status] = GLib.spawn_command_line_sync('echo Hello World');
- this.set_applet_label(out)
- }
- catch (e) {
- global.logError(e);
- }
- }
- };
- function main(metadata, orientation) {
- let myApplet = new MyApplet(orientation);
- return myApplet;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement