This package has been deprecated

Author message:

Unmaintained

gnome-shell-signal-tracker

0.2.1 • Public • Published

gnome-shell-signal-tracker

GNOME Shell extension utility for tracking objects implementing the GJS signal emitter interface (Signals.addSignalMethods).

Building

This module's source uses ES6 classes and modules, to build it into an ES5 UMD module run npm run build.

Usage

To use in an extension, include the UMD module or use a module bundler like Webpack.

import {SignalTracker, ShellWindowTracker, ShellWorkspaceTracker} from 'gnome-shell-signal-tracker';

const signals = new SignalTracker();
const windows = new ShellWindowTracker(signals);

function enable() {
  signals.connect(global.screen, 'workspace-switched', () => print('switched workspace'));
  windows.onEvery(win => print('found a new window'));
  windows.connectEvery('focus', win => print('focused a window'));
}

function disable() {
  signals.clean();
}

Documentation

For now, the JSDoc annotations in the source.

Package Sidebar

Install

npm i gnome-shell-signal-tracker

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • rliang