<commit_before>'use strict';

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

const app              = require( 'app' );
const Menu             = require( 'menu' );
const Tray             = require( 'tray' );
const NativeImage      = require( 'native-image' );
const powerSaveBlocker = require( 'power-save-blocker' );

let appIcon        = null;
let contextMenu    = null;
let currentBlocker = null;

/**
 * Icons to display inside of the tray
 *
 * @type {Object}
 */
let icons = {
  active    : NativeImage.createFromPath( './media/icon_active.png' ),
  notActive : NativeImage.createFromPath( './media/icon.png' )
}


/**
 * Menu to set inside of tray
 *
 * @type {Object}
 */
let menus = {
  active    : Menu.buildFromTemplate( [
    { label: 'Time for sleeping again', click : toggleSleepPermission },
    { label: 'Quit', click : app.quit }
  ] ),
  notActive : Menu.buildFromTemplate( [
    { label: 'Don\'t go to sleep', click : toggleSleepPermission },
    { label: 'Quit', click : app.quit }
  ] )
};


// kick off
app.on( 'ready', initTray );


/**
 * Initialize the tray
 */
function initTray() {
  if ( app.dock ) {
    app.dock.hide();
  }

  appIcon = new Tray( './media/icon.png' );

  appIcon.setToolTip( 'This is my application.' );
  appIcon.setContextMenu( menus.notActive );
}


/**
 * Toggle sleep blocking functionality
 */<commit_msg>fix file paths for distribution<commit_after>'use strict';

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

const app              = require( 'app' );
const Menu             = require( 'menu' );
const Tray             = require( 'tray' );
const NativeImage      = require( 'native-image' );
const powerSaveBlocker = require( 'power-save-blocker' );

let appIcon        = null;
let contextMenu    = null;
let currentBlocker = null;

/**
 * Icons to display inside of the tray
 *
 * @type {Object}
 */
let icons = {
  active    : NativeImage.createFromPath( `${__dirname}/media/icon_active.png` ),
  notActive : NativeImage.createFromPath( `${__dirname}/media/icon.png` )
}


/**
 * Menu to set inside of tray
 *
 * @type {Object}
 */
let menus = {
  active    : Menu.buildFromTemplate( [
    { label: 'Time for sleeping again', click : toggleSleepPermission },
    { label: 'Quit', click : app.quit }
  ] ),
  notActive : Menu.buildFromTemplate( [
    { label: 'Don\'t go to sleep', click : toggleSleepPermission },
    { label: 'Quit', click : app.quit }
  ] )
};


// kick off
app.on( 'ready', initTray );


/**
 * Initialize the tray
 */
function initTray() {
  if ( app.dock ) {
    app.dock.hide();
  }

  appIcon = new Tray( `${__dirname}/media/icon.png` );
  appIcon.setToolTip( 'Block screensaver' );
  appIcon.setContextMenu( menus.notActive );
}


/**
 * Toggle sleep blocking functionality
 */
{'fraction_non_alphanumeric': 0.1535375638220277, 'fraction_numerical': 0.0, 'mean_word_length': 2.8963068181818183, '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': '4371312', 'n_tokens_mistral': 908, 'n_tokens_neox': 881, 'n_words': 232}