Add GNOME Shell extension showing sing-box status via the Clash API

This commit is contained in:
av
2026-07-18 15:25:26 +03:00
commit 629e031845
10 changed files with 893 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
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;
}
}