Example #1
0
    rpc.on('init', () => {
      window.setBackgroundColor(toElectronBackgroundColor(cfg.backgroundColor || '#000'));
      window.show();

      // If no callback is passed to createWindow,
      // a new session will be created by default.
      if (!fn) {
        fn = win => win.rpc.emit('termgroup add req');
      }

      // app.windowCallback is the createWindow callback
      // that can be set before the 'ready' app event
      // and createWindow deifinition. It's executed in place of
      // the callback passed as parameter, and deleted right after.
      (app.windowCallback || fn)(window);
      delete (app.windowCallback);
      fetchNotifications(window);
      // auto updates
      if (!isDev && process.platform !== 'linux') {
        AutoUpdater(window);
      } else {
        console.log('ignoring auto updates during dev');
      }
    });
Example #2
0
 const updateBackgroundColor = () => {
   const cfg_ = app.plugins.getDecoratedConfig();
   window.setBackgroundColor(toElectronBackgroundColor(cfg_.backgroundColor || '#000'));
 };