X.on('event', (ev) => ewmhDesktopsProvider(store.dispatch));
import batteryProvider from 'providers/battery'; import volumeProvider from 'providers/volume'; import {ewmhDesktopsProvider} from 'providers/ewmh'; import {spotifyPlayingProvider} from 'providers/spotify'; import * as actions from 'actions'; batteryProvider(store.dispatch) window.setInterval(() => batteryProvider(store.dispatch), 10000); volumeProvider(store.dispatch) window.setInterval(() => { volumeProvider(store.dispatch); spotifyPlayingProvider(store.dispatch); }, 1000); // install the ewmhDesktopsProvider to run on substructureNotify events // from an x11 client // start with initial info load ewmhDesktopsProvider(store.dispatch); x11.createClient(function(err, display) { if (err) { throw err; } let X = display.client; let root = display.screen[0].root; X.ChangeWindowAttributes(root, { eventMask: x11.eventMask.SubstructureNotify|x11.eventMask.SubstructurRedirect}); X.on('event', (ev) => ewmhDesktopsProvider(store.dispatch)); x11.createClient(function(err, display) {}); });