<commit_before>var app = require('app');
var BrowserWindow = require('browser-window');
var globalShortcut = require('global-shortcut');
var Menu = require('menu');
var Tray = require('tray');

require('crash-reporter').start();

app.on('window-all-closed', function() {
  app.quit();
});

app.on('ready', function() {
  var mainWindow    = new BrowserWindow({width: 500, height: 500});
  var displayWindow = true;

  var appIcon     = new Tray('./images/clipbd-icon.png');
  var contextMenu = Menu.buildFromTemplate([
    {
      label: 'show window',
      type: 'radio',
      click: function() {
        displayWindow = true;
        mainWindow.show();
      }
    },
    {
      label: 'hide window',
      type: 'radio',
      click: function() {
        displayWindow = false;
        mainWindow.hide();
      }
    },
    {
      label: 'quit',
      type: 'radio',
      click: function() {
        app.quit();
      }
    }
  ]);
  appIcon.setToolTip('clipbd');
  appIcon.setContextMenu(contextMenu);

  mainWindow.loadUrl('file://' + __dirname + '/index.html');

  mainWindow.on('closed', function() {
    mainWindow = null;
  });

  var ret = globalShortcut.register('Ctrl + Shift + ]', function() {
    if (displayWindow) {
      mainWindow.hide();
      displayWindow = false;
    } else {
      mainWindow.show();
      displayWindow = true;
    }
  });

  if (!ret) {
    console.log('registration error');
  }
});<commit_msg>Open devtools<commit_after>var app = require('app');
var BrowserWindow = require('browser-window');
var globalShortcut = require('global-shortcut');
var Menu = require('menu');
var Tray = require('tray');

require('crash-reporter').start();

app.on('window-all-closed', function() {
  app.quit();
});

app.on('ready', function() {
  var mainWindow    = new BrowserWindow({width: 500, height: 500});
  var displayWindow = true;

  var appIcon     = new Tray('./images/clipbd-icon.png');
  var contextMenu = Menu.buildFromTemplate([
    {
      label: 'show window',
      type: 'radio',
      click: function() {
        displayWindow = true;
        mainWindow.show();
      }
    },
    {
      label: 'hide window',
      type: 'radio',
      click: function() {
        displayWindow = false;
        mainWindow.hide();
      }
    },
    {
      label: 'quit',
      type: 'radio',
      click: function() {
        app.quit();
      }
    }
  ]);
  appIcon.setToolTip('clipbd');
  appIcon.setContextMenu(contextMenu);

  mainWindow.loadUrl('file://' + __dirname + '/index.html');

  mainWindow.openDevTools();

  mainWindow.on('closed', function() {
    mainWindow = null;
  });

  var ret = globalShortcut.register('Ctrl + Shift + ]', function() {
    if (displayWindow) {
      mainWindow.hide();
      displayWindow = false;
    } else {
      mainWindow.show();
      displayWindow = true;
    }
  });

  if (!ret) {
    console.log('registration error');
  }
});
{'fraction_non_alphanumeric': 0.1702127659574468, 'fraction_numerical': 0.004118050789293068, 'mean_word_length': 2.6759142496847415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2777410', 'n_tokens_mistral': 939, 'n_tokens_neox': 901, 'n_words': 186}