summaryrefslogtreecommitdiff
path: root/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/tools
diff options
context:
space:
mode:
authornippy <you@example.com>2026-04-18 13:49:56 +0200
committernippy <you@example.com>2026-04-18 13:49:56 +0200
commit5d94c0a7d44a2255b81815a52a7056a94a39842d (patch)
tree759bdea9645c6a62f9e1e4c001f7d81cccd120d2 /raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/tools
parente79cdf210b267f21a186255ce1a4d50029439d54 (diff)
downloadRaveOS-PKGBUILD-5d94c0a7d44a2255b81815a52a7056a94a39842d.tar.gz
RaveOS-PKGBUILD-5d94c0a7d44a2255b81815a52a7056a94a39842d.zip
update Raveos themes
Diffstat (limited to 'raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/tools')
-rw-r--r--raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/tools/busAnalyzer.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/tools/busAnalyzer.js b/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/tools/busAnalyzer.js
new file mode 100644
index 0000000..969f4e6
--- /dev/null
+++ b/raveos-theme/gnome/theme-data/extensions/installed/appindicatorsupport@rgcjonas.gmail.com/tools/busAnalyzer.js
@@ -0,0 +1,46 @@
+#!/usr/bin/env gjs -m
+
+import GLib from 'gi://GLib';
+import Gio from 'gi://Gio';
+import GioUnix from 'gi://GioUnix';
+
+import * as DBusUtils from '../dbusUtils.js';
+
+async function seekStatusNotifierItems() {
+ // Some indicators (*coff*, dropbox, *coff*) do not re-register again
+ // when the plugin is enabled/disabled, thus we need to manually look
+ // for the objects in the session bus that implements the StatusNotifierItem
+ // interface...
+ const cancellable = null;
+ const bus = Gio.DBus.session;
+ const uniqueNames = await DBusUtils.getBusNames(bus, cancellable);
+
+ const stdErrOutputStream = new GioUnix.OutputStream({fd: 1, closeFd: true});
+ const introspectName = async name => {
+ const nodes = DBusUtils.introspectBusObject(bus, name, cancellable,
+ ['org.kde.StatusNotifierItem']);
+ const services = [...uniqueNames.get(name)];
+
+ for await (const node of nodes) {
+ const {path} = node;
+ stdErrOutputStream.write(`${JSON.stringify({services, name, path})}\n`,
+ cancellable);
+ }
+ };
+ await Promise.allSettled([...uniqueNames.keys()].map(n => introspectName(n)));
+}
+
+function main(_argv) {
+ const loop = new GLib.MainLoop(null, false);
+
+ let exitCode = 0;
+ seekStatusNotifierItems().catch(e => {
+ logError(e);
+ exitCode = 1;
+ }).finally(() => loop.quit());
+ loop.run();
+
+ return exitCode;
+}
+
+imports.system.exit(main(ARGV));