17 lines
498 B
JavaScript
17 lines
498 B
JavaScript
import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js';
|
|
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
|
|
|
import { SingBoxIndicator } from './lib/indicator.js';
|
|
|
|
export default class SingBoxStatusExtension extends Extension {
|
|
enable() {
|
|
this._indicator = new SingBoxIndicator(this);
|
|
Main.panel.addToStatusArea(this.uuid, this._indicator);
|
|
}
|
|
|
|
disable() {
|
|
this._indicator?.destroy();
|
|
this._indicator = null;
|
|
}
|
|
}
|